Commit 7dcd2d5f authored by Gerhard Stein's avatar Gerhard Stein

Small updates

parent f5c6083a
No preview for this file type
......@@ -4,8 +4,7 @@
(c)2008-2012 Gerstrong
(c)2009-2012 Albert
(c)2009-2012 Pizza2004
(c)2009-2012 Pickle
(c)2009-2012 Pizza2004
(c)2009-2012 Tulip
Released under GNU/GPL
......@@ -226,6 +225,13 @@ http://github.com/gerstrong/Commander-Genius/issues
Many thanks to people who has helped me so far in this project with their
suggestions:
Retired Team Members:
---------------------
Pickle
Contributors:
-------------
Sciz CT
Lemm
DSL (Nice icon contribution)
......@@ -240,6 +246,8 @@ Levellass (Keen EXE-Information)
ZidaneA (For his music tracks!)
Iv4n
Also many special thanks to Martin Hauber (Tulip) who has been supporting me all the time in testing
the Windows version of CKP and giving me access to a lot of information about the games.
Without you it wouldn't be that great!
......
......@@ -44,7 +44,8 @@ int ck_KeenPoleOffs[3] = {-8, 0, 8};
CPlayerLevel::CPlayerLevel(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs, direction_t facedir,
CInventory &l_Inventory, stCheat &Cheatmode) :
CInventory &l_Inventory, stCheat &Cheatmode,
const size_t offset) :
CPlayerBase(pmap, foeID, x, y, ObjectPtrs, facedir, l_Inventory, Cheatmode),
m_jumpdownfromobject(false),
mPlacingGem(false),
......@@ -88,14 +89,23 @@ mPoleGrabTime(0)
m_jumped = false;
m_hanging = false;
size_t address;
/*for(size_t add = 0x098C ; add <= 0x3ABB ; add += 0x2 )
{
m_Action.spriteLeft = 0;
m_Action.spriteRight = 0;
m_Action.setActionFormat(add);
setActionSprite();
if(g_pBehaviorEngine->getEpisode() == 4)
address = 0x98C;
else
address = 0x888;
for(int sp = 130+124 ; sp <= 155+124 ; sp++)
{
if( m_Action.spriteLeft == sp || m_Action.spriteRight == sp)
{
printf("sprite %i and %i found at %x\n", m_Action.spriteLeft, m_Action.spriteRight, add);
}
}
}*/
setupGalaxyObjectOnMap(address, A_KEEN_STAND);
setupGalaxyObjectOnMap(offset, A_KEEN_STAND);
CSprite &rSprite = g_pGfxEngine->getSprite(sprite);
performCollisions();
......
......@@ -74,7 +74,8 @@ class CPlayerLevel : public CPlayerBase
public:
CPlayerLevel(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y,
std::vector< SmartPointer<CGalaxySpriteObject> > &ObjectPtrs, direction_t facedir,
CInventory &l_Inventory, stCheat &Cheatmode);
CInventory &l_Inventory, stCheat &Cheatmode,
const size_t offset);
void prepareToShoot();
......
......@@ -14,8 +14,6 @@
#include "sdl/sound/CSound.h"
#include "CVec.h"
const Uint16 SWIMBASEFRAME = 156;
namespace galaxy {
CPlayerWM::CPlayerWM(CMap *pmap,
......@@ -39,19 +37,13 @@ m_animation_time(1),
m_animation_ticker(0),
m_cantswim(false)
{
// TODO: Another Workaround
if(g_pBehaviorEngine->getEpisode() == 4)
{
setupGalaxyObjectOnMap(actionoffset, 0);
}
else
sprite = 115;
m_ActionBaseOffset = actionoffset;
CGalaxySpriteObject::setActionForce(0);
setActionSprite();
// TODO: Temporary workaround
sprite += 15;
walkBaseFrame = sprite;
swimBaseFrame = walkBaseFrame + 24;
m_basesprite = walkBaseFrame;
CSprite &rSprite = g_pGfxEngine->getSprite(sprite);
performCollisions();
......@@ -97,7 +89,7 @@ void CPlayerWM::processMoving()
{
// Check if the player is swimming or walking and setup the proper speed
int movespeed;
if(m_basesprite == SWIMBASEFRAME)
if(m_basesprite == swimBaseFrame)
movespeed = 25;
else if(m_basesprite == walkBaseFrame)
movespeed = 50;
......@@ -176,7 +168,7 @@ void CPlayerWM::processMoving()
performWalkingAnimation(walking);
m_cantswim = false;
}
else if(m_basesprite == SWIMBASEFRAME)
else if(m_basesprite == swimBaseFrame)
{
if(m_Inventory.Item.m_special.ep4.swimsuit)
{
......@@ -275,7 +267,7 @@ void CPlayerWM::checkforSwimming(bool &bleft, bool &bright, bool &bup, bool &bdo
if(up == 11)
{
bdown = true;
m_basesprite = SWIMBASEFRAME;
m_basesprite = swimBaseFrame;
}
else if(down == 11)
m_basesprite = walkBaseFrame;
......@@ -284,7 +276,7 @@ void CPlayerWM::checkforSwimming(bool &bleft, bool &bright, bool &bup, bool &bdo
if(right == 12)
{
bleft = true;
m_basesprite = SWIMBASEFRAME;
m_basesprite = swimBaseFrame;
}
else if(left == 12)
m_basesprite = walkBaseFrame;
......@@ -293,7 +285,7 @@ void CPlayerWM::checkforSwimming(bool &bleft, bool &bright, bool &bup, bool &bdo
if(down == 13)
{
bup = true;
m_basesprite = SWIMBASEFRAME;
m_basesprite = swimBaseFrame;
}
else if(up == 13)
m_basesprite = walkBaseFrame;
......@@ -302,7 +294,7 @@ void CPlayerWM::checkforSwimming(bool &bleft, bool &bright, bool &bup, bool &bdo
if(left == 14)
{
bright = true;
m_basesprite = SWIMBASEFRAME;
m_basesprite = swimBaseFrame;
}
else if(right == 14)
m_basesprite = walkBaseFrame;
......@@ -317,21 +309,21 @@ void CPlayerWM::checkforSwimming(bool &bleft, bool &bright, bool &bup, bool &bdo
void CPlayerWM::performWalkingAnimation(bool walking)
{
if(xDirection == RIGHT && yDirection == NONE)
sprite = m_basesprite + 3;
sprite = m_basesprite + 1;
else if(xDirection == NONE && yDirection == UP)
sprite = m_basesprite + 6;
sprite = m_basesprite + 4;
else if(xDirection == NONE && yDirection == DOWN)
sprite = m_basesprite + 9;
sprite = m_basesprite + 7;
else if(xDirection == RIGHT && yDirection == DOWN)
sprite = m_basesprite + 12;
sprite = m_basesprite + 10;
else if(xDirection == LEFT && yDirection == DOWN)
sprite = m_basesprite + 15;
sprite = m_basesprite + 13;
else if(xDirection == LEFT && yDirection == UP)
sprite = m_basesprite + 18;
sprite = m_basesprite + 16;
else if(xDirection == RIGHT && yDirection == UP)
sprite = m_basesprite + 21;
sprite = m_basesprite + 19;
else
sprite = m_basesprite;
sprite = m_basesprite - 2;
if(walking)
{
......
......@@ -37,6 +37,7 @@ public:
private:
Uint16 m_basesprite;
Uint16 walkBaseFrame;
Uint16 swimBaseFrame;
direction_t m_looking_dir;
Uint8 m_animation;
......
......@@ -84,14 +84,14 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp4::addFoe(CMap &Map, word foe, size_t x,
case 2:
// This is the player on the map in one level
p_newfoe = new galaxy::CPlayerLevel(&Map, foe, x, y, m_ObjectPtr,
(foe==1) ? RIGHT : LEFT, m_Inventory, m_Cheatmode);
(foe==1) ? RIGHT : LEFT, m_Inventory, m_Cheatmode, 0x98C);
break;
case 3:
// This is the player on the world map
// Add the Camera into the game scene and attach it to this player
p_newfoe = new galaxy::CPlayerWM(&Map, foe, x, y,
m_ObjectPtr, m_Inventory, m_Cheatmode, 0x150A);
m_ObjectPtr, m_Inventory, m_Cheatmode, 0x15C2);
break;
......
......@@ -63,7 +63,7 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp5::addFoe(CMap &Map, word foe, size_t x,
case 2:
// This is the player on the map in one level
p_newfoe = new galaxy::CPlayerLevel(&Map, foe, x, y, m_ObjectPtr,
(foe==1) ? RIGHT : LEFT, m_Inventory, m_Cheatmode);
(foe==1) ? RIGHT : LEFT, m_Inventory, m_Cheatmode, 0x888);
break;
case 3:
......@@ -76,13 +76,13 @@ CGalaxySpriteObject* CMapLoaderGalaxyEp5::addFoe(CMap &Map, word foe, size_t x,
case PLATFORM_VERT: case PLATFORM_VERT_ALT:
/*case PLATFORM_VERT: case PLATFORM_VERT_ALT:
p_newfoe = new galaxy::CPlatformVertical(&Map, foe, x, y); break;
case PLATFORM_HORIZ_ALT:
case PLATFORM_HORIZ:
p_newfoe = new galaxy::CPlatformHorizontal(&Map, foe, x, y); break;
case PLATFORM_DROP:
p_newfoe = new galaxy::CPlatformDrop(&Map, foe, x, y); break;
p_newfoe = new galaxy::CPlatformDrop(&Map, foe, x, y); break;*/
default:
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment