Commit a5146b74 authored by Gerhard Stein's avatar Gerhard Stein

Heavy cleanups, better handling of pole physics

parent e5230256
......@@ -70,8 +70,8 @@ void CCamera::setPosition(const Vector2D<int>& newpos)
int cam_y = newpos.y-((gVideoDriver.getGameResolution().h/2)<<STC);
const int minimumEdgeDist = (2<<CSF)+1;
const int maxWidth = (mp_Map->m_width<<CSF)-1;
const int maxHeight = (mp_Map->m_height<<CSF)-1;
const int maxWidth = (mpMap->m_width<<CSF)-1;
const int maxHeight = (mpMap->m_height<<CSF)-1;
if(cam_x<minimumEdgeDist)
{
......@@ -101,9 +101,9 @@ void CCamera::setPosition(const Vector2D<int>& newpos)
return;
}
mp_Map->gotoPos(cam_x>>STC, cam_y>>STC);
mpMap->gotoPos(cam_x>>STC, cam_y>>STC);
mp_Map->mGamePlayPos = newpos;
mpMap->mGamePlayPos = newpos;
reAdjust();
}
......@@ -132,8 +132,8 @@ void CCamera::process()
return;
SDL_Rect gamerect = gVideoDriver.getGameResolution().SDLRect();
const int maxscrollx = (mp_Map->m_width<<4) - gamerect.w - 32;
const int maxscrolly = (mp_Map->m_height<<4) - gamerect.h - 32;
const int maxscrollx = (mpMap->m_width<<4) - gamerect.w - 32;
const int maxscrolly = (mpMap->m_height<<4) - gamerect.h - 32;
if(!mAttached)
......@@ -155,7 +155,7 @@ void CCamera::process()
mMoving = false;
mp_Map->mGamePlayPos = mp_AttachedObject->getMidPos();
mpMap->mGamePlayPos = mp_AttachedObject->getMidPos();
const Uint32 attached_x = mp_AttachedObject->getXPosition() + m_relcam.x;
const Uint32 attached_y = mp_AttachedObject->getYPosition() + m_relcam.y;
......@@ -188,8 +188,8 @@ void CCamera::process()
}
Uint16 &scroll_x = mp_Map->m_scrollx;
Uint16 &scroll_y = mp_Map->m_scrolly;
Uint16 &scroll_x = mpMap->m_scrollx;
Uint16 &scroll_y = mpMap->m_scrolly;
// delta is how much we need to scroll in order to get the camera stalled
int delta_x = (getXPosition()>>STC)-scroll_x;
......@@ -213,7 +213,7 @@ void CCamera::process()
{
do{
delta_x = (getXPosition()>>STC)-scroll_x;
if(!mp_Map->scrollRight())
if(!mpMap->scrollRight())
break;
}while(delta_x > right+speed);
}
......@@ -221,7 +221,7 @@ void CCamera::process()
{
do{
delta_x = (getXPosition()>>STC)-scroll_x;
if(!mp_Map->scrollLeft())
if(!mpMap->scrollLeft())
break;
}while(delta_x < left-speed);
}
......@@ -231,7 +231,7 @@ void CCamera::process()
{
do{
delta_y = (getYPosition()>>STC)-scroll_y;
if(!mp_Map->scrollDown())
if(!mpMap->scrollDown())
break;
}while(delta_y > down+speed);
}
......@@ -239,7 +239,7 @@ void CCamera::process()
{
do{
delta_y = (getYPosition()>>STC)-scroll_y;
if(!mp_Map->scrollUp())
if(!mpMap->scrollUp())
break;
}while(delta_y < up-speed);
}
......@@ -250,16 +250,16 @@ void CCamera::reAdjust()
{
SDL_Rect gameRes = gVideoDriver.getGameResolution().SDLRect();
Uint16 &scroll_x = mp_Map->m_scrollx;
Uint16 &scroll_y = mp_Map->m_scrolly;
Uint16 &scroll_x = mpMap->m_scrollx;
Uint16 &scroll_y = mpMap->m_scrolly;
const int x = getXPosition();
const int y = getYPosition();
// Check for the nearest vertical edges
int blockYup, blockYdown, blockXleft, blockXright;
mp_Map->fetchNearestVertBlockers(x, blockXleft, blockXright);
mp_Map->fetchNearestHorBlockers(y, blockYup, blockYdown);
mpMap->fetchNearestVertBlockers(x, blockXleft, blockXright);
mpMap->fetchNearestHorBlockers(y, blockYup, blockYdown);
blockXleft >>= STC;
blockXright >>= STC;
......@@ -269,8 +269,8 @@ void CCamera::reAdjust()
if( (blockYdown-blockYup) < gameRes.h ||
(blockXright-blockXleft) < gameRes.w)
{
mp_Map->calcVisibleArea();
mp_Map->refreshVisibleArea();
mpMap->calcVisibleArea();
mpMap->refreshVisibleArea();
return;
}
......@@ -278,34 +278,34 @@ void CCamera::reAdjust()
if(scroll_x < blockXleft)
{
for(int amt=0 ; amt<gameRes.w ; amt++ )
mp_Map->scrollRight();
mpMap->scrollRight();
for(int amt=0 ; amt<gameRes.w ; amt++ )
mp_Map->scrollLeft();
mpMap->scrollLeft();
}
if(scroll_x > blockXright - gameRes.w)
{
for(int amt=0 ; amt<gameRes.w ; amt++ )
mp_Map->scrollLeft();
mpMap->scrollLeft();
for(int amt=0 ; amt<gameRes.w ; amt++ )
mp_Map->scrollRight();
mpMap->scrollRight();
}
if(scroll_y < blockYup)
{
for(int amt=0 ; amt<gameRes.h ; amt++ )
mp_Map->scrollDown();
mpMap->scrollDown();
for(int amt=0 ; amt<gameRes.h ; amt++ )
mp_Map->scrollUp();
mpMap->scrollUp();
}
if(scroll_y > blockYdown - gameRes.h)
{
for(int amt=0 ; amt<gameRes.h ; amt++ )
mp_Map->scrollUp();
mpMap->scrollUp();
for(int amt=0 ; amt<gameRes.h ; amt++ )
mp_Map->scrollDown();
mpMap->scrollDown();
}
mp_Map->calcVisibleArea();
mp_Map->refreshVisibleArea();
mpMap->calcVisibleArea();
mpMap->refreshVisibleArea();
}
......
......@@ -50,7 +50,7 @@ bool CMap::setupEmptyDataPlanes(int numPlanes, Uint32 width, Uint32 height)
for(int i=0 ; i<numPlanes ; i++)
{
m_Plane[i].createDataMap(m_width, m_height);
mPlanes[i].createDataMap(m_width, m_height);
}
return true;
......@@ -86,7 +86,7 @@ void CMap::refreshStripes()
Uint16 CMap::at(Uint16 x, Uint16 y, Uint16 t)
{
if(x < m_width && y < m_height )
return m_Plane[t].getMapDataAt(x,y);
return mPlanes[t].getMapDataAt(x,y);
else
return 0;
}
......@@ -104,22 +104,22 @@ Uint16 CMap::getObjectat(Uint16 x, Uint16 y)
*/
word *CMap::getData(Uint8 PlaneNum)
{
return m_Plane[PlaneNum].getMapDataPtr();
return mPlanes[PlaneNum].getMapDataPtr();
}
word *CMap::getInfoData()
{
return m_Plane[2].getMapDataPtr();
return mPlanes[2].getMapDataPtr();
}
word *CMap::getForegroundData()
{
return m_Plane[1].getMapDataPtr();
return mPlanes[1].getMapDataPtr();
}
word *CMap::getBackgroundData()
{
return m_Plane[0].getMapDataPtr();
return mPlanes[0].getMapDataPtr();
}
void CMap::collectBlockersCoordiantes()
......@@ -134,7 +134,7 @@ void CMap::collectBlockersCoordiantes()
if(gBehaviorEngine.getEngine() == ENGINE_GALAXY)
{
const word* map_ptr = m_Plane[2].getMapDataPtr();
const word* map_ptr = mPlanes[2].getMapDataPtr();
for(int y=0 ; y<(int)m_height ; y++)
{
......@@ -164,21 +164,21 @@ void CMap::collectBlockersCoordiantes()
void CMap::setupAnimationTimer()
{
auto &frontTileProperties = gBehaviorEngine.getTileProperties(1);
word *p_front_tile = m_Plane[1].getMapDataPtr();
word *p_front_tile = mPlanes[1].getMapDataPtr();
auto &backTileProperties = gBehaviorEngine.getTileProperties(0);
word *p_back_tile = m_Plane[0].getMapDataPtr();
word *p_back_tile = mPlanes[0].getMapDataPtr();
std::vector<Uint8> &timersBack = m_Plane[0].getTimers();
std::vector<Uint8> &timersFront = m_Plane[1].getTimers();
auto &timersBack = mPlanes[0].getTimers();
auto &timersFront = mPlanes[1].getTimers();
for( size_t y=0 ; y<m_height ; y++)
{
const int stride = m_width*y;
const size_t stride = m_width*y;
for( size_t x=0 ; x<m_width ; x++)
{
const int offset = stride + x;
const auto offset = stride + x;
timersBack[offset] = backTileProperties[*p_back_tile].animationTime;
timersFront[offset] = frontTileProperties[*p_front_tile].animationTime;
......@@ -332,7 +332,7 @@ bool CMap::findObject(unsigned int obj, int *xout, int *yout)
{
for(x=2;x<m_width-2;x++)
{
if (m_Plane[2].getMapDataAt(x,y)==obj)
if (mPlanes[2].getMapDataAt(x,y)==obj)
{
*xout = x;
*yout = y;
......@@ -356,7 +356,7 @@ bool CMap::findTile(unsigned int tile, int *xout, int *yout, int plane)
{
for(x=2;x<m_width-2;x++)
{
if (m_Plane[plane].getMapDataAt(x,y) == tile)
if (mPlanes[plane].getMapDataAt(x,y) == tile)
{
*xout = x;
*yout = y;
......@@ -372,7 +372,7 @@ bool CMap::setTile(Uint16 x, Uint16 y, Uint16 t, Uint16 plane)
if( x<m_width && y<m_height )
{
//mp_foreground_data[y*m_width + x] = t;
m_Plane[plane].setMapDataAt(t, x, y);
mPlanes[plane].setMapDataAt(t, x, y);
return true;
}
else
......@@ -663,8 +663,8 @@ void CMap::redrawAt(const Uint32 mx, const Uint32 my)
const Uint16 loc_x = (((mx-m_mapx)<<4)+m_mapxstripepos)&drawMask;
const Uint16 loc_y = (((my-m_mapy)<<4)+m_mapystripepos)&drawMask;
const size_t bg = m_Plane[0].getMapDataAt(mx, my);
const size_t fg = m_Plane[1].getMapDataAt(mx, my);
const size_t bg = mPlanes[0].getMapDataAt(mx, my);
const size_t fg = mPlanes[1].getMapDataAt(mx, my);
m_Tilemaps.at(0).drawTile(ScrollSurface, loc_x, loc_y, bg);
if(fg)
......@@ -699,8 +699,8 @@ void CMap::drawAll()
{
for(Uint32 x=0;x<num_v_tiles;x++)
{
Uint32 bg = m_Plane[0].getMapDataAt(x+m_mapx, y+m_mapy);
Uint32 fg = m_Plane[1].getMapDataAt(x+m_mapx, y+m_mapy);
Uint32 bg = mPlanes[0].getMapDataAt(x+m_mapx, y+m_mapy);
Uint32 fg = mPlanes[1].getMapDataAt(x+m_mapx, y+m_mapy);
m_Tilemaps.at(0).drawTile(ScrollSurface, ((x<<4)+m_mapxstripepos)&drawMask,((y<<4)+m_mapystripepos)&drawMask, bg);
......@@ -727,8 +727,8 @@ void CMap::drawHstripe(unsigned int y, unsigned int mpy)
for(Uint32 x=0;x<num_v_tiles;x++)
{
Uint32 bg = m_Plane[0].getMapDataAt(x+m_mapx, mpy);
Uint32 fg = m_Plane[1].getMapDataAt(x+m_mapx, mpy);
Uint32 bg = mPlanes[0].getMapDataAt(x+m_mapx, mpy);
Uint32 fg = mPlanes[1].getMapDataAt(x+m_mapx, mpy);
m_Tilemaps.at(0).drawTile(ScrollSurface, ((x<<4)+m_mapxstripepos)&drawMask, y, bg);
......@@ -757,8 +757,8 @@ void CMap::drawVstripe(unsigned int x, unsigned int mpx)
for(Uint32 y=0 ; y<num_h_tiles ; y++)
{
Uint32 bg = m_Plane[0].getMapDataAt(mpx, y+m_mapy);
Uint32 fg = m_Plane[1].getMapDataAt(mpx, y+m_mapy);
Uint32 bg = mPlanes[0].getMapDataAt(mpx, y+m_mapy);
Uint32 fg = mPlanes[1].getMapDataAt(mpx, y+m_mapy);
m_Tilemaps.at(0).drawTile(ScrollSurface, x, ((y<<4)+m_mapystripepos) & drawMask, bg);
......@@ -850,7 +850,7 @@ void CMap::_drawForegroundTiles()
{
for( size_t x=x1 ; x<=x2 ; x++)
{
const auto fg = m_Plane[1].getMapDataAt(x,y);
const auto fg = mPlanes[1].getMapDataAt(x,y);
const int loc_x = (x<<TILE_S)-m_scrollx;
const int loc_y = (y<<TILE_S)-m_scrolly;
......@@ -943,13 +943,13 @@ void CMap::animateAllTiles()
num_h_tiles = m_height-m_mapy;
auto &frontTileProperties = gBehaviorEngine.getTileProperties(1);
word *p_front_tile = m_Plane[1].getMapDataPtr();
word *p_front_tile = mPlanes[1].getMapDataPtr();
auto &backTileProperties = gBehaviorEngine.getTileProperties(0);
word *p_back_tile = m_Plane[0].getMapDataPtr();
word *p_back_tile = mPlanes[0].getMapDataPtr();
std::vector<Uint8> &timersBack = m_Plane[0].getTimers();
std::vector<Uint8> &timersFront = m_Plane[1].getTimers();
auto &timersBack = mPlanes[0].getTimers();
auto &timersFront = mPlanes[1].getTimers();
for( size_t y=0 ; y<m_height ; y++)
{
......@@ -959,7 +959,7 @@ void CMap::animateAllTiles()
{
bool draw = false;
const int offset = stride + x;
const auto offset = stride + x;
const CTileProperties &back_tile = backTileProperties[*p_back_tile];
const CTileProperties &front_tile = frontTileProperties[*p_front_tile];
......
......@@ -125,19 +125,22 @@ public:
void drawAnimatedTile(SDL_Surface *dst, Uint16 mx, Uint16 my, Uint16 tile);
void animateAllTiles();
unsigned int getlevelat(unsigned int x, unsigned int y)
auto getlevelat(const int x,
const int y) -> int
{
return m_Plane[2].getMapDataAt(x>>TILE_S,y>>TILE_S);
return mPlanes[2].getMapDataAt(x>>TILE_S,y>>TILE_S);
}
Uint16 getPlaneDataAt(int plane, unsigned int x, unsigned int y) const
auto getPlaneDataAt(const int plane,
const int x,
const int y) const -> int
{
return m_Plane[plane].getMapDataAt(x>>CSF, y>>CSF);
return mPlanes[plane].getMapDataAt(x>>CSF, y>>CSF);
}
Uint16 getPlaneDataAt(int plane, Vector2D<Uint32> pos) const
{
return m_Plane[plane].getMapDataAt(pos.x>>CSF, pos.y>>CSF);
return mPlanes[plane].getMapDataAt(pos.x>>CSF, pos.y>>CSF);
}
word *getData(Uint8 PlaneNum);
......@@ -218,7 +221,7 @@ private:
float mAnimtileTimer;
CPlane m_Plane[3];
CPlane mPlanes[3];
Uint16 m_Level;
std::string m_LevelName;
std::vector<int> scrollBlockX;
......
This diff is collapsed.
......@@ -7,16 +7,16 @@
#include "CPlane.h"
CPlane::CPlane() :
m_width(0),
m_height(0)
{}
#include <cassert>
void CPlane::createDataMap(Uint16 width, Uint16 height)
void CPlane::createDataMap(const int width, const int height)
{
m_width = width;
m_height = height;
assert(width > 0);
assert(height > 0);
mDataVec.assign(m_width*m_height, 0);
mTimers.assign(m_width*m_height, 0);
mWidth = width;
mHeight = height;
mDataVec.assign(size_t(mWidth*mHeight), 0);
mTimers.assign(size_t(mWidth*mHeight), 0);
}
......@@ -15,36 +15,67 @@
class CPlane
{
public:
CPlane();
void createDataMap(Uint16 width, Uint16 height);
/**
* @brief creates a plane of data.
* @param width
* @param height
*/
void createDataMap(const int width, const int height);
word *getMapDataPtr()
/**
* @brief setMapDataAt Set a tile at the plane
* @param t the tile index to set
* @param x coordinate x
* @param y coordinate x
*/
auto getMapDataPtr() -> word*
{
return mDataVec.data();
}
word getMapDataAt(Uint16 x, Uint16 y) const
/**
* @brief setMapDataAt Returns the set tile
* @param x coordinate x
* @param y coordinate x
*/
auto getMapDataAt(const int x,
const int y) const -> word
{
if( x < m_width && y < m_height )
if( x < mWidth && y < mHeight )
{
return mDataVec[y*m_width+x];
return mDataVec[size_t(y*mWidth+x)];
}
return 0;
}
void setMapDataAt(Uint16 t, Uint16 x, Uint16 y)
/**
* @brief setMapDataAt Set a tile at the plane
* @param t the tile index to set
* @param x coordinate x
* @param y coordinate x
*/
auto setMapDataAt(const word t,
const int x,
const int y) -> void
{
mDataVec[y*m_width+x] = t;
mDataVec[size_t(y*mWidth+x)] = t;
}
std::vector<Uint8> &getTimers()
/**
* @brief getTimers Reference to timers defined for the plane.
*/
auto getTimers() -> std::vector<int>&
{
return mTimers;
}
bool empty() const
/**
* @brief empty Is the plane empty
* @return true if it is, otherwise not
*/
auto empty() const -> bool
{
return mDataVec.empty();
}
......@@ -54,9 +85,9 @@ private:
std::vector<word> mDataVec; // the map data of one plane
// In animation cycles the time when something needs to be changed
std::vector<Uint8> mTimers;
Uint16 m_width;
Uint16 m_height;
std::vector<int> mTimers;
int mWidth = 0;
int mHeight = 0;
};
#endif /* CPLANE_H_ */
......@@ -28,7 +28,7 @@ m_index(m_number_of_objects),
mHealthPoints(1),
mSpriteIdx(BLANKSPRITE),
m_jumpdownfromobject(false),
mp_Map(pmap),
mpMap(pmap),
m_blinktime(0),
m_Pos(x,y),
transluceny(0),
......@@ -216,12 +216,12 @@ bool CSpriteObject::calcVisibility()
SDL_Rect gameres = gVideoDriver.getGameResolution().SDLRect();
const Uint32 left = (((mp_Map->m_scrollx<<STC)-(visibility<<CSF))<0) ? 0 :
(mp_Map->m_scrollx<<STC)-(visibility<<CSF);
const Uint32 right = ((mp_Map->m_scrollx+gameres.w)<<STC)+(visibility<<CSF);
const Uint32 up = (((mp_Map->m_scrolly<<STC)-(visibility<<CSF))<0) ? 0 :
(mp_Map->m_scrolly<<STC)-(visibility<<CSF);
const Uint32 down = ((mp_Map->m_scrolly+gameres.h)<<STC)+(visibility<<CSF);
const Uint32 left = (((mpMap->m_scrollx<<STC)-(visibility<<CSF))<0) ? 0 :
(mpMap->m_scrollx<<STC)-(visibility<<CSF);
const Uint32 right = ((mpMap->m_scrollx+gameres.w)<<STC)+(visibility<<CSF);
const Uint32 up = (((mpMap->m_scrolly<<STC)-(visibility<<CSF))<0) ? 0 :
(mpMap->m_scrolly<<STC)-(visibility<<CSF);
const Uint32 down = ((mpMap->m_scrolly+gameres.h)<<STC)+(visibility<<CSF);
return ( right > m_Pos.x && left < m_Pos.x && down > m_Pos.y && up < m_Pos.y );
}
......@@ -234,9 +234,9 @@ bool CSpriteObject::verifyForFalling()
if( !blockedd )
{
// This will check three points and avoid that keen falls on sloped tiles
const auto fall1 = mp_Map->getPlaneDataAt(1, getXMidPos(), getYDownPos());
const auto fall2 = mp_Map->getPlaneDataAt(1, getXMidPos(), getYDownPos()+(1<<(CSF)));
const auto fall3 = mp_Map->getPlaneDataAt(1, getXMidPos(), getYDownPos()+(2<<(CSF)));
const auto fall1 = mpMap->getPlaneDataAt(1, getXMidPos(), getYDownPos());
const auto fall2 = mpMap->getPlaneDataAt(1, getXMidPos(), getYDownPos()+(1<<(CSF)));
const auto fall3 = mpMap->getPlaneDataAt(1, getXMidPos(), getYDownPos()+(2<<(CSF)));
const CTileProperties &TileProp1 = gBehaviorEngine.getTileProperties(1)[fall1];
const CTileProperties &TileProp2 = gBehaviorEngine.getTileProperties(1)[fall2];
const CTileProperties &TileProp3 = gBehaviorEngine.getTileProperties(1)[fall3];
......@@ -547,8 +547,8 @@ void CSpriteObject::draw()
return;
}
scrx = (m_Pos.x>>STC)-mp_Map->m_scrollx;
scry = (m_Pos.y>>STC)-mp_Map->m_scrolly;
scrx = (m_Pos.x>>STC)-mpMap->m_scrollx;
scry = (m_Pos.y>>STC)-mpMap->m_scrolly;
SDL_Rect gameres = gVideoDriver.getGameResolution().SDLRect();
......
......@@ -156,16 +156,11 @@ public:
bool dead, dying;
// This container will held the triggered events of the object
std::vector< ObjMove* > mMoveTasks;
bool m_jumpdownfromobject;
/*
* \brief Calculate Bounding Boxes fro collision
*/
......@@ -319,7 +314,7 @@ public:
virtual bool isNearby(CSpriteObject&) { return true; }
virtual void getShotByRay(object_t &obj_type);
void kill_intersecting_tile(int mpx, int mpy, CSpriteObject &theObject);
CMap *getMapPtr() { return mp_Map; }
CMap *getMapPtr() { return mpMap; }
/**
* \description plays certain sound of an object. Stereo will automatically applied when used
......@@ -339,6 +334,17 @@ public:
protected:
/**
* @brief cancelAllMoveTasks cancels out all the already created move tasks
*/
void cancelAllMoveTasks();
// This container will held the triggered events of the object
// TODO: This create too much fragmentation. Find a way to make this better
std::vector< ObjMove* > mMoveTasks;
#if USE_PYTHON3
/**
* @brief loadAiGetterInteger
......@@ -369,7 +375,7 @@ protected:
virtual bool loadPythonScripts(const std::string &scriptBaseName);
#endif
CMap *mp_Map;
CMap *mpMap;
Uint16 m_blinktime;
bool mInvincible = false; /** Shot might hit the object but it has no effect at all */
......@@ -390,6 +396,10 @@ protected:
Uint8 transluceny;
int mSprVar; // Sprite variant, which is used by the Spritemap
};
/**
......
......@@ -297,7 +297,7 @@ struct EventRestartLevel : CEvent {};
void CPlayGameGalaxy::looseManagement( const int playerID,
const bool playerGameOver,
const int levelObj,
const uint16_t levelObj,
const std::string &levelName )
{
CEventContainer &eventContainer = gEventManager;
......@@ -333,6 +333,9 @@ void CPlayGameGalaxy::looseManagement( const int playerID,
}
else if(allDead) // not yet!
{
// Player should see the dialog first.
gInput.flushAll();
// Create the Event Selection screen
std::string loosemsg = "You didn't make it past\n";
loosemsg += levelName;
......
......@@ -39,7 +39,7 @@ public:
void looseManagement(const int playerID,
const bool playerGameOver,
const int levelObj,
const uint16_t levelObj,
const std::string &levelName);
void pumpEvent(const CEvent *evPtr);
......
......@@ -164,7 +164,7 @@ int CGalaxySpriteObject::checkSolidU(int x1, int x2, int y1, const bool push_mod
for(int c=x1 ; c<=x2 ; c += COLISION_RES)
{
blocked = TileProperty[mp_Map->at(c>>CSF, y1>>CSF)].bdown;
blocked = TileProperty[mpMap->at(c>>CSF, y1>>CSF)].bdown;
if(blocked == 17 && m_climbing)
return 0;
......@@ -173,7 +173,7 @@ int CGalaxySpriteObject::checkSolidU(int x1, int x2, int y1, const bool push_mod
return blocked;
}
blocked = TileProperty[mp_Map->at(x2>>CSF, y1>>CSF)].bdown;
blocked = TileProperty[mpMap->at(x2>>CSF, y1>>CSF)].bdown;
if( blocked >= 2 && blocked <= 7 && checkslopedU(x2, y1, blocked ))
return 1;
......@@ -204,7 +204,7 @@ int CGalaxySpriteObject::checkSolidD( int x1, int x2, int y2, const bool push_mo
for(int c=x1 ; c<=x2 ; c += COLISION_RES)
{
blockedu = TileProperty[mp_Map->at(c>>CSF, y2>>CSF)].bup;
blockedu = TileProperty[mpMap->at(c>>CSF, y2>>CSF)].bup;
if( blockedu == 17 && m_climbing)
return 0;
......@@ -215,7 +215,7 @@ int CGalaxySpriteObject::checkSolidD( int x1, int x2, int y2, const bool push_mo
}