Commit a496cbb8 authored by Gerhard Stein's avatar Gerhard Stein

Resources integration to GsKit

parent f19132b5
......@@ -234,7 +234,7 @@ void CResourceLoader::renderLoadingGraphic()
}
else if(m_style == PROGRESS_STYLE_BITMAP)
{
CBitmap &Bitmap = *gGraphics.getBitmapFromStr("ONEMOMEN");
GsBitmap &Bitmap = *gGraphics.getBitmapFromStr("ONEMOMEN");
SDL_Rect rect;
int width = Bitmap.getWidth();
int height = Bitmap.getHeight();
......@@ -436,7 +436,7 @@ void CResourceLoaderBackground::render()
}
else if(m_style == PROGRESS_STYLE_BITMAP)
{
CBitmap &Bitmap = *gGraphics.getBitmapFromStr("ONEMOMEN");
GsBitmap &Bitmap = *gGraphics.getBitmapFromStr("ONEMOMEN");
SDL_Rect rect;
int width = Bitmap.getWidth();
int height = Bitmap.getHeight();
......
......@@ -15,7 +15,7 @@
#include <memory>
#include "Playerdefines.h"
#include "engine/spritedefines.h"
#include "graphics/CSprite.h"
#include "graphics/GsSprite.h"
#include "sdl/extensions.h"
#ifndef CHUD_H_
......@@ -68,7 +68,7 @@ private:
unsigned long m_oldScore;
unsigned int m_oldCharges;
CSprite mHUDBox;
GsSprite mHUDBox;
std::shared_ptr<SDL_Surface> mpBackground;
std::shared_ptr<SDL_Surface> mpHUDBlit;
......@@ -77,8 +77,8 @@ private:
int timer;
CSprite mKeenHeadSprite;
CSprite mKeenGunSprite;
GsSprite mKeenHeadSprite;
GsSprite mKeenGunSprite;
};
#endif /* CHUD_H_ */
......@@ -13,7 +13,7 @@
#include <vector>
#include <list>
#include "graphics/CTilemap.h"
#include "graphics/GsTilemap.h"
#include "fileio/TypeDefinitions.h"
#include "CPlane.h"
#include "engine/CEvent.h"
......@@ -34,7 +34,7 @@ class CMap
public:
CMap();
void setTileMap( CTilemap &Tilemap );
void setTileMap( GsTilemap &Tilemap );
void setLevel( const Uint16 level );
Uint16 getLevel();
......@@ -169,7 +169,7 @@ private:
Uint16 m_mapy; // map Y location shown at scrollbuffer column 0
Uint16 m_mapystripepos; // Y pixel position of next stripe column
std::vector<CTilemap> &m_Tilemaps;
std::vector<GsTilemap> &m_Tilemaps;
float mAnimtileTimer;
......
......@@ -39,7 +39,7 @@ void CSpriteObject::performCollisionsSameBox()
*/
void CSpriteObject::calcBoundingBoxes()
{
CSprite &rSprite = gGraphics.getSprite(0,sprite);
GsSprite &rSprite = gGraphics.getSprite(0,sprite);
m_BBox.x1 = rSprite.m_bboxX1;
m_BBox.x2 = rSprite.m_bboxX2;
......
......@@ -399,7 +399,7 @@ void CSpriteObject::draw()
if( sprite == BLANKSPRITE || dontdraw )
return;
CSprite &Sprite = gGraphics.getSprite(mSprVar, sprite);
GsSprite &Sprite = gGraphics.getSprite(mSprVar, sprite);
if(!Sprite.valid())
return;
......
......@@ -9,8 +9,8 @@
*/
#ifndef __CSPRITEOBJECT_H_
#define __CSPRITEOBJECT_H_
#ifndef __CSpriteObject_H_
#define __CSpriteObject_H_
#include <lib/base/GsEvent.h>
......@@ -141,7 +141,7 @@ public:
bool blockedl, blockedr, blockedu, blockedd;
bool onslope;
signed int xinertia, yinertia;
CSpriteObject *pSupportedbyobject;
CSpriteObject *pSupportedbyobject;
bool dead, dying;
......@@ -222,7 +222,7 @@ public:
bool hitdetect(CSpriteObject &hitobject);
bool hitdetect(CSpriteObject &hitobject);
bool hitdetectWithTile(const int num, const int lx, const int ly, const int lw, const int lh, const int res);
bool hitdetectWithTilePropertyRect(const Uint16 Property, int &lx, int &ly, const int lw, const int lh, const int res);
bool hitdetectWithTilePropertyRectRO(const Uint16 Property, const int lx, const int ly, const int lw, const int lh, const int res);
......@@ -283,9 +283,9 @@ public:
void processFallPhysics();
virtual void processFalling();
virtual void getTouchedBy(CSpriteObject &theObject) {}
virtual bool isNearby(CSpriteObject &theObject) { return true; }
virtual bool isNearby(CSpriteObject &theObject) { return true; }
virtual void getShotByRay(object_t &obj_type);
void kill_intersecting_tile(int mpx, int mpy, CSpriteObject &theObject);
void kill_intersecting_tile(int mpx, int mpy, CSpriteObject &theObject);
CMap *getMapPtr() { return mp_Map; }
/**
......@@ -296,7 +296,7 @@ public:
virtual void draw();
virtual ~CSpriteObject();
virtual ~CSpriteObject();
int getSpriteVariantId() const
{ return mSprVar; }
......@@ -321,4 +321,4 @@ protected:
int mSprVar; // Sprite variant, which is used by the Spritemap
};
#endif // __CSPRITEOBJECT_H_
#endif // __CSpriteObject_H_
......@@ -104,7 +104,7 @@ void CStatusScreen::createInventorySfcEp1(const int varSpr)
m_StatusRect.h = dlgH*8;
SDL_Surface *p_surface = CreateStatusSfc();
CTilemap &Tilemap = gGraphics.getTileMap(1);
GsTilemap &Tilemap = gGraphics.getTileMap(1);
gGraphics.drawDialogBox( p_surface, 0, 0, dlgW,dlgH, Font.getBGColour(p_surface->format, true));
Font.drawFont( p_surface, g_pBehaviorEngine->getString("EP1_StatusBox"), 1<<3, 1<<3, true);
......@@ -206,7 +206,7 @@ void CStatusScreen::createInventorySfcEp1(const int varSpr)
if (i>6) i=6;
for(j=0;j<i;j++)
{
CSprite &Sprite = gGraphics.getSprite(varSpr,m_baseframe);
GsSprite &Sprite = gGraphics.getSprite(varSpr,m_baseframe);
const int w = Sprite.getWidth();
const int h = Sprite.getHeight();
Sprite.drawSprite( p_surface, x, (0+4)<<3, w, h);
......@@ -237,7 +237,7 @@ void CStatusScreen::createInventorySfcEp2(const int varSpr)
m_StatusRect.h = dlgH*8;
SDL_Surface *p_surface = CreateStatusSfc();
CTilemap &Tilemap = gGraphics.getTileMap(1);
GsTilemap &Tilemap = gGraphics.getTileMap(1);
tempbuf = g_pBehaviorEngine->getString("EP2_StatusBox");
gGraphics.drawDialogBox( p_surface, 0,0,dlgW,dlgH, Font.getBGColour(true));
......@@ -320,7 +320,7 @@ void CStatusScreen::createInventorySfcEp2(const int varSpr)
if (i>7) i=7;
for(j=0;j<i;j++)
{
CSprite &Sprite = gGraphics.getSprite(0,m_baseframe);
GsSprite &Sprite = gGraphics.getSprite(0,m_baseframe);
const int w = Sprite.getWidth();
const int h = Sprite.getHeight();
Sprite.drawSprite( p_surface, x, (0+4)<<3, w, h );
......@@ -361,7 +361,7 @@ void CStatusScreen::createInventorySfcEp3(const int varSpr)
m_StatusRect.h = dlgH*8;
SDL_Surface *p_surface = CreateStatusSfc();
CTilemap &Tilemap = gGraphics.getTileMap(1);
GsTilemap &Tilemap = gGraphics.getTileMap(1);
tempbuf = g_pBehaviorEngine->getString("EP3_StatusBox");
gGraphics.drawDialogBox( p_surface, 0,0,dlgW,dlgH, Font.getBGColour(true));
......@@ -451,7 +451,7 @@ void CStatusScreen::createInventorySfcEp3(const int varSpr)
if (i>7) i=7;
for(j=0;j<i;j++)
{
CSprite &Sprite = gGraphics.getSprite(0,m_baseframe);
GsSprite &Sprite = gGraphics.getSprite(0,m_baseframe);
const int w = Sprite.getWidth();
const int h = Sprite.getHeight();
Sprite.drawSprite( p_surface, x, (0+4)<<3, w, h);
......
......@@ -17,7 +17,7 @@
#include <list>
#include "common/direction.h"
#include "CVec.h"
#include "graphics/CBitmap.h"
#include "graphics/GsBitmap.h"
#include <vector>
#include <memory>
......@@ -109,9 +109,9 @@ struct EventSendDialog : CEvent
struct EventSendBitmapDialogMsg : EventSendDialog
{
const CBitmap &BitmapRef;
const GsBitmap &BitmapRef;
const direction_t Direction;
EventSendBitmapDialogMsg(const CBitmap &lBitmapRef,
EventSendBitmapDialogMsg(const GsBitmap &lBitmapRef,
const std::string& lMsg,
const direction_t& lDirection = LEFT) :
EventSendDialog(lMsg),
......
......@@ -23,7 +23,7 @@ public:
bool isFinished() { return m_finished; }
private:
CBitmap* mp_bm[6];
GsBitmap* mp_bm[6];
SDL_Surface *mp_bmp_surface;
int m_mid[6];
int m_timer;
......
......@@ -27,7 +27,7 @@ mMap(map)
bool CTitle::init(int Episode)
{
SDL_Surface *pSurface;
CBitmap *pBitmap;
GsBitmap *pBitmap;
gTimer.ResetSecondsTimer();
mTime = 10; // show the title screen for 10 secs.
pSurface = gVideoDriver.mpVideoEngine->getBlitSurface();
......
......@@ -25,8 +25,8 @@ CPassiveGalaxy::CPassiveGalaxy() :
processPonderMode(&CPassiveGalaxy::processIntro),
processRenderMode(&CPassiveGalaxy::renderIntro),
m_BackgroundBitmap(*gGraphics.getBitmapFromStr("TITLE")),
mCommanderTextSfc(gGraphics.getMiscBitmap(0)),
mKeenTextSfc(gGraphics.getMiscBitmap(1))
mCommanderTextSfc(gGraphics.getMisGsBitmap(0)),
mKeenTextSfc(gGraphics.getMisGsBitmap(1))
{
const int episode = g_pBehaviorEngine->getEpisode();
......
......@@ -34,10 +34,10 @@ public:
void (CPassiveGalaxy::*processPonderMode)();
void (CPassiveGalaxy::*processRenderMode)();
CBitmap m_BackgroundBitmap;
CBitmap mCommanderTextSfc;
CBitmap mKeenTextSfc;
CBitmap mCurrentLogoBmp;
GsBitmap m_BackgroundBitmap;
GsBitmap mCommanderTextSfc;
GsBitmap mKeenTextSfc;
GsBitmap mCurrentLogoBmp;
std::shared_ptr<SDL_Surface> mpZoomSurface;
......
......@@ -58,7 +58,7 @@ private:
CWorldMap m_WorldMap;
CLevelPlay m_LevelPlay;
CSaveGameController &m_SavedGame;
CBitmap m_BackgroundBitmap;
GsBitmap m_BackgroundBitmap;
std::list< std::shared_ptr<CMessageBoxGalaxy> > mMessageBoxes;
stCheat m_Cheatmode;
......
......@@ -300,7 +300,7 @@ void CGalaxySpriteObject::setActionSprite()
if(sprite >= 0)
{
CSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
oldBoxY2 = rSprite.m_bboxY2;
oldBoxY1 = rSprite.m_bboxY1;
}
......@@ -312,7 +312,7 @@ void CGalaxySpriteObject::setActionSprite()
// Check the lower box for better collisions and move the sprite whether needed
CSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
int newBoxY2 = rSprite.m_bboxY2;
int newBoxY1 = rSprite.m_bboxY1;
......
......@@ -52,7 +52,7 @@ void CStatusScreenGalaxy::drawBase(SDL_Rect &EditRect)
SDL_Rect Dest;
// Create upper stomp support
CBitmap &SupportBmp = gGraphics.getMaskedBitmap(2);
GsBitmap &SupportBmp = gGraphics.getMaskedBitmap(2);
SDL_Rect SupportRect;
SupportRect.w = SupportBmp.getSDLSurface()->w;
......@@ -70,7 +70,7 @@ void CStatusScreenGalaxy::drawBase(SDL_Rect &EditRect)
SDL_FillRect( mpStatusSurface.get(), &BackRect, 0xFFAAAAAA); //gray
// Draw the cables Bitmap
CBitmap &Cables_Bitmap = gGraphics.getMaskedBitmap(1);
GsBitmap &Cables_Bitmap = gGraphics.getMaskedBitmap(1);
SDL_Rect CableRect;
CableRect.w = Cables_Bitmap.getSDLSurface()->w;
CableRect.h = Cables_Bitmap.getSDLSurface()->h;
......@@ -79,7 +79,7 @@ void CStatusScreenGalaxy::drawBase(SDL_Rect &EditRect)
SDL_BlitSurface( Cables_Bitmap.getSDLSurface(), NULL, mpStatusSurface.get(), &Dest );
// Now draw the borders
CTilemap &Tilemap = gGraphics.getTileMap(2);
GsTilemap &Tilemap = gGraphics.getTileMap(2);
// Upper Left corner
Tilemap.drawTile(mpStatusSurface.get(), BackRect.x, BackRect.y, 54);
......
......@@ -25,7 +25,7 @@ CGalaxySpriteObject(pmap, foeID, x, y, 0)
solid = false;
m_ieffect = ieffect;
CSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
int moveup = (1<<CSF)-1;
moveup -= ((rSprite.getHeight()+1)<<STC);
......
......@@ -853,7 +853,7 @@ void CPlayerLevel::processCliffClimbingUp()
{
std::vector<CTileProperties> &TileProperty = g_pBehaviorEngine->getTileProperties();
const int spriteID = getSpriteIDFromAction(A_KEEN_STAND);
CSprite &standSpr = gGraphics.getSprite(mSprVar,spriteID);
GsSprite &standSpr = gGraphics.getSprite(mSprVar,spriteID);
if( xDirection < 0 ) // left upper
......@@ -1550,7 +1550,7 @@ void CPlayerLevel::processPressUp() {
setAction(A_KEEN_ENTER_DOOR);
setActionSprite();
CSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
// Here the Player will be snapped to the center
......@@ -1589,7 +1589,7 @@ void CPlayerLevel::processPressUp() {
setAction(A_KEEN_ENTER_DOOR);
setActionSprite();
CSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
// Here the Player will be snapped to the center
......
......@@ -987,7 +987,7 @@ bool CPlayerWM::finishLevel(const int object)
VectorD2<Uint32> src(getXPosition(), getYPosition());
// Here we move the coordinates in order get it positioned correctly in the pole
CSprite &FlagSprite = gGraphics.getSprite(mSprVar,WAVING_BASEFRAME);
GsSprite &FlagSprite = gGraphics.getSprite(mSprVar,WAVING_BASEFRAME);
unsigned int csfX = (x<<CSF);
unsigned int csfY = (y<<CSF);
......
......@@ -9,8 +9,8 @@
* Both item types exist altough I think we really don't need items, oh well...
*/
#ifndef CSPRITEITEM_H_
#define CSPRITEITEM_H_
#ifndef CSpriteItem_H_
#define CSpriteItem_H_
#include "engine/galaxy/common/CGalaxySpriteObject.h"
......@@ -32,4 +32,4 @@ private:
}
#endif /* CSPRITEITEM_H_ */
#endif /* CSpriteItem_H_ */
......@@ -104,7 +104,7 @@ void CStunnable::draw()
m_animation_timer++;
CSprite &StarSprite = gGraphics.getSprite(mSprVar,starSprite);
GsSprite &StarSprite = gGraphics.getSprite(mSprVar,starSprite);
int yoffset = (StarSprite.getHeight()<<STC);
int xoffset = (StarSprite.getWidth()<<STC);
......
......@@ -195,7 +195,7 @@ void CPlatform::draw()
if( sprite == BLANKSPRITE || dontdraw )
return;
CSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
scrx = (m_Pos.x>>STC)-mp_Map->m_scrollx;
scry = (m_Pos.y>>STC)-mp_Map->m_scrolly;
......@@ -224,7 +224,7 @@ void CPlatform::draw()
{
if(carriedObj)
{
CSprite &playSprite = gGraphics.getSprite(carriedObj->getSpriteVariantId(),carriedObj->sprite);
GsSprite &playSprite = gGraphics.getSprite(carriedObj->getSpriteVariantId(),carriedObj->sprite);
int distx = carriedObj->getXPosition()-getXPosition();
int disty = carriedObj->getYPosition()-getYPosition();
......
......@@ -102,7 +102,7 @@ void CPlatformHorizontal::draw()
if( dontdraw )
return;
CSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
const int sprW = Sprite.getWidth();
const int sprH = Sprite.getHeight();
......@@ -117,7 +117,7 @@ void CPlatformHorizontal::draw()
int showX = scrx+Sprite.getXOffset();
int showY = scry+Sprite.getYOffset();
CSprite &fireSprite = gGraphics.getSprite(mSprVar,m_FireSprite);
GsSprite &fireSprite = gGraphics.getSprite(mSprVar,m_FireSprite);
const int w = fireSprite.getWidth();
const int h = fireSprite.getHeight();
......@@ -136,7 +136,7 @@ void CPlatformHorizontal::draw()
if(!player)
continue;
CSprite &playSprite = gGraphics.getSprite(player->getSpriteVariantId(),player->sprite);
GsSprite &playSprite = gGraphics.getSprite(player->getSpriteVariantId(),player->sprite);
int distx = player->getXPosition()-getXPosition();
int disty = player->getYPosition()-getYPosition();
......
......@@ -120,7 +120,7 @@ void CPlatformVertical::draw()
if( dontdraw )
return;
CSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
scrx = (m_Pos.x>>STC)-mp_Map->m_scrollx;
scry = (m_Pos.y>>STC)-mp_Map->m_scrolly;
......@@ -137,8 +137,8 @@ void CPlatformVertical::draw()
if(drawFire && dimFire)
{
CSprite &fireSpriteR = gGraphics.getSprite(mSprVar,m_FireSprite);
CSprite &fireSpriteL = gGraphics.getSprite(mSprVar,m_FireSprite+2);
GsSprite &fireSpriteR = gGraphics.getSprite(mSprVar,m_FireSprite);
GsSprite &fireSpriteL = gGraphics.getSprite(mSprVar,m_FireSprite+2);
const int lw = fireSpriteL.getWidth();
const int lh = fireSpriteL.getHeight();
......@@ -156,7 +156,7 @@ void CPlatformVertical::draw()
if(!player)
continue;
CSprite &playSprite = gGraphics.getSprite(player->getSpriteVariantId(),
GsSprite &playSprite = gGraphics.getSprite(player->getSpriteVariantId(),
player->sprite);
int distx = player->getXPosition()-getXPosition();
int disty = player->getYPosition()-getYPosition();
......
......@@ -12,7 +12,7 @@
const int FONT_ID = 0;
CMessageBoxBitmapGalaxy::CMessageBoxBitmapGalaxy( const std::string& Text,
const CBitmap &BitmapRef,
const GsBitmap &BitmapRef,
const direction_t alignment ) :
CMessageBoxGalaxy(Text),
mBitmap(BitmapRef),
......
......@@ -21,7 +21,7 @@ public:
* \param Text Message to be shown
* \param BitmapId Bitmap that will be shown to the left side in the box
*/
CMessageBoxBitmapGalaxy( const std::string& Text, const CBitmap &BitmapRef,
CMessageBoxBitmapGalaxy( const std::string& Text, const GsBitmap &BitmapRef,
const direction_t alignment = LEFT );
virtual ~CMessageBoxBitmapGalaxy() {}
......@@ -29,7 +29,7 @@ public:
virtual void init();
private:
const CBitmap &mBitmap;
const GsBitmap &mBitmap;
const direction_t mAlignment;
};
......
......@@ -70,7 +70,7 @@ void CMessageBoxGalaxy::initGalaxyFrame()
rect.w -= 16;
rect.h -= 16;
CTilemap &Tilemap = gGraphics.getTileMap(3);
GsTilemap &Tilemap = gGraphics.getTileMap(3);
/// Now draw the borders
// Upper Left corner
......
......@@ -152,7 +152,7 @@ void CStatusScreenGalaxyEp4::GenerateStatus()
Font.drawFontCentered(mpStatusSurface.get(), m_Item.m_special.ep4.swimsuit ? swLine : "???", TempRect.x, TempRect.w, TempRect.y+1, false);
// Press a Key Sign
CTilemap &Tilemap = gGraphics.getTileMap(2);
GsTilemap &Tilemap = gGraphics.getTileMap(2);
TempRect.x = EditRect.x+(EditRect.w/2);
TempRect.y = EditRect.y+110;
for( int c=0 ; c<10 ; c++ )
......
......@@ -24,7 +24,7 @@ CGalaxySpriteObject(pmap, foeID, x, y, 0)
setupGalaxyObjectOnMap( 0x2378, A_ARACHNUT_WALK );
xDirection = LEFT;
CSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
performCollisions();
processMove( 0, rSprite.m_bboxY1-rSprite.m_bboxY2 );
processActionRoutine();
......
......@@ -35,7 +35,7 @@ mTimer(0)
setupGalaxyObjectOnMap( 0x21B6, A_EAGLE_HATCHED );
xDirection = LEFT;
CSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
performCollisions();
processMove( 0, rSprite.m_bboxY1-rSprite.m_bboxY2 );
processActionRoutine();
......
......@@ -39,7 +39,7 @@ mStolen(false)
setupGalaxyObjectOnMap( 0x31E2, A_SMIRKY_LOOK );
xDirection = LEFT;
CSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
processMove( 0, rSprite.m_bboxY1-rSprite.m_bboxY2 );
performCollisions();
......
......@@ -137,7 +137,7 @@ void CStatusScreenGalaxyEp5::GenerateStatus()
gGraphics.drawDigits(getRightAlignedString(itoa(m_Item.m_drops), 2), TempRect.x, TempRect.y+1, mpStatusSurface.get());
// Press a Key Sign
CTilemap &Tilemap = gGraphics.getTileMap(2);
GsTilemap &Tilemap = gGraphics.getTileMap(2);
TempRect.x = EditRect.x+(EditRect.w-80)/2;
TempRect.y = EditRect.y+110;
for( int c=0 ; c<10 ; c++ )
......
......@@ -71,8 +71,8 @@ mTimer(0)
void CShikadiMine::setEyeCenterOffset(int &x, int &y)
{
CSprite &eyeSprite = gGraphics.getSprite(mSprVar,mEyeSprite);
CSprite &spriteRef = gGraphics.getSprite(mSprVar,sprite);
GsSprite &eyeSprite = gGraphics.getSprite(mSprVar,mEyeSprite);
GsSprite &spriteRef = gGraphics.getSprite(mSprVar,sprite);
x = (spriteRef.getWidth()-eyeSprite.getWidth())/2;
y = (spriteRef.getHeight()-eyeSprite.getHeight())/2;
}
......@@ -261,8 +261,8 @@ void CShikadiMine::processChangeDir()
{
setEyeCenterOffset(mTargetEyeXOffset, mTargetEyeYOffset);
CSprite &eyeSprite = gGraphics.getSprite(mSprVar,mEyeSprite);
CSprite &spriteRef = gGraphics.getSprite(mSprVar,sprite);
GsSprite &eyeSprite = gGraphics.getSprite(mSprVar,mEyeSprite);
GsSprite &spriteRef = gGraphics.getSprite(mSprVar,sprite);
if(xDirection == LEFT)
mTargetEyeXOffset = 0;
......@@ -369,7 +369,7 @@ void CShikadiMine::draw()
if( sprite == BLANKSPRITE || dontdraw )
return;
CSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
scrx = (m_Pos.x>>STC)-mp_Map->m_scrollx;
scry = (m_Pos.y>>STC)-mp_Map->m_scrolly;
......@@ -394,7 +394,7 @@ void CShikadiMine::draw()
if(!getActionNumber(A_MINE_DETONATE))
{
CSprite &eyeSprite = gGraphics.getSprite(mSprVar,mEyeSprite);
GsSprite &eyeSprite = gGraphics.getSprite(mSprVar,mEyeSprite);
const int eyeW = eyeSprite.getWidth();
const int eyeH = eyeSprite.getHeight();
......
......@@ -142,7 +142,7 @@ void CStatusScreenGalaxyEp6::GenerateStatus()
gGraphics.drawDigits(getRightAlignedString(itoa(m_Item.m_drops), 2), TempRect.x, TempRect.y+1, mpStatusSurface.get());
// Press a Key Sign
CTilemap &Tilemap = gGraphics.getTileMap(2);
GsTilemap &Tilemap = gGraphics.getTileMap(2);
TempRect.x = EditRect.x+(EditRect.w-80)/2;
TempRect.y = EditRect.y+110;
for( int c=0 ; c<10 ; c++ )
......
......@@ -58,7 +58,7 @@ mTimer(0)
xDirection = LEFT;
// Some mods suffer the fact (Keen 8 Dead in Desert) that those foes appear embedded in the floor
CSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &rSprite = gGraphics.getSprite(mSprVar,sprite);
performCollisions();
processMove( 0, rSprite.m_bboxY1-rSprite.m_bboxY2 );
processActionRoutine();
......
......@@ -128,7 +128,7 @@ void CCeilick::draw()
if( sprite == BLANKSPRITE || dontdraw )
return;
CSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
GsSprite &Sprite = gGraphics.getSprite(mSprVar,sprite);
scrx = (m_Pos.x>>STC)-mp_Map->m_scrollx;
scry = (m_Pos.y>>STC)-mp_Map->m_scrolly;
......
......@@ -734,7 +734,7 @@ bool CEGAGraphicsGalaxy::readBitmaps()
for(size_t i = 0; i < EpisodeInfo[ep].NumBitmaps; i++)
{
CBitmap &Bitmap = gGraphics.getBitmapFromId(i);
GsBitmap &Bitmap = gGraphics.getBitmapFromId(i);
bmpRect.w = BmpHead[i].Width*8;
bmpRect.h = BmpHead[i].Height;
Bitmap.createSurface(gVideoDriver.getScrollSurface()->flags, bmpRect, Palette);
......@@ -759,14 +759,14 @@ bool CEGAGraphicsGalaxy::readMaskedBitmaps()
SDL_Color *Palette = gGraphics.Palette.m_Palette;
gGraphics.createEmptyMaskedBitmaps(EpisodeInfo[ep].NumMaskedBitmaps);
gGraphics.createEmptyMiscBitmaps(2);
gGraphics.createEmptyMisGsBitmaps(2);
SDL_Rect bmpRect;
bmpRect.x = bmpRect.y = 0;
for(size_t i = 0; i < EpisodeInfo[ep].NumMaskedBitmaps; i++)
{
CBitmap &Bitmap = gGraphics.getMaskedBitmap(i);
GsBitmap &Bitmap = gGraphics.getMaskedBitmap(i);
bmpRect.w = BmpMaskedHead[i].Width*8;
bmpRect.h = BmpMaskedHead[i].Height;
......@@ -781,7 +781,7 @@ bool CEGAGraphicsGalaxy::readMaskedBitmaps()
bool CEGAGraphicsGalaxy::readTilemaps( size_t NumTiles, size_t pbasetilesize,
size_t rowlength, size_t IndexOfTiles,
CTilemap &Tilemap, bool tileoff)
GsTilemap &Tilemap, bool tileoff)
{
Tilemap.CreateSurface( gGraphics.Palette.m_Palette, SDL_SWSURFACE,
NumTiles, pbasetilesize, rowlength );
......@@ -801,7 +801,7 @@ bool CEGAGraphicsGalaxy::readTilemaps( size_t NumTiles, size_t pbasetilesize,
bool CEGAGraphicsGalaxy::readMaskedTilemaps( size_t NumTiles, size_t pbasetilesize,
size_t rowlength, size_t IndexOfTiles,
CTilemap &Tilemap, bool tileoff)
GsTilemap &Tilemap, bool tileoff)
{
Tilemap.CreateSurface( gGraphics.Palette.m_Palette, SDL_SWSURFACE,
NumTiles, pbasetilesize, rowlength );
......@@ -840,7 +840,7 @@ bool CEGAGraphicsGalaxy::readSprites( size_t NumSprites, size_t IndexSprite )
SpriteHeadStruct Head = SprHead[i];
std::vector<unsigned char> &data = m_egagraph.at(IndexSprite + i).data;
CSprite &Sprite = gGraphics.getSprite(0,i);
GsSprite &Sprite = gGraphics.getSprite(0,i);
Sprite.setSize( Head.Width*8, Head.Height );
Sprite.setOffset( Head.OrgX>>(TILE_S), Head.OrgY>>(TILE_S) );
......@@ -1043,7 +1043,7 @@ bool CEGAGraphicsGalaxy::readMiscStuff()