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
b601f135
Commit
b601f135
authored
Dec 02, 2010
by
Gerhard Stein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixes, HUD seen on map and better walking animation on map
parent
c18643f7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
37 additions
and
17 deletions
+37
-17
src/engine/CCamera.cpp
src/engine/CCamera.cpp
+3
-3
src/engine/galaxy/CLevelPlay.cpp
src/engine/galaxy/CLevelPlay.cpp
+6
-3
src/engine/galaxy/CLevelPlay.h
src/engine/galaxy/CLevelPlay.h
+2
-1
src/engine/galaxy/CMapLoaderGalaxy.cpp
src/engine/galaxy/CMapLoaderGalaxy.cpp
+1
-1
src/engine/galaxy/CPlayGameGalaxy.cpp
src/engine/galaxy/CPlayGameGalaxy.cpp
+2
-2
src/engine/galaxy/CWorldMap.cpp
src/engine/galaxy/CWorldMap.cpp
+8
-2
src/engine/galaxy/CWorldMap.h
src/engine/galaxy/CWorldMap.h
+2
-1
src/engine/galaxy/ai/CPlayerWM.cpp
src/engine/galaxy/ai/CPlayerWM.cpp
+8
-3
src/engine/galaxy/ai/CPlayerWM.h
src/engine/galaxy/ai/CPlayerWM.h
+5
-1
No files found.
src/engine/CCamera.cpp
View file @
b601f135
...
...
@@ -14,9 +14,9 @@
#include "CCamera.h"
#include "
../
CLogFile.h"
#include "
../
sdl/CVideoDriver.h"
#include "
../
sdl/CInput.h"
#include "CLogFile.h"
#include "sdl/CVideoDriver.h"
#include "sdl/CInput.h"
#include "spritedefines.h"
CCamera
::
CCamera
(
CMap
*
pmap
,
Uint32
x
,
Uint32
y
)
:
...
...
src/engine/galaxy/CLevelPlay.cpp
View file @
b601f135
...
...
@@ -12,10 +12,12 @@
namespace
galaxy
{
CLevelPlay
::
CLevelPlay
(
CExeFile
&
ExeFile
,
CInventory
&
Inventory
)
:
CLevelPlay
::
CLevelPlay
(
CExeFile
&
ExeFile
,
CInventory
&
Inventory
,
stOption
*
p_option
)
:
m_active
(
false
),
m_ExeFile
(
ExeFile
),
m_Inventory
(
Inventory
)
m_Inventory
(
Inventory
),
mp_option
(
p_option
)
{
}
bool
CLevelPlay
::
isActive
()
...
...
@@ -80,7 +82,8 @@ void CLevelPlay::process()
(
*
obj
)
->
draw
();
}
m_Inventory
.
drawHUD
();
if
(
mp_option
[
OPT_HUD
].
value
)
m_Inventory
.
drawHUD
();
}
}
src/engine/galaxy/CLevelPlay.h
View file @
b601f135
...
...
@@ -19,7 +19,7 @@ namespace galaxy {
class
CLevelPlay
{
public:
CLevelPlay
(
CExeFile
&
ExeFile
,
CInventory
&
Inventory
);
CLevelPlay
(
CExeFile
&
ExeFile
,
CInventory
&
Inventory
,
stOption
*
p_option
);
bool
isActive
();
void
setActive
(
bool
value
);
...
...
@@ -34,6 +34,7 @@ private:
CMap
m_Map
;
CExeFile
&
m_ExeFile
;
CInventory
&
m_Inventory
;
stOption
*
mp_option
;
};
}
...
...
src/engine/galaxy/CMapLoaderGalaxy.cpp
View file @
b601f135
...
...
@@ -350,7 +350,7 @@ void CMapLoaderGalaxy::addFoe(CMap &Map, word foe, size_t x, size_t y)
case
3
:
// This is the player on map
p_newfoe
=
new
galaxy
::
CPlayerWM
(
&
Map
,
x
,
y
,
m_ObjectPtr
);
p_newfoe
=
new
galaxy
::
CPlayerWM
(
&
Map
,
x
,
y
,
m_ObjectPtr
,
m_Inventory
);
// Add the Camera into the game scene and attach it to this player
camera
=
new
CCamera
(
&
Map
,
x
,
y
);
...
...
src/engine/galaxy/CPlayGameGalaxy.cpp
View file @
b601f135
...
...
@@ -20,8 +20,8 @@ CPlayGameGalaxy::CPlayGameGalaxy(CExeFile &ExeFile, char level,
char
numplayers
,
Uint8
&
difficulty
,
stOption
*
p_option
,
CSavedGame
&
SavedGame
)
:
CPlayGame
(
ExeFile
,
level
,
numplayers
,
difficulty
,
p_option
),
m_WorldMap
(
ExeFile
,
m_Inventory
),
m_LevelPlay
(
ExeFile
,
m_Inventory
),
m_WorldMap
(
ExeFile
,
m_Inventory
,
p_option
),
m_LevelPlay
(
ExeFile
,
m_Inventory
,
p_option
),
mp_Menu
(
NULL
),
m_SavedGame
(
SavedGame
)
{
...
...
src/engine/galaxy/CWorldMap.cpp
View file @
b601f135
...
...
@@ -13,10 +13,12 @@
namespace
galaxy
{
CWorldMap
::
CWorldMap
(
CExeFile
&
ExeFile
,
CInventory
&
Inventory
)
:
CWorldMap
::
CWorldMap
(
CExeFile
&
ExeFile
,
CInventory
&
Inventory
,
stOption
*
p_option
)
:
m_active
(
false
),
m_ExeFile
(
ExeFile
),
m_Inventory
(
Inventory
)
m_Inventory
(
Inventory
),
mp_option
(
p_option
)
{}
bool
CWorldMap
::
isActive
()
...
...
@@ -67,6 +69,10 @@ void CWorldMap::process()
// Draw masked tiles here!
m_Map
.
drawForegroundTiles
();
// Draw the inventory
if
(
mp_option
[
OPT_HUD
].
value
)
m_Inventory
.
drawHUD
();
}
...
...
src/engine/galaxy/CWorldMap.h
View file @
b601f135
...
...
@@ -19,7 +19,7 @@ namespace galaxy {
class
CWorldMap
{
public:
CWorldMap
(
CExeFile
&
ExeFile
,
CInventory
&
Inventory
);
CWorldMap
(
CExeFile
&
ExeFile
,
CInventory
&
Inventory
,
stOption
*
p_option
);
bool
isActive
();
void
setActive
(
bool
value
);
...
...
@@ -35,6 +35,7 @@ private:
CMap
m_Map
;
CExeFile
&
m_ExeFile
;
CInventory
&
m_Inventory
;
stOption
*
mp_option
;
};
}
...
...
src/engine/galaxy/ai/CPlayerWM.cpp
View file @
b601f135
...
...
@@ -17,8 +17,10 @@ const Uint16 SWIMBASEFRAME = 156;
namespace
galaxy
{
CPlayerWM
::
CPlayerWM
(
CMap
*
pmap
,
Uint32
x
,
Uint32
y
,
std
::
vector
<
CObject
*>&
ObjectPtrs
)
:
std
::
vector
<
CObject
*>&
ObjectPtrs
,
CInventory
&
l_Inventory
)
:
CObject
(
pmap
,
x
,
y
,
OBJ_PLAYER
),
m_Inventory
(
l_Inventory
),
m_basesprite
(
WALKBASEFRAME
),
m_looking_dir
(
LEFT
),
m_animation
(
0
),
...
...
@@ -26,9 +28,7 @@ m_animation_time(1),
m_animation_ticker
(
0
),
m_ObjectPtrs
(
ObjectPtrs
)
{
// TODO Auto-generated constructor stub
sprite
=
m_basesprite
;
performCollisions
();
}
...
...
@@ -77,6 +77,8 @@ void CPlayerWM::processWalking()
walking
=
true
;
m_hDir
=
RIGHT
;
}
else
m_hDir
=
NONE
;
if
(
g_pInput
->
getHoldedCommand
(
IC_UP
))
{
...
...
@@ -96,6 +98,9 @@ void CPlayerWM::processWalking()
walking
=
true
;
m_vDir
=
DOWN
;
}
else
m_vDir
=
NONE
;
if
(
g_pInput
->
getHoldedCommand
(
IC_STATUS
))
solid
=
!
solid
;
...
...
src/engine/galaxy/ai/CPlayerWM.h
View file @
b601f135
...
...
@@ -10,13 +10,14 @@
#include "common/CObject.h"
#include "engine/CEvent.h"
#include "engine/galaxy/CInventory.h"
namespace
galaxy
{
class
CPlayerWM
:
public
CObject
{
public:
CPlayerWM
(
CMap
*
pmap
,
Uint32
x
,
Uint32
y
,
std
::
vector
<
CObject
*>&
ObjectPtrs
);
std
::
vector
<
CObject
*>&
ObjectPtrs
,
CInventory
&
l_Inventory
);
void
process
();
void
processWalking
();
...
...
@@ -28,6 +29,9 @@ public:
void
performSwimmingAnimation
();
virtual
~
CPlayerWM
();
CInventory
&
m_Inventory
;
private:
Uint16
m_basesprite
;
direction_t
m_looking_dir
;
...
...
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