Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Commander-Genius
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gerhard Stein
Commander-Genius
Commits
1d756bec
Commit
1d756bec
authored
Jun 12, 2018
by
Gerhard Stein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Virtual Controlpad added to the vorticon engine
parent
75cb5259
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
8 deletions
+53
-8
src/engine/CGameLauncher.cpp
src/engine/CGameLauncher.cpp
+2
-2
src/engine/keen/galaxy/common/ai/CPlayerWM.cpp
src/engine/keen/galaxy/common/ai/CPlayerWM.cpp
+7
-5
src/engine/keen/vorticon/playgame/CPlayGameLevel.cpp
src/engine/keen/vorticon/playgame/CPlayGameLevel.cpp
+18
-0
src/engine/keen/vorticon/playgame/CPlayGameVorticon.cpp
src/engine/keen/vorticon/playgame/CPlayGameVorticon.cpp
+13
-0
src/engine/keen/vorticon/playgame/CPlayGameWorldMap.cpp
src/engine/keen/vorticon/playgame/CPlayGameWorldMap.cpp
+13
-1
No files found.
src/engine/CGameLauncher.cpp
View file @
1d756bec
...
...
@@ -441,11 +441,11 @@ bool CGameLauncher::start()
{
Font
.
loadinternalFont
(
8
);
}
else
if
(
height
>
960
)
else
if
(
height
>
=
960
)
{
Font
.
loadinternalFont
(
4
);
}
else
if
(
height
>
480
)
else
if
(
height
>
=
480
)
{
Font
.
loadinternalFont
(
2
);
}
...
...
src/engine/keen/galaxy/common/ai/CPlayerWM.cpp
View file @
1d756bec
...
...
@@ -486,11 +486,13 @@ void CPlayerWM::processMoving()
}
else
{
VirtualKeenControl
*
vkc
=
dynamic_cast
<
VirtualKeenControl
*>
(
gInput
.
mpVirtPad
.
get
());
assert
(
vkc
);
vkc
->
mDPad
.
invisible
=
false
;
vkc
->
mStatusButton
.
invisible
=
false
;
vkc
->
mStartButton
.
invisible
=
false
;
if
(
gVideoDriver
.
VGamePadEnabled
()
)
{
VirtualKeenControl
*
vkc
=
dynamic_cast
<
VirtualKeenControl
*>
(
gInput
.
mpVirtPad
.
get
());
vkc
->
mDPad
.
invisible
=
false
;
vkc
->
mStatusButton
.
invisible
=
false
;
vkc
->
mStartButton
.
invisible
=
true
;
}
}
...
...
src/engine/keen/vorticon/playgame/CPlayGameLevel.cpp
View file @
1d756bec
...
...
@@ -8,11 +8,29 @@
#include "CPlayGameVorticon.h"
#include "../ai/CManglingMachine.h"
#include "engine/core/objenums.h"
#include "engine/core/VGamepads/vgamepadsimple.h"
#include "sdl/audio/Audio.h"
#include "../finale/CTantalusRay.h"
#include <base/video/CVideoDriver.h>
#include <base/CInput.h>
void
CPlayGameVorticon
::
processInLevel
()
{
if
(
gVideoDriver
.
VGamePadEnabled
()
)
{
VirtualKeenControl
*
vkc
=
dynamic_cast
<
VirtualKeenControl
*>
(
gInput
.
mpVirtPad
.
get
());
assert
(
vkc
);
vkc
->
hideAllButtons
();
vkc
->
mPadBackground
.
invisible
=
false
;
vkc
->
mDPad
.
invisible
=
false
;
vkc
->
mJumpButton
.
invisible
=
false
;
vkc
->
mPogoButton
.
invisible
=
false
;
vkc
->
mShootButton
.
invisible
=
false
;
vkc
->
mStatusButton
.
invisible
=
false
;
}
if
(
m_gameover
)
return
;
...
...
src/engine/keen/vorticon/playgame/CPlayGameVorticon.cpp
View file @
1d756bec
...
...
@@ -17,6 +17,7 @@
#include "sdl/audio/Audio.h"
#include "engine/core/mode/CGameMode.h"
#include "engine/core/menu/MainMenu.h"
#include "engine/core/VGamepads/vgamepadsimple.h"
#include "../CVorticonMapLoader.h"
#include "graphics/GsGraphics.h"
#include "../ai/CTeleporter.h"
...
...
@@ -281,6 +282,18 @@ void CPlayGameVorticon::pumpEvent(const CEvent *evPtr)
////
void
CPlayGameVorticon
::
ponder
(
const
float
deltaT
)
{
VirtualKeenControl
*
vkc
=
dynamic_cast
<
VirtualKeenControl
*>
(
gInput
.
mpVirtPad
.
get
());
if
(
!
vkc
)
{
gInput
.
mpVirtPad
.
reset
(
new
VirtualKeenControl
);
gInput
.
mpVirtPad
->
init
();
vkc
=
dynamic_cast
<
VirtualKeenControl
*>
(
gInput
.
mpVirtPad
.
get
());
}
assert
(
vkc
);
vkc
->
mDPad
.
invisible
=
false
;
if
(
!
mpFinale
&&
!
gMenuController
.
active
()
)
// Game is not paused, no messages have to be shown and no menu is open
{
if
(
mMessageBoxes
.
empty
()
&&
!
StatusScreenOpen
())
...
...
src/engine/keen/vorticon/playgame/CPlayGameWorldMap.cpp
View file @
1d756bec
...
...
@@ -13,13 +13,14 @@
#include "graphics/GsGraphics.h"
#include "graphics/effects/CColorMerge.h"
#include "sdl/audio/Audio.h"
#include "engine/core/VGamepads/vgamepadsimple.h"
#include "../ai/CTeleporter.h"
#include "../ai/CMessie.h"
const
int
LVLS_SHIP
=
20
;
void
CPlayGameVorticon
::
processOnWorldMap
()
{
{
const
int
numPlayers
=
m_Player
.
size
();
for
(
int
i
=
0
;
i
<
numPlayers
;
i
++
)
{
...
...
@@ -97,6 +98,17 @@ void CPlayGameVorticon::processOnWorldMap()
}
}
}
if
(
gVideoDriver
.
VGamePadEnabled
()
)
{
VirtualKeenControl
*
vkc
=
dynamic_cast
<
VirtualKeenControl
*>
(
gInput
.
mpVirtPad
.
get
());
assert
(
vkc
);
vkc
->
hideAllButtons
();
vkc
->
mDPad
.
invisible
=
false
;
vkc
->
mStartButton
.
invisible
=
false
;
}
}
void
CPlayGameVorticon
::
goBacktoMap
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment