mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
DRACI: Reduce header interdependencies; some cleanup
svn-id: r46320
This commit is contained in:
parent
5cd176052c
commit
f3420c6372
@ -1,4 +1,3 @@
|
||||
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
@ -26,6 +25,11 @@
|
||||
|
||||
#include "draci/draci.h"
|
||||
#include "draci/animation.h"
|
||||
#include "draci/barchive.h"
|
||||
#include "draci/game.h"
|
||||
#include "draci/screen.h"
|
||||
#include "draci/sound.h"
|
||||
#include "draci/surface.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -611,4 +615,4 @@ Animation *AnimationManager::load(uint animNum) {
|
||||
return anim;
|
||||
}
|
||||
|
||||
}
|
||||
} // End of namespace Draci
|
||||
|
@ -26,9 +26,8 @@
|
||||
#ifndef DRACI_ANIMATION_H
|
||||
#define DRACI_ANIMATION_H
|
||||
|
||||
#include "draci/sprite.h"
|
||||
#include "draci/sound.h"
|
||||
#include "common/rect.h"
|
||||
#include "draci/sprite.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -56,6 +55,8 @@ enum {
|
||||
enum { kIgnoreIndex = -2 };
|
||||
|
||||
class DraciEngine;
|
||||
class Surface;
|
||||
struct SoundSample;
|
||||
|
||||
class Animation {
|
||||
|
||||
@ -215,6 +216,6 @@ private:
|
||||
int _lastIndex;
|
||||
};
|
||||
|
||||
}
|
||||
} // End of namespace Draci
|
||||
|
||||
#endif // DRACI_ANIMATION_H
|
||||
|
@ -402,6 +402,3 @@ const BAFile *BArchive::getFile(uint i) {
|
||||
}
|
||||
|
||||
} // End of namespace Draci
|
||||
|
||||
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "draci/saveload.h"
|
||||
|
||||
#include "base/plugins.h"
|
||||
#include "common/system.h"
|
||||
#include "engines/advancedDetector.h"
|
||||
#include "engines/metaengine.h"
|
||||
|
||||
|
@ -35,13 +35,17 @@
|
||||
#include "graphics/font.h"
|
||||
|
||||
#include "draci/draci.h"
|
||||
#include "draci/animation.h"
|
||||
#include "draci/barchive.h"
|
||||
#include "draci/script.h"
|
||||
#include "draci/font.h"
|
||||
#include "draci/sprite.h"
|
||||
#include "draci/screen.h"
|
||||
#include "draci/game.h"
|
||||
#include "draci/mouse.h"
|
||||
#include "draci/music.h"
|
||||
#include "draci/saveload.h"
|
||||
#include "draci/screen.h"
|
||||
#include "draci/script.h"
|
||||
#include "draci/sound.h"
|
||||
#include "draci/sprite.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
|
@ -28,21 +28,13 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "common/system.h"
|
||||
#include "engines/engine.h"
|
||||
|
||||
#include "draci/game.h"
|
||||
#include "draci/mouse.h"
|
||||
#include "draci/screen.h"
|
||||
#include "draci/font.h"
|
||||
#include "draci/script.h"
|
||||
#include "draci/barchive.h"
|
||||
#include "draci/animation.h"
|
||||
#include "draci/sound.h"
|
||||
#include "draci/music.h"
|
||||
|
||||
struct ADGameDescription;
|
||||
|
||||
class MidiDriver;
|
||||
class OSystem;
|
||||
|
||||
/**
|
||||
* This is the namespace of the Draci engine.
|
||||
*
|
||||
@ -53,6 +45,17 @@ struct ADGameDescription;
|
||||
*/
|
||||
namespace Draci {
|
||||
|
||||
class Screen;
|
||||
class Mouse;
|
||||
class Game;
|
||||
class Script;
|
||||
class AnimationManager;
|
||||
class Sound;
|
||||
class MusicPlayer;
|
||||
class Font;
|
||||
class BArchive;
|
||||
class SoundArchive;
|
||||
|
||||
class DraciEngine : public Engine {
|
||||
public:
|
||||
DraciEngine(OSystem *syst, const ADGameDescription *gameDesc);
|
||||
@ -125,4 +128,3 @@ static inline long scummvm_lround(double val) { return (long)floor(val + 0.5); }
|
||||
} // End of namespace Draci
|
||||
|
||||
#endif // DRACI_H
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "draci/draci.h"
|
||||
#include "draci/font.h"
|
||||
#include "draci/surface.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
|
@ -33,6 +33,8 @@ namespace Draci {
|
||||
extern const char * const kFontSmall;
|
||||
extern const char * const kFontBig;
|
||||
|
||||
class Surface;
|
||||
|
||||
/**
|
||||
* Default font colours. They all seem to remain constant except for the
|
||||
* first one which varies depending on the character speaking.
|
||||
|
@ -23,14 +23,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/serializer.h"
|
||||
#include "common/stream.h"
|
||||
#include "common/system.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "draci/draci.h"
|
||||
#include "draci/animation.h"
|
||||
#include "draci/game.h"
|
||||
#include "draci/barchive.h"
|
||||
#include "draci/font.h"
|
||||
#include "draci/mouse.h"
|
||||
#include "draci/screen.h"
|
||||
#include "draci/script.h"
|
||||
#include "draci/animation.h"
|
||||
#include "draci/sound.h"
|
||||
#include "draci/surface.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -1689,4 +1696,4 @@ void Room::load(int roomNum, BArchive *archive) {
|
||||
_program._length = f->_length;
|
||||
}
|
||||
|
||||
}
|
||||
} // End of namespace Draci
|
||||
|
@ -27,15 +27,16 @@
|
||||
#define DRACI_GAME_H
|
||||
|
||||
#include "common/str.h"
|
||||
#include "common/serializer.h"
|
||||
#include "draci/barchive.h"
|
||||
#include "draci/script.h"
|
||||
#include "draci/animation.h"
|
||||
#include "draci/sprite.h"
|
||||
#include "draci/walking.h"
|
||||
|
||||
namespace Common {
|
||||
class Serializer;
|
||||
}
|
||||
|
||||
namespace Draci {
|
||||
|
||||
class BArchive;
|
||||
class DraciEngine;
|
||||
|
||||
enum {
|
||||
|
@ -1,20 +1,20 @@
|
||||
MODULE := engines/draci
|
||||
|
||||
MODULE_OBJS := \
|
||||
draci.o \
|
||||
detection.o \
|
||||
barchive.o \
|
||||
script.o \
|
||||
font.o \
|
||||
saveload.o \
|
||||
sound.o \
|
||||
music.o \
|
||||
sprite.o \
|
||||
screen.o \
|
||||
surface.o \
|
||||
mouse.o \
|
||||
game.o \
|
||||
animation.o \
|
||||
barchive.o \
|
||||
detection.o \
|
||||
draci.o \
|
||||
font.o \
|
||||
game.o \
|
||||
mouse.o \
|
||||
music.o \
|
||||
saveload.o \
|
||||
screen.o \
|
||||
script.o \
|
||||
sound.o \
|
||||
sprite.o \
|
||||
surface.o \
|
||||
walking.o
|
||||
|
||||
MODULE_DIRS += \
|
||||
|
@ -27,6 +27,10 @@
|
||||
#include "draci/game.h"
|
||||
#include "draci/mouse.h"
|
||||
#include "draci/barchive.h"
|
||||
#include "draci/screen.h"
|
||||
#include "draci/sprite.h"
|
||||
|
||||
#include "graphics/cursorman.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -123,4 +127,4 @@ void Mouse::loadItemCursor(const GameItem *item, bool highlighted) {
|
||||
sp.getWidth() / 2, sp.getHeight() / 2);
|
||||
}
|
||||
|
||||
}
|
||||
} // End of namespace Draci
|
||||
|
@ -27,7 +27,6 @@
|
||||
#define DRACI_MOUSE_H
|
||||
|
||||
#include "common/events.h"
|
||||
#include "graphics/cursorman.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -75,6 +74,6 @@ private:
|
||||
DraciEngine *_vm;
|
||||
};
|
||||
|
||||
}
|
||||
} // End of namespace Draci
|
||||
|
||||
#endif // DRACI_MOUSE_H
|
||||
|
@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include "draci/draci.h"
|
||||
#include "draci/game.h"
|
||||
#include "draci/saveload.h"
|
||||
|
||||
#include "common/serializer.h"
|
||||
|
@ -24,9 +24,13 @@
|
||||
*/
|
||||
|
||||
#include "common/stream.h"
|
||||
#include "common/system.h"
|
||||
|
||||
#include "draci/draci.h"
|
||||
#include "draci/screen.h"
|
||||
#include "draci/surface.h"
|
||||
#include "draci/sprite.h"
|
||||
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -145,5 +149,3 @@ void Screen::clearScreen() {
|
||||
}
|
||||
|
||||
} // End of namespace Draci
|
||||
|
||||
|
||||
|
@ -26,8 +26,7 @@
|
||||
#ifndef DRACI_SCREEN_H
|
||||
#define DRACI_SCREEN_H
|
||||
|
||||
#include "draci/surface.h"
|
||||
#include "draci/sprite.h"
|
||||
#include "common/scummsys.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -39,6 +38,7 @@ enum ScreenParameters {
|
||||
};
|
||||
|
||||
class DraciEngine;
|
||||
class Surface;
|
||||
|
||||
class Screen {
|
||||
|
||||
|
@ -29,8 +29,15 @@
|
||||
#include "common/stack.h"
|
||||
|
||||
#include "draci/draci.h"
|
||||
#include "draci/script.h"
|
||||
#include "draci/animation.h"
|
||||
#include "draci/barchive.h"
|
||||
#include "draci/game.h"
|
||||
#include "draci/mouse.h"
|
||||
#include "draci/music.h"
|
||||
#include "draci/screen.h"
|
||||
#include "draci/script.h"
|
||||
#include "draci/sound.h"
|
||||
#include "draci/surface.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -1201,4 +1208,3 @@ void Script::runWrapper(const GPL2Program &program, uint16 offset, bool disableC
|
||||
}
|
||||
|
||||
} // End of namespace Draci
|
||||
|
||||
|
@ -27,31 +27,33 @@
|
||||
#define DRACI_SCRIPT_H
|
||||
|
||||
#include "common/array.h"
|
||||
#include "common/str.h"
|
||||
#include "common/stream.h"
|
||||
|
||||
namespace Common {
|
||||
class MemoryReadStream;
|
||||
}
|
||||
|
||||
namespace Draci {
|
||||
|
||||
/** The maximum number of parameters for a GPL command */
|
||||
const int kMaxParams = 3;
|
||||
enum {
|
||||
/** The maximum number of parameters for a GPL command */
|
||||
kMaxParams = 3,
|
||||
|
||||
kNumCommands = 55
|
||||
};
|
||||
|
||||
class DraciEngine;
|
||||
class Script;
|
||||
|
||||
enum {
|
||||
kNumCommands = 55
|
||||
};
|
||||
|
||||
typedef void (Script::*GPLHandler)(const Common::Array<int> &);
|
||||
typedef int (Script::*GPLOperatorHandler)(int, int) const;
|
||||
typedef int (Script::*GPLFunctionHandler)(int) const;
|
||||
|
||||
/**
|
||||
* Represents a single command in the GPL scripting language bytecode.
|
||||
* Each command is represented in the bytecode by a command number and a
|
||||
* subnumber.
|
||||
* Represents a single command in the GPL scripting language bytecode.
|
||||
* Each command is represented in the bytecode by a command number and a
|
||||
* subnumber.
|
||||
*/
|
||||
|
||||
enum GPL2ParameterType {
|
||||
kGPL2Num = 1,
|
||||
kGPL2Str = 2,
|
||||
|
@ -26,8 +26,9 @@
|
||||
#include "common/stream.h"
|
||||
|
||||
#include "draci/draci.h"
|
||||
#include "draci/sprite.h"
|
||||
#include "draci/font.h"
|
||||
#include "draci/sprite.h"
|
||||
#include "draci/surface.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -351,4 +352,3 @@ void Text::splitLinesLongerThan(uint maxWidth) {
|
||||
}
|
||||
|
||||
} // End of namespace Draci
|
||||
|
||||
|
@ -26,8 +26,8 @@
|
||||
#ifndef DRACI_SPRITE_H
|
||||
#define DRACI_SPRITE_H
|
||||
|
||||
#include "draci/surface.h"
|
||||
#include "draci/font.h"
|
||||
#include "common/scummsys.h"
|
||||
#include "common/rect.h"
|
||||
|
||||
namespace Draci {
|
||||
|
||||
@ -37,11 +37,15 @@ enum DrawableType {
|
||||
};
|
||||
|
||||
struct Displacement {
|
||||
int relX, relY;
|
||||
double extraScaleX, extraScaleY;
|
||||
int relX, relY;
|
||||
double extraScaleX, extraScaleY;
|
||||
};
|
||||
|
||||
extern const Displacement kNoDisplacement;
|
||||
|
||||
class Surface;
|
||||
class Font;
|
||||
|
||||
class Drawable {
|
||||
public:
|
||||
virtual void draw(Surface *surface, bool markDirty, int relX, int relY) const = 0;
|
||||
|
@ -27,8 +27,9 @@
|
||||
|
||||
#include "common/stream.h"
|
||||
|
||||
#include "draci/animation.h"
|
||||
#include "draci/draci.h"
|
||||
#include "draci/animation.h"
|
||||
#include "draci/game.h"
|
||||
#include "draci/walking.h"
|
||||
#include "draci/sprite.h"
|
||||
|
||||
@ -764,4 +765,4 @@ defaultCase:
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} // End of namespace Draci
|
||||
|
Loading…
x
Reference in New Issue
Block a user