Commit 94f2f990 authored by Gerhard Stein's avatar Gerhard Stein

More structuring

parent 224cfd7d
......@@ -19,13 +19,13 @@
#include <vector>
#include <string>
#include <map>
#include "engine/galaxy/EGAStructs.h"
#include "hardware/Configurator.h"
#include "fileio/CExeFile.h"
#include "CTileProperties.h"
#include "CPhysicsSettings.h"
#include "fileio/TypeDefinitions.h"
#include "engine/CEventContainer.h"
#include "engine/galaxy/EGAStructs.h"
#include "common/options.h"
#include "CSingleton.h"
......@@ -110,10 +110,10 @@ public:
Difficulty mDifficulty;
EpisodeInfoStruct* getEpisodeInfoStructRef(const unsigned int episode)
{ return &EpisodeInfoStruct[episode-4]; }
{ return &pEpisodeInfo[episode-4]; }
void setEpisodeInfoStructPtr(const EpisodeInfoStruct* epStruct)
{ pEpisodeInfo = epStruct; }
{ pEpisodeInfo = const_cast<EpisodeInfoStruct*>(epStruct); }
private:
......
......@@ -20,7 +20,6 @@
#include "FindFile.h"
#include "CLogFile.h"
#include "StringUtils.h"
#include "graphics/CGfxEngine.h"
#include "sdl/CVideoDriver.h"
#include "fileio/CTileLoader.h"
#include "common/CSpriteObject.h"
......@@ -36,7 +35,8 @@ namespace galaxy
// i.e. KEEN4E.EXE + 0x2E00 to EndOfFile=0x3D740
// It seems that the standard shareware KDREAMS.EXE starts at 0x1C00
static EpisodeInfoStruct EpisodeInfo[] = {
static EpisodeInfoStruct EpisodeInfo[] =
{
{ /* Episode 4 */
0x3D740, /* ExeImageSize */
0x21080, /* OffEgaHead */
......@@ -122,7 +122,7 @@ CEGAGraphics(ExeFile.getEpisode(), ExeFile.getDataDirectory()),
m_Exefile(ExeFile)
{
createBitmapsIDs();
setEpisodeInfoStructPtr(EpisodeInfo);
g_pBehaviorEngine->setEpisodeInfoStructPtr(EpisodeInfo);
}
int CEGAGraphicsGalaxy::getNumSprites()
......
......@@ -16,10 +16,11 @@
#include "../CEGAGraphics.h"
#include "../../graphics/CTilemap.h"
#include "EGAStructs.h"
namespace galaxy
{
#include "EGAStructs.h"
//
class CEGAGraphicsGalaxy : public ::CEGAGraphics
{
......
......@@ -6,7 +6,7 @@
*/
#include "CGalaxySpriteObject.h"
#include "common/CBehaviorEngine.h"
static int spriteOffset;
......@@ -32,7 +32,8 @@ mClipped(false),
m_jumpdown(false),
mEndOfAction(false)
{
spriteOffset = g_pBehaviorEngine->getEpisodeInfoStructRef(g_pBehaviorEngine->getEpisode());
EpisodeInfoStruct* eiStructPtr = g_pBehaviorEngine->getEpisodeInfoStructRef(g_pBehaviorEngine->getEpisode());
spriteOffset = eiStructPtr->IndexSprites;
}
void CGalaxySpriteObject::setupGalaxyObjectOnMap(const size_t ActionBaseOffset,
......
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