From 2fc23c85da1c69eb6a88fecf51f677bbeeca2b96 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 25 Feb 2006 00:26:14 +0000 Subject: Moved cine engine into namespace Cine svn-id: r20851 --- engines/cine/anim.cpp | 4 ++++ engines/cine/anim.h | 4 ++++ engines/cine/auto00.cpp | 4 ++++ engines/cine/auto00.h | 4 ++++ engines/cine/bg.cpp | 4 ++++ engines/cine/bg.h | 4 ++++ engines/cine/bg_list.cpp | 4 ++++ engines/cine/bg_list.h | 4 ++++ engines/cine/cine.cpp | 10 ++++++++- engines/cine/cine.h | 52 +++++++++++++++++++++---------------------- engines/cine/flip_support.cpp | 4 ++++ engines/cine/flip_support.h | 4 ++++ engines/cine/font.cpp | 4 ++++ engines/cine/font.h | 4 ++++ engines/cine/gfx.cpp | 4 ++++ engines/cine/gfx.h | 4 ++++ engines/cine/main_loop.cpp | 4 ++++ engines/cine/main_loop.h | 4 ++++ engines/cine/msg.cpp | 4 ++++ engines/cine/msg.h | 4 ++++ engines/cine/object.cpp | 4 ++++ engines/cine/object.h | 4 ++++ engines/cine/pal.cpp | 4 ++++ engines/cine/pal.h | 4 ++++ engines/cine/part.cpp | 4 ++++ engines/cine/part.h | 4 ++++ engines/cine/prc.cpp | 4 ++++ engines/cine/prc.h | 4 ++++ engines/cine/rel.cpp | 4 ++++ engines/cine/rel.h | 4 ++++ engines/cine/resource.cpp | 4 ++++ engines/cine/resource.h | 4 ++++ engines/cine/script.cpp | 4 ++++ engines/cine/script.h | 4 ++++ engines/cine/sfx_player.cpp | 4 ++++ engines/cine/sfx_player.h | 4 ++++ engines/cine/sound_driver.cpp | 4 ++++ engines/cine/sound_driver.h | 18 +++++++++------ engines/cine/texte.cpp | 4 ++++ engines/cine/texte.h | 4 ++++ engines/cine/unpack.cpp | 4 ++++ engines/cine/unpack.h | 4 ++++ engines/cine/various.cpp | 4 ++++ engines/cine/various.h | 4 ++++ 44 files changed, 209 insertions(+), 35 deletions(-) diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp index c38c2ae90e..435c6edfa8 100644 --- a/engines/cine/anim.cpp +++ b/engines/cine/anim.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + struct animHeader2Struct { uint32 field_0; uint16 width; @@ -973,3 +975,5 @@ void loadResourcesFromSave() { loadPart(part); } + +} // End of namespace Cine diff --git a/engines/cine/anim.h b/engines/cine/anim.h index 76837ba6bc..00e7e6764b 100644 --- a/engines/cine/anim.h +++ b/engines/cine/anim.h @@ -25,6 +25,8 @@ #ifndef CINE_ANIM_H_ #define CINE_ANIM_H_ +namespace Cine { + extern uint16 frameVar0; struct animHeaderStruct { @@ -63,4 +65,6 @@ void loadResource(char *animName); void loadAbs(char *resourceName, uint16 idx); void loadResourcesFromSave(); +} // End of namespace Cine + #endif diff --git a/engines/cine/auto00.cpp b/engines/cine/auto00.cpp index e50d107c14..b18b08dd3b 100644 --- a/engines/cine/auto00.cpp +++ b/engines/cine/auto00.cpp @@ -22,6 +22,8 @@ * */ +namespace Cine { + unsigned char AUT000[] = { 0x00, 0x32, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -36,3 +38,5 @@ unsigned char AUT000[] = { 0x41, 0x54, 0x00, 0x3d, 0x43, 0x49, 0x4e, 0x45, 0x4d, 0x41, 0x2e, 0x50, 0x49, 0x31, 0x00, 0x47, 0x46, 0x6f, 0x43, 0x51, 0x00, 0x1e, 0x1e, 0x43, 0x51, 0x00, }; + +} // End of namespace Cine diff --git a/engines/cine/auto00.h b/engines/cine/auto00.h index a240240d78..ec291189d6 100644 --- a/engines/cine/auto00.h +++ b/engines/cine/auto00.h @@ -25,8 +25,12 @@ #ifndef CINE_AUTO00_H_ #define CINE_AUTO00_H_ +namespace Cine { + extern unsigned char AUT000[]; #define AUT000_size sizeof(AUT000); +} // End of namespace Cine + #endif diff --git a/engines/cine/bg.cpp b/engines/cine/bg.cpp index bdcc893c91..329b9ad0ae 100644 --- a/engines/cine/bg.cpp +++ b/engines/cine/bg.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + uint16 bgVar0; void loadCtHigh(uint8 * currentPtr) { @@ -147,3 +149,5 @@ void addBackground(char *bgName, uint16 bgIdx) { gfxConvertSpriteToRaw(additionalBgTable[bgIdx], ptr + 0x22, 160, 200); } + +} // End of namespace Cine diff --git a/engines/cine/bg.h b/engines/cine/bg.h index 4c3df9240d..2a361cd293 100644 --- a/engines/cine/bg.h +++ b/engines/cine/bg.h @@ -25,6 +25,8 @@ #ifndef CINE_BG_H_ #define CINE_BG_H_ +namespace Cine { + uint8 loadBg(const char *bgName); uint8 loadCt(const char *bgName); @@ -36,4 +38,6 @@ void addBackground(char *bgName, uint16 bgIdx); extern uint16 bgVar0; +} // End of namespace Cine + #endif diff --git a/engines/cine/bg_list.cpp b/engines/cine/bg_list.cpp index 4671983997..a6669d850b 100644 --- a/engines/cine/bg_list.cpp +++ b/engines/cine/bg_list.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + void createVar9Element(int16 objIdx, int16 param); void addSpriteFilledToBGList(int16 idx) { @@ -44,3 +46,5 @@ void addSpriteFilledToBGList(int16 idx) { createVar9Element(idx, 1); } + +} // End of namespace Cine diff --git a/engines/cine/bg_list.h b/engines/cine/bg_list.h index 7022448041..be8f3af75c 100644 --- a/engines/cine/bg_list.h +++ b/engines/cine/bg_list.h @@ -25,6 +25,10 @@ #ifndef CINE_BGLIST_H_ #define CINE_BGLIST_H_ +namespace Cine { + void addSpriteFilledToBGList(int16 idx); +} // End of namespace Cine + #endif diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index edfd5dd8a4..377230d24e 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -38,6 +38,9 @@ #include "cine/cine.h" #include "cine/sound_driver.h" + +namespace Cine { + Audio::Mixer * cine_g_mixer; AdlibMusic *g_cine_adlib; @@ -45,6 +48,10 @@ static void initialize(); char *savePath; +} // End of namespace Cine + + + struct CINEGameSettings { const char *name; const char *description; @@ -179,7 +186,6 @@ int CineEngine::go() { return 0; } - } int gameType; @@ -253,3 +259,5 @@ static void initialize() { processPendingUpdates(0); } + +} // End of namespace Cine diff --git a/engines/cine/cine.h b/engines/cine/cine.h index 6273708dbe..290a23acb2 100644 --- a/engines/cine/cine.h +++ b/engines/cine/cine.h @@ -35,6 +35,28 @@ #include "base/engine.h" #include "base/gameDetector.h" +#include "cine/font.h" +#include "cine/various.h" +#include "cine/flip_support.h" +#include "cine/texte.h" +#include "cine/object.h" +#include "cine/rel.h" +#include "cine/script.h" +#include "cine/part.h" +#include "cine/prc.h" +#include "cine/main_loop.h" +#include "cine/resource.h" +#include "cine/msg.h" +#include "cine/bg.h" +#include "cine/pal.h" +#include "cine/gfx.h" +#include "cine/anim.h" +#include "cine/auto00.h" +#include "cine/unpack.h" +#include "cine/bg_list.h" +#include "cine/sfx_player.h" +#include "cine/sound_driver.h" + namespace Cine { enum CineGameId { @@ -42,7 +64,7 @@ enum CineGameId { GID_OS }; -class CineEngine : public ::Engine { +class CineEngine : public Engine { int _gameId; void errorString(const char *buf_input, char *buf_output); @@ -63,39 +85,13 @@ public: } }; -} - extern char *savePath; #define ASSERT_PTR assert #define ASSERT assert -#pragma pack(1) - #define BOOT_PRC_NAME "AUTO00.PRC" -#include "cine/font.h" -#include "cine/various.h" -#include "cine/flip_support.h" -#include "cine/texte.h" -#include "cine/object.h" -#include "cine/rel.h" -#include "cine/script.h" -#include "cine/part.h" -#include "cine/prc.h" -#include "cine/main_loop.h" -#include "cine/resource.h" -#include "cine/msg.h" -#include "cine/bg.h" -#include "cine/pal.h" -#include "cine/gfx.h" -#include "cine/anim.h" -#include "cine/auto00.h" -#include "cine/unpack.h" -#include "cine/bg_list.h" -#include "cine/sfx_player.h" -#include "cine/sound_driver.h" - enum { VAR_MOUSE_X_MODE = 253, VAR_MOUSE_X_POS = 249, @@ -105,4 +101,6 @@ enum { extern AdlibMusic *g_cine_adlib; +} // End of namespace Cine + #endif diff --git a/engines/cine/flip_support.cpp b/engines/cine/flip_support.cpp index f67095179b..2dedd34871 100644 --- a/engines/cine/flip_support.cpp +++ b/engines/cine/flip_support.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + void flipU16(uint16 * pVar) { *pVar = (((*pVar) & 0xFF) << 8) | (((*pVar) & 0xFF00) >> 8); } @@ -40,3 +42,5 @@ void flipU32(uint32 * pVar) { *pVar = (part2) | ((uint32) part1 << 16); } + +} // End of namespace Cine diff --git a/engines/cine/flip_support.h b/engines/cine/flip_support.h index 122b743294..996d44baea 100644 --- a/engines/cine/flip_support.h +++ b/engines/cine/flip_support.h @@ -25,7 +25,11 @@ #ifndef CINE_FLIPSUPPORT_H_ #define CINE_FLIPSUPPORT_H_ +namespace Cine { + void flipU16(uint16 *); void flipU32(uint32 *); +} // End of namespace Cine + #endif diff --git a/engines/cine/font.cpp b/engines/cine/font.cpp index 84cc39e0da..e1581b2502 100644 --- a/engines/cine/font.cpp +++ b/engines/cine/font.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + characterEntry fontParamTable[256] = { { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, @@ -60,3 +62,5 @@ characterEntry fontParamTable[256] = { { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0} }; + +} // End of namespace Cine diff --git a/engines/cine/font.h b/engines/cine/font.h index a9af36fbf8..1cfdbede9d 100644 --- a/engines/cine/font.h +++ b/engines/cine/font.h @@ -25,6 +25,8 @@ #ifndef CINE_FONT_H_ #define CINE_FONT_H_ +namespace Cine { + struct characterEntry { uint8 characterIdx; uint8 characterWidth; @@ -34,4 +36,6 @@ typedef struct characterEntry characterEntry; extern characterEntry fontParamTable[256]; +} // End of namespace Cine + #endif diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index d17152a950..d7bbc281e0 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + byte *screenBuffer; uint16 c_palette[256]; @@ -288,3 +290,5 @@ void drawSpriteRaw2(uint8 *spritePtr, uint8 transColor, int16 width, int16 heigh } } } + +} // End of namespace Cine diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h index ee403d74da..0f143382e1 100644 --- a/engines/cine/gfx.h +++ b/engines/cine/gfx.h @@ -25,6 +25,8 @@ #ifndef CINE_GFX_H_ #define CINE_GFX_H_ +namespace Cine { + void gfxDrawSprite(uint8 *src4, uint16 sw, uint16 sh, uint8 *dst4, int16 sx, int16 sy); extern unsigned char *page0; @@ -66,4 +68,6 @@ void drawSpriteRaw(uint8 *spritePtr, uint8 *maskPtr, int16 width, int16 height, void gfxDrawPlainBoxRaw(int16 x1, int16 y1, int16 x2, int16 y2, uint8 color, uint8 *page); void drawSpriteRaw2(uint8 *spritePtr, uint8 transColor, int16 width, int16 height, uint8 *page, int16 x, int16 y); +} // End of namespace Cine + #endif diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 7898ac456b..bb5dbb43a7 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + mouseStatusStruct mouseData; uint16 mouseRight = 0; @@ -227,3 +229,5 @@ void mainLoop(int bootScriptIdx) { closeEngine7(); closePart(); } + +} // End of namespace Cine diff --git a/engines/cine/main_loop.h b/engines/cine/main_loop.h index 91c6a6cdfa..0091808ea6 100644 --- a/engines/cine/main_loop.h +++ b/engines/cine/main_loop.h @@ -25,7 +25,11 @@ #ifndef CINE_MAINLOOP_H_ #define CINE_MAINLOOP_H_ +namespace Cine { + void mainLoop(int bootScriptIdx); void manageEvents(void); +} // End of namespace Cine + #endif diff --git a/engines/cine/msg.cpp b/engines/cine/msg.cpp index 52f18130b9..40670e7496 100644 --- a/engines/cine/msg.cpp +++ b/engines/cine/msg.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + uint16 msgVar0; void loadMsg(char *pMsgName) { @@ -73,3 +75,5 @@ void loadMsg(char *pMsgName) { } } } + +} // End of namespace Cine diff --git a/engines/cine/msg.h b/engines/cine/msg.h index 4c442a6586..326fe10e30 100644 --- a/engines/cine/msg.h +++ b/engines/cine/msg.h @@ -25,6 +25,10 @@ #ifndef CINE_MSG_H_ #define CINE_MSG_H_ +namespace Cine { + void loadMsg(char *pMsgName); +} // End of namespace Cine + #endif diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp index 894ae600d2..e0d56ce87b 100644 --- a/engines/cine/object.cpp +++ b/engines/cine/object.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + objectStruct objectTable[NUM_MAX_OBJECT]; uint16 globalVars[NUM_MAX_OBJECTDATA]; overlayHeadElement overlayHead; @@ -474,3 +476,5 @@ int16 getObjectParam(uint16 objIdx, uint16 paramIdx) { return 0; } + +} // End of namespace Cine diff --git a/engines/cine/object.h b/engines/cine/object.h index b6ab5d6750..f3373d0a97 100644 --- a/engines/cine/object.h +++ b/engines/cine/object.h @@ -25,6 +25,8 @@ #ifndef CINE_OBJECT_H_ #define CINE_OBJECT_H_ +namespace Cine { + typedef struct { int16 x; int16 y; @@ -73,4 +75,6 @@ void addObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue); void subObjectParam(uint8 objIdx, uint8 paramIdx, int16 newValue); uint8 compareObjectParam(uint8 objIdx, uint8 param1, int16 param2); +} // End of namespace Cine + #endif diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp index 6d207c72a0..dec9ab07af 100644 --- a/engines/cine/pal.cpp +++ b/engines/cine/pal.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + uint16 tempPalette[256]; uint8 colorMode256 = 0; @@ -119,3 +121,5 @@ void loadRelatedPalette(const char *fileName) { } } } + +} // End of namespace Cine diff --git a/engines/cine/pal.h b/engines/cine/pal.h index 360bb871e3..8893cac015 100644 --- a/engines/cine/pal.h +++ b/engines/cine/pal.h @@ -25,6 +25,8 @@ #ifndef CINE_PAL_H_ #define CINE_PAL_H_ +namespace Cine { + struct palEntryStruct { char name[10]; uint8 pal1[16]; @@ -41,4 +43,6 @@ extern uint8 palette256[256 * 3]; void loadRelatedPalette(const char *fileName); +} // End of namespace Cine + #endif diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp index f332089b57..ea627c9b90 100644 --- a/engines/cine/part.cpp +++ b/engines/cine/part.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + uint16 numElementInPart; uint16 partVar1; @@ -217,3 +219,5 @@ uint8 *readBundleFile(int16 foundFileIdx) { return dataPtr; } + +} // End of namespace Cine diff --git a/engines/cine/part.h b/engines/cine/part.h index 11fc4b3d47..0deb3655de 100644 --- a/engines/cine/part.h +++ b/engines/cine/part.h @@ -25,6 +25,8 @@ #ifndef CINE_PART_H_ #define CINE_PART_H_ +namespace Cine { + typedef struct { char part_name[10]; uint32 varA; /* unused */ @@ -63,4 +65,6 @@ void readFromPart(int16 idx, uint8 *dataPtr); uint8 *readBundleFile(int16 foundFileIdx); +} // End of namespace Cine + #endif diff --git a/engines/cine/prc.cpp b/engines/cine/prc.cpp index a73f045898..2151271029 100644 --- a/engines/cine/prc.cpp +++ b/engines/cine/prc.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + prcLinkedListStruct globalScriptsHead; prcLinkedListStruct objScriptList; @@ -140,3 +142,5 @@ void loadPrc(const char *pPrcName) { } } } + +} // End of namespace Cine diff --git a/engines/cine/prc.h b/engines/cine/prc.h index 0c80ef79dd..f1e8b341d4 100644 --- a/engines/cine/prc.h +++ b/engines/cine/prc.h @@ -25,6 +25,8 @@ #ifndef CINE_PRC_H_ #define CINE_PRC_H_ +namespace Cine { + struct prcLinkedListStruct { struct prcLinkedListStruct *next; int16 stack[SCRIPT_STACK_SIZE]; @@ -44,4 +46,6 @@ void resetglobalScriptsHead(void); void freePrcLinkedList(void); void loadPrc(const char *pPrcName); +} // End of namespace Cine + #endif diff --git a/engines/cine/rel.cpp b/engines/cine/rel.cpp index c9edef6efc..c89f3b9d80 100644 --- a/engines/cine/rel.cpp +++ b/engines/cine/rel.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + RelObjectScript relTable[NUM_MAX_REL]; void resetObjectScriptHead(void) { @@ -107,3 +109,5 @@ void loadRel(char *pRelName) { } #endif } + +} // End of namespace Cine diff --git a/engines/cine/rel.h b/engines/cine/rel.h index f19a621e68..d5fa96657f 100644 --- a/engines/cine/rel.h +++ b/engines/cine/rel.h @@ -25,6 +25,8 @@ #ifndef CINE_REL_H_ #define CINE_REL_H_ +namespace Cine { + struct RelObjectScript { char *data; uint16 size; @@ -42,4 +44,6 @@ void resetObjectScriptHead(void); void loadRel(char *pRelName); +} // End of namespace Cine + #endif diff --git a/engines/cine/resource.cpp b/engines/cine/resource.cpp index 452d5ab721..6d89fd9ca3 100644 --- a/engines/cine/resource.cpp +++ b/engines/cine/resource.cpp @@ -24,5 +24,9 @@ #include "cine/cine.h" +namespace Cine { + void checkDataDisk(int16 param) { } + +} // End of namespace Cine diff --git a/engines/cine/resource.h b/engines/cine/resource.h index 45160e7a25..24217dfd59 100644 --- a/engines/cine/resource.h +++ b/engines/cine/resource.h @@ -25,6 +25,10 @@ #ifndef CINE_RESOURCE_H_ #define CINE_RESOURCE_H_ +namespace Cine { + void checkDataDisk(int16 param); +} // End of namespace Cine + #endif diff --git a/engines/cine/script.cpp b/engines/cine/script.cpp index e92d545a1e..98c665f67b 100644 --- a/engines/cine/script.cpp +++ b/engines/cine/script.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + void addGfxElementA0(int16 param1, int16 param2) { overlayHeadElement *currentHead = &overlayHead; overlayHeadElement *tempHead = currentHead; @@ -3794,3 +3796,5 @@ void dumpScript(uint8 *dumpName) { } #endif + +} // End of namespace Cine diff --git a/engines/cine/script.h b/engines/cine/script.h index c289f19205..592a388a65 100644 --- a/engines/cine/script.h +++ b/engines/cine/script.h @@ -25,6 +25,8 @@ #ifndef CINE_SCRIPT_H_ #define CINE_SCRIPT_H_ +namespace Cine { + #define SCRIPT_STACK_SIZE 50 typedef struct { @@ -60,4 +62,6 @@ void executeList0(void); void purgeList1(void); void purgeList0(void); +} // End of namespace Cine + #endif diff --git a/engines/cine/sfx_player.cpp b/engines/cine/sfx_player.cpp index 45dcfa9c18..5536d78291 100644 --- a/engines/cine/sfx_player.cpp +++ b/engines/cine/sfx_player.cpp @@ -28,6 +28,8 @@ #include "cine/cine.h" +namespace Cine { + uint16 snd_eventsDelay; int snd_songIsPlaying = 0; uint8 snd_nullInstrument[] = { 0, 0 }; @@ -265,3 +267,5 @@ void snd_handlePattern(int channelNum, const uint8 *patternData) { } } } + +} // End of namespace Cine diff --git a/engines/cine/sfx_player.h b/engines/cine/sfx_player.h index 9224774101..eb48f2697d 100644 --- a/engines/cine/sfx_player.h +++ b/engines/cine/sfx_player.h @@ -25,6 +25,8 @@ #ifndef CINE_SFXPLAYER_H_ #define CINE_SFXPLAYER_H_ +namespace Cine { + typedef struct { char name[14]; uint32 offset; @@ -56,4 +58,6 @@ extern void snd_playSong(); extern void snd_handleEvents(); extern void snd_handlePattern(int channelNum, const uint8 *patternData); +} // End of namespace Cine + #endif /* _SFXPLAYER_H_ */ diff --git a/engines/cine/sound_driver.cpp b/engines/cine/sound_driver.cpp index cb8ff0d3d0..dc1525670c 100644 --- a/engines/cine/sound_driver.cpp +++ b/engines/cine/sound_driver.cpp @@ -28,6 +28,8 @@ #include "sound/mixer.h" #include "sound/fmopl.h" +namespace Cine { + uint8 snd_useAdlib = 0; uint16 snd_fadeOutCounter = 0; uint16 snd_songTicksCounter = 0; @@ -396,3 +398,5 @@ void AdlibMusic::setVolume(uint8 volume) { AdlibMusic::~AdlibMusic(void) { _mixer->setupPremix(NULL); } + +} // End of namespace Cine diff --git a/engines/cine/sound_driver.h b/engines/cine/sound_driver.h index 9717e2a760..250afa0d97 100644 --- a/engines/cine/sound_driver.h +++ b/engines/cine/sound_driver.h @@ -25,6 +25,15 @@ #ifndef CINE_SNDDRIVER_H_ #define CINE_SNDDRIVER_H_ +#include "sound/audiostream.h" +#include "sound/fmopl.h" + +namespace Audio { + class Mixer; +} + +namespace Cine { + #define ADLIB_REG_TIMER_1_DATA 2 #define ADLIB_REG_TIMER_CONTROL_FLAGS 4 #define ADLIB_REG_AM_VIBRATO_EG_KS 0x20 @@ -53,13 +62,6 @@ extern void snd_adlibDriverExit(); extern void snd_adlibDriverStopSong(); extern void snd_resetChannel(int channelNum); -#include "sound/audiostream.h" -#include "sound/fmopl.h" - -namespace Audio { - class Mixer; -} - class AdlibMusic : public AudioStream { public: AdlibMusic(Audio::Mixer * pMixer); @@ -87,4 +89,6 @@ private: void premixerCall(int16 *buf, uint len); }; +} // End of namespace Cine + #endif /* CINE_SNDDRIVER_H_ */ diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp index 277aeb07a8..c5d39a8b6c 100644 --- a/engines/cine/texte.cpp +++ b/engines/cine/texte.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + uint8 *textDataPtr; uint8 textTable[256][2][16 * 8]; @@ -73,3 +75,5 @@ void loadTextData(const char *pFileName, uint8 *pDestinationBuffer) { pFileHandle.close(); } + +} // End of namespace Cine diff --git a/engines/cine/texte.h b/engines/cine/texte.h index 73a65afde2..906858410e 100644 --- a/engines/cine/texte.h +++ b/engines/cine/texte.h @@ -25,9 +25,13 @@ #ifndef CINE_TEXTE_H_ #define CINE_TEXTE_H_ +namespace Cine { + extern uint8 *textDataPtr; extern uint8 textTable[256][2][16 * 8]; void loadTextData(const char *pFileName, uint8 *pDestinationBuffer); +} // End of namespace Cine + #endif diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index c7c4da116c..11f6772129 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + uint32 crc; // variable at 5C5A uint32 bitbucket; // dx:bx @@ -149,3 +151,5 @@ int decomp(uint8 *in, uint8 *out, int size) { return 0; } } + +} // End of namespace Cine diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index d3bff480ce..1f0c85bb3b 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -25,6 +25,10 @@ #ifndef CINE_UNPACK_H_ #define CINE_UNPACK_H_ +namespace Cine { + int decomp(uint8 *in, uint8 *out, int size); +} // End of namespace Cine + #endif diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index 7895661e6b..e4395ccd70 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -24,6 +24,8 @@ #include "cine/cine.h" +namespace Cine { + int16 allowSystemMenu = 0; int16 commandVar3[4]; @@ -2974,3 +2976,5 @@ void processUnkList(void) { currentHead = tempHead->next; } } + +} // End of namespace Cine diff --git a/engines/cine/various.h b/engines/cine/various.h index d90f767bb6..8065e662c7 100644 --- a/engines/cine/various.h +++ b/engines/cine/various.h @@ -27,6 +27,8 @@ #include "cine/cine.h" +namespace Cine { + extern int gameType; typedef char commandeType[20]; @@ -187,4 +189,6 @@ void addUnkListElement(int16 param0, int16 param1, int16 param2, int16 param3, i void resetUnkList(); void processUnkList(void); +} // End of namespace Cine + #endif -- cgit v1.2.3