aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorJonathan Gray2003-07-28 09:49:46 +0000
committerJonathan Gray2003-07-28 09:49:46 +0000
commitf22cca2be21035760c6b2cfb72ad4e1ba5a08182 (patch)
treee588774ea7e4ebaee6b013066fabe3a5eb3af6e7 /sword2
parent84bccaa83b996ef49fbedf6bb52bb64e9f3c5fd4 (diff)
downloadscummvm-rg350-f22cca2be21035760c6b2cfb72ad4e1ba5a08182.tar.gz
scummvm-rg350-f22cca2be21035760c6b2cfb72ad4e1ba5a08182.tar.bz2
scummvm-rg350-f22cca2be21035760c6b2cfb72ad4e1ba5a08182.zip
rename _DEBUG define to _BS2_DEBUG to stop it conflicting with VC
svn-id: r9237
Diffstat (limited to 'sword2')
-rw-r--r--sword2/anims.cpp42
-rw-r--r--sword2/build_display.cpp46
-rw-r--r--sword2/build_display.h2
-rw-r--r--sword2/console.cpp4
-rw-r--r--sword2/console.h6
-rw-r--r--sword2/debug.cpp8
-rw-r--r--sword2/debug.h6
-rw-r--r--sword2/driver/driver96.h2
-rw-r--r--sword2/function.cpp8
-rw-r--r--sword2/icons.cpp2
-rw-r--r--sword2/interpreter.h6
-rw-r--r--sword2/layers.cpp6
-rw-r--r--sword2/logic.cpp2
-rw-r--r--sword2/maketext.cpp8
-rw-r--r--sword2/mouse.cpp20
-rw-r--r--sword2/protocol.cpp10
-rw-r--r--sword2/resman.cpp12
-rw-r--r--sword2/router.cpp10
-rw-r--r--sword2/save_rest.cpp2
-rw-r--r--sword2/sound.cpp16
-rw-r--r--sword2/speech.cpp40
-rw-r--r--sword2/startup.cpp2
-rw-r--r--sword2/sword2.cpp32
23 files changed, 146 insertions, 146 deletions
diff --git a/sword2/anims.cpp b/sword2/anims.cpp
index 7b3a7d17b7..69f0144078 100644
--- a/sword2/anims.cpp
+++ b/sword2/anims.cpp
@@ -107,7 +107,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
_animHeader *anim_head;
int32 res = params[2];
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
_standardHeader *head; // for animation testing & checking for correct file type
#endif
@@ -123,7 +123,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
if (ob_logic->looping==0)
{
//-----------------------------------------------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
// For testing all anims! (James18apr97)
// A script loop can send every resource number to the anim function
// & it will only run the valid ones
@@ -153,7 +153,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
//-----------------------------------------------------------
//---------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
// check that we haven't been passed a zero resource number
if (res==0)
Con_fatal_error("Animate: %s (id %d) passed zero anim resource (%s line %u)", FetchObjectName(ID), ID, __FILE__, __LINE__);
@@ -163,7 +163,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
anim_file = res_man.Res_open(res); // open anim file
//---------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
// check this this resource is actually an animation file!
head = (_standardHeader*) anim_file;
if (head->fileType!=ANIMATION_FILE) // if it's not an animation file
@@ -175,7 +175,7 @@ int32 Animate(int32 *params, uint8 reverse_flag)
//---------------------
/*
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
// check there's at least one frame
if (anim_head->noAnimFrames==0)
Con_fatal_error("Animate: %s (%d) has zero frame count! (%s line %u)", FetchObjectName(res), res, __FILE__, __LINE__);
@@ -289,12 +289,12 @@ int32 FN_set_frame(int32 *params)
_animHeader *anim_head;
int32 res = params[1];
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
_standardHeader *head; // for checking for correct file type
#endif
//---------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
// check that we haven't been passed a zero resource number
if (res==0)
Con_fatal_error("FN_set_frame: %s (id %d) passed zero anim resource (%s line %u)", FetchObjectName(ID), ID, __FILE__, __LINE__);
@@ -307,7 +307,7 @@ int32 FN_set_frame(int32 *params)
anim_file = res_man.Res_open(res); // open anim file
//---------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
// check this this resource is actually an animation file!
head = (_standardHeader*) anim_file;
if (head->fileType!=ANIMATION_FILE) // if it's not an animation file
@@ -319,7 +319,7 @@ int32 FN_set_frame(int32 *params)
//---------------------
/*
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
// check there's at least one frame
if (anim_head->noAnimFrames==0)
Con_fatal_error("FN_set_frame: %s (%d) has zero frame count! (%s line %u)", FetchObjectName(res), res, __FILE__, __LINE__);
@@ -515,7 +515,7 @@ int32 FN_add_sequence_text(int32 *params) // (James22may97)
// 1 frame number to start the text displaying
// 2 frame number to stop the text dispalying
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (sequenceTextLines == MAX_SEQUENCE_TEXT_LINES)
Con_fatal_error("FN_add_sequence_text ran out of lines (%s line %u)",__FILE__,__LINE__);
#endif
@@ -563,7 +563,7 @@ void CreateSequenceSpeech(_movieTextObject *sequenceText[]) // (James23may97)
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"(%d) SEQUENCE TEXT: %s", *(uint16*)text, text+2); // 1st word of text line is the official line number
#endif
//--------------------------------------
@@ -583,7 +583,7 @@ void CreateSequenceSpeech(_movieTextObject *sequenceText[]) // (James23may97)
strcpy(speechFile,"SPEECH.CLU");
} else {
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if ((res_man.WhichCd()==1) && (!access("speech1.clu",0))) // if 0 ie. if it's there
{
strcpy(speechFile,"speech1.clu");
@@ -593,7 +593,7 @@ void CreateSequenceSpeech(_movieTextObject *sequenceText[]) // (James23may97)
strcpy(speechFile,"speech2.clu");
}
else
- #endif // _DEBUG
+ #endif // _BS2_DEBUG
{
strcpy(speechFile,res_man.GetCdPath());
strcat(speechFile,"CLUSTERS\\SPEECH.CLU");
@@ -706,7 +706,7 @@ int32 FN_smacker_lead_in(int32 *params) // James(21july97)
{
uint8 *leadIn;
uint32 rv;
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
_standardHeader *header;
#endif
@@ -714,7 +714,7 @@ int32 FN_smacker_lead_in(int32 *params) // James(21july97)
leadIn = res_man.Res_open(params[0]);
//-----------------------------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
header = (_standardHeader*)leadIn;
if (header->fileType != WAV_FILE)
Con_fatal_error("FN_smacker_lead_in() given invalid resource (%s line %u)",__FILE__,__LINE__);
@@ -725,7 +725,7 @@ int32 FN_smacker_lead_in(int32 *params) // James(21july97)
rv = PlayFx( 0, leadIn, 0, 0, RDSE_FXLEADIN ); // wav data gets copied to sound memory
//-----------------------------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (rv)
Zdebug("SFX ERROR: PlayFx() returned %.8x (%s line %u)", rv, __FILE__, __LINE__);
#endif
@@ -755,7 +755,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
uint32 rv; // drivers return value
_movieTextObject *sequenceSpeechArray[MAX_SEQUENCE_TEXT_LINES+1];
uint8 *leadOut = NULL;
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
_standardHeader *header;
#endif
@@ -794,7 +794,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
//--------------------------------------------------
// check that the name paseed from script is 8 chars or less
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (strlen((char *)params[0]) > 8)
Con_fatal_error("Sequence filename too long (%s line %u)",__FILE__,__LINE__);
#endif
@@ -809,7 +809,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"PLAYING SEQUENCE \"%s\"", filename);
#endif
//--------------------------------------
@@ -826,7 +826,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
leadOut = res_man.Res_open(smackerLeadOut);
//---------------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
header = (_standardHeader*)leadOut;
if (header->fileType != WAV_FILE)
Con_fatal_error("FN_smacker_lead_out() given invalid resource (%s line %u)",__FILE__,__LINE__);
@@ -869,7 +869,7 @@ int32 FN_play_sequence(int32 *params) // James(09apr97)
}
//--------------------------
// check the error return-value
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (rv)
Zdebug("PlaySmacker(\"%s\") returned 0x%.8x", filename, rv);
#endif
diff --git a/sword2/build_display.cpp b/sword2/build_display.cpp
index 2005a7a71b..987eff3217 100644
--- a/sword2/build_display.cpp
+++ b/sword2/build_display.cpp
@@ -70,7 +70,7 @@ uint32 cur_fore;
uint32 cur_fgp0;
uint32 cur_fgp1;
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
uint32 largest_layer_area=0; // should be reset to zero at start of each screen change
uint32 largest_sprite_area=0; // - " -
char largest_layer_info[128] = {"largest layer: none registered"};
@@ -119,13 +119,13 @@ void Send_fore_par1_frames(void); //James23Jan97
void Build_display(void) //Tony21Sept96
{
BOOL end;
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
uint8 pal[12]={0,0,0,0,0,0,0,0,0,255,0,0};
#endif
uint8 *file;
_multiScreenHeader *screenLayerTable;
-#ifdef _DEBUG // only used by console
+#ifdef _BS2_DEBUG // only used by console
_spriteInfo spriteInfo;
uint32 rv; // drivers error return value
#endif
@@ -136,7 +136,7 @@ void Build_display(void) //Tony21Sept96
{
Start_new_palette(); // start the layer palette fading up
- #ifdef _DEBUG // (James23jun97)
+ #ifdef _BS2_DEBUG // (James23jun97)
largest_layer_area=0; // should be reset to zero at start of each screen change
largest_sprite_area=0; // - " -
#endif
@@ -283,7 +283,7 @@ void Build_display(void) //Tony21Sept96
}
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
else if (console_status)
{
spriteInfo.x = 0;
@@ -312,7 +312,7 @@ void Build_display(void) //Tony21Sept96
SetPalette(0, 3, pal, RDPAL_INSTANT); //force the palette
Print_to_console("no valid screen?");
}
-#endif // _DEBUG
+#endif // _BS2_DEBUG
}
@@ -585,7 +585,7 @@ void Process_layer(uint32 layer_number) //Tony24Sept96
_spriteInfo spriteInfo;
uint32 rv;
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
uint32 current_layer_area=0;
#endif
@@ -610,7 +610,7 @@ void Process_layer(uint32 layer_number) //Tony24Sept96
//------------------------------------------
// check for largest layer for debug info
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
current_layer_area = layer_head->width * layer_head->height;
if (current_layer_area > largest_layer_area)
@@ -640,7 +640,7 @@ void Process_image(buildit *build_unit) // (5nov96 JEL)
uint32 spriteType;
uint32 rv;
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
uint32 current_sprite_area=0;
#endif
@@ -702,7 +702,7 @@ void Process_image(buildit *build_unit) // (5nov96 JEL)
//------------------------------------------
// check for largest layer for debug info
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
current_sprite_area = frame_head->width * frame_head->height;
if (current_sprite_area > largest_sprite_area)
@@ -715,7 +715,7 @@ void Process_image(buildit *build_unit) // (5nov96 JEL)
//-----------------------------------------------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (SYSTEM_TESTING_ANIMS) // see anims.cpp
{
if ((spriteInfo.x + spriteInfo.scaledWidth) >= 639) // bring the anim into the visible screen
@@ -739,7 +739,7 @@ void Process_image(buildit *build_unit) // (5nov96 JEL)
//-----------------------------------------------------------
//--------------------------------------------------
-// #ifdef _DEBUG
+// #ifdef _BS2_DEBUG
// if (frame_head->width <= 1)
// {
// Zdebug(8,"WARNING: 1-pixel-wide frame found in %s (%d)", FetchObjectName(build_unit->anim_resource), build_unit->anim_resource);
@@ -817,7 +817,7 @@ void Register_frame(int32 *params, buildit *build_unit) // (1nov96JEL)
ob_graph = (Object_graphic *) params[1];
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (ob_graph->anim_resource == 0)
Con_fatal_error("ERROR: %s(%d) has no anim resource in Register_frame [line=%d file=%s]", FetchObjectName(ID), ID, __LINE__, __FILE__);
#endif
@@ -829,7 +829,7 @@ void Register_frame(int32 *params, buildit *build_unit) // (1nov96JEL)
frame_head = FetchFrameHeader( file, ob_graph->anim_pc );
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (ID == CUR_PLAYER_ID) // update player graphic details for on-screen debug info
{
playerGraphic.type = ob_graph->type;
@@ -891,7 +891,7 @@ void Register_frame(int32 *params, buildit *build_unit) // (1nov96JEL)
if (ob_mouse->pointer) // only if 'pointer' isn't NULL (James13feb97)
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_mouse==TOTAL_mouse_list)
Con_fatal_error("ERROR: mouse_list full [%s line %u]",__FILE__,__LINE__);
#endif
@@ -942,7 +942,7 @@ int32 FN_register_frame(int32 *params) // (27nov96 JEL)
//---------------
case BGP0_SPRITE:
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_bgp0==MAX_bgp0_sprites)
Con_fatal_error("ERROR: bgp0_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
#endif
@@ -954,7 +954,7 @@ int32 FN_register_frame(int32 *params) // (27nov96 JEL)
//---------------
case BGP1_SPRITE:
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_bgp1==MAX_bgp1_sprites)
Con_fatal_error("ERROR: bgp1_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
#endif
@@ -966,7 +966,7 @@ int32 FN_register_frame(int32 *params) // (27nov96 JEL)
//---------------
case BACK_SPRITE:
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_back==MAX_back_sprites)
Con_fatal_error("ERROR: back_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
#endif
@@ -978,7 +978,7 @@ int32 FN_register_frame(int32 *params) // (27nov96 JEL)
//---------------
case SORT_SPRITE:
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_sort==MAX_sort_sprites)
Con_fatal_error("ERROR: sort_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
#endif
@@ -992,7 +992,7 @@ int32 FN_register_frame(int32 *params) // (27nov96 JEL)
//---------------
case FORE_SPRITE:
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_fore==MAX_fore_sprites)
Con_fatal_error("ERROR: fore_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
#endif
@@ -1004,7 +1004,7 @@ int32 FN_register_frame(int32 *params) // (27nov96 JEL)
//---------------
case FGP0_SPRITE:
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_fgp0==MAX_fgp0_sprites)
Con_fatal_error("ERROR: fgp0_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
#endif
@@ -1016,7 +1016,7 @@ int32 FN_register_frame(int32 *params) // (27nov96 JEL)
//---------------
case FGP1_SPRITE:
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_fgp1==MAX_fgp1_sprites)
Con_fatal_error("ERROR: fgp1_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
#endif
@@ -1178,7 +1178,7 @@ void SetFullPalette(int32 palRes) // James17jun97
{
head = (_standardHeader*)res_man.Res_open(palRes); // open the palette file
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (head->fileType != PALETTE_FILE)
Con_fatal_error("FN_set_palette() called with invalid resource! (%s line %u)",__FILE__,__LINE__);
#endif
diff --git a/sword2/build_display.h b/sword2/build_display.h
index 84fda47aab..2fbfb3b313 100644
--- a/sword2/build_display.h
+++ b/sword2/build_display.h
@@ -58,7 +58,7 @@ extern uint32 cur_fore;
extern uint32 cur_fgp0;
extern uint32 cur_fgp1;
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
extern char largest_layer_info[128];
extern char largest_sprite_info[128];
#endif
diff --git a/sword2/console.cpp b/sword2/console.cpp
index 7ae4c1d298..66f4bd7a11 100644
--- a/sword2/console.cpp
+++ b/sword2/console.cpp
@@ -23,7 +23,7 @@
uint32 console_status=0; //0 off // LEFT IN RELEASE VERSION
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
//-----------------------------------------------------------------------------------------------------------------------
//its the console! <great>
@@ -1339,4 +1339,4 @@ void Scroll_console(void) {};
void Init_console(void) {};
void StartConsole(void) {};
-#endif // _DEBUG
+#endif // _BS2_DEBUG
diff --git a/sword2/console.h b/sword2/console.h
index f0d8dfeffd..7f68174996 100644
--- a/sword2/console.h
+++ b/sword2/console.h
@@ -23,7 +23,7 @@
#include "driver/driver96.h"
#include "memory.h"
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
void Init_console(void); //Tony9Sept96
uint32 One_console(void); //Tony12Aug96
@@ -45,7 +45,7 @@ extern uint8 grabbingSequences;
extern uint8 wantSfxDebug; // sfx debug file enabled/disabled from console
-#else // _DEBUG
+#else // _BS2_DEBUG
/*
#define Init_console NULL
#define One_console NULL
@@ -73,7 +73,7 @@ void Scroll_console(void);
//#define Var_check NULL
//#define Var_set NULL
-#endif // _DEBUG
+#endif // _BS2_DEBUG
extern uint32 console_status;
diff --git a/sword2/debug.cpp b/sword2/debug.cpp
index b308f3b7f1..9c2274fe18 100644
--- a/sword2/debug.cpp
+++ b/sword2/debug.cpp
@@ -26,7 +26,7 @@
#include "debug.h"
//--------------------------------------------------------------------------------------
-#ifdef _DEBUG // this whole file (except ExitWithReport) only included on debug versions
+#ifdef _BS2_DEBUG // this whole file (except ExitWithReport) only included on debug versions
#include <stdlib.h>
@@ -86,7 +86,7 @@ void Make_debug_text_block( char *text, int16 x, int16 y );
void Plot_cross_hair( int16 x, int16 y, uint8 pen );
void DrawRect( int16 x, int16 y, int16 x2, int16 y2, uint8 pen );
//--------------------------------------------------------------------------------------
-#endif // _DEBUG
+#endif // _BS2_DEBUG
// THIS FUNCTION STAYS IN THE RELEASE VERSION
// IN FACT, CON_FATAL_ERROR IS MAPPED TO THIS AS WELL, SO WE HAVE A MORE PRESENTABLE ERROR REPORT
@@ -113,7 +113,7 @@ void ExitWithReport(const char *format,...) // (6dec96 JEL)
exit(0);
}
-#ifdef _DEBUG // all other functions only for _DEBUG version
+#ifdef _BS2_DEBUG // all other functions only for _BS2_DEBUG version
//--------------------------------------------------------------------------------------
void Zdebug(const char *format,...) //Tony's special debug logging file March96
{
@@ -550,5 +550,5 @@ void Print_current_info(void) //Tony30Oct96
void Draw_debug_graphics(void) {};
-#endif // _DEBUG
+#endif // _BS2_DEBUG
//--------------------------------------------------------------------------------------
diff --git a/sword2/debug.h b/sword2/debug.h
index 7e8a7d49e2..a9593d6198 100644
--- a/sword2/debug.h
+++ b/sword2/debug.h
@@ -21,7 +21,7 @@
#define D_DEBUG
//--------------------------------------------------------------------------------------
-#ifdef _DEBUG // this whole file only included on debug versions
+#ifdef _BS2_DEBUG // this whole file only included on debug versions
//#include "src\driver96.h"
@@ -69,7 +69,7 @@ void Draw_debug_graphics(void); // James's debug graphics display
void Print_current_info(void); //Tony30Oct96
-#else // ie. not _DEBUG
+#else // ie. not _BS2_DEBUG
/* gcc doesn't like this - khalek
#define Zdebug NULL
@@ -82,7 +82,7 @@ void Zdebug(const char * ,...); // Tony's special debug logging file March96
void Build_debug_text(void); // James's debug text display
void Draw_debug_graphics(void); // James's debug graphics display
-#endif // _DEBUG // this whole file only included on debug versions
+#endif // _BS2_DEBUG // this whole file only included on debug versions
//--------------------------------------------------------------------------------------
void ExitWithReport(const char *format,...); // (6dec96 JEL) IN BOTH DEBUG & RELEASE VERSIONS
diff --git a/sword2/driver/driver96.h b/sword2/driver/driver96.h
index feafecd619..f3fe9db324 100644
--- a/sword2/driver/driver96.h
+++ b/sword2/driver/driver96.h
@@ -1627,7 +1627,7 @@ extern void SVM_GetModuleFileName(void *module, char *destStr, uint32 maxLen);
//-----------------------------------------------------------------------------
// Macro for reporting a non-fatal driver error
//-----------------------------------------------------------------------------
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
static int32 rderror;
#define Driver(f) \
if (rderror = f) \
diff --git a/sword2/function.cpp b/sword2/function.cpp
index e6d4656b0f..48b06f0812 100644
--- a/sword2/function.cpp
+++ b/sword2/function.cpp
@@ -284,7 +284,7 @@ int32 FN_flash(int32 *params) // (James14feb97)
{
// params 0: colour to flash
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
uint32 count;
@@ -315,7 +315,7 @@ int32 FN_flash(int32 *params) // (James14feb97)
SetPalette(0, 1, black, RDPAL_INSTANT);
-#endif // _DEBUG
+#endif // _BS2_DEBUG
return(IR_CONT);
}
@@ -327,7 +327,7 @@ int32 FN_colour(int32 *params) // (James14feb97)
{
// params 0: colour (see defines above)
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
switch (params[0]) // what colour?
{
@@ -352,7 +352,7 @@ int32 FN_colour(int32 *params) // (James14feb97)
break;
}
-#endif // _DEBUG
+#endif // _BS2_DEBUG
return(IR_CONT);
}
diff --git a/sword2/icons.cpp b/sword2/icons.cpp
index 6d0e776110..0671fe26e7 100644
--- a/sword2/icons.cpp
+++ b/sword2/icons.cpp
@@ -44,7 +44,7 @@ int32 FN_add_menu_object(int32 *params) //Tony1Oct96
// Zdebug("FN_add_menu_object icon res");
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (total_temp == TOTAL_engine_pockets)
Con_fatal_error("TOTAL_engine_pockets exceeded! (%s line %u)",__FILE__,__LINE__);
#endif
diff --git a/sword2/interpreter.h b/sword2/interpreter.h
index f43a196fae..a996dfcb19 100644
--- a/sword2/interpreter.h
+++ b/sword2/interpreter.h
@@ -30,19 +30,19 @@
extern int g_debugFlag;
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
#define DEBUG1(x,y) if(g_debugFlag){engine.AddTextLine(CVString(x,y),VS_COL_DEBUG);}
#define DEBUG2(x,y,z) if(g_debugFlag){engine.AddTextLine(CVString(x,y,z),VS_COL_DEBUG);}
#define DEBUG3(x,y,z,a) if(g_debugFlag){engine.AddTextLine(CVString(x,y,z,a),VS_COL_DEBUG);}
-#else //_DEBUG
+#else //_BS2_DEBUG
#define DEBUG1
#define DEBUG2
#define DEBUG3
-#endif //_DEBUG
+#endif //_BS2_DEBUG
#else //INSIDE_LINC
diff --git a/sword2/layers.cpp b/sword2/layers.cpp
index 68cde27e85..d4286a895b 100644
--- a/sword2/layers.cpp
+++ b/sword2/layers.cpp
@@ -65,7 +65,7 @@ int32 FN_init_background(int32 *params) //Tony11Sept96
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"=====================================");
Zdebug(0,"CHANGED TO LOCATION \"%s\"", FetchObjectName(*params));
Zdebug(0,"=====================================");
@@ -80,14 +80,14 @@ int32 FN_init_background(int32 *params) //Tony11Sept96
Clear_fx_queue(); // stops all fx & clears the queue (James22july97)
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
Zdebug("FN_init_background(%d)", *params);
if (!*params)
{
Con_fatal_error("ERROR: FN_set_background cannot have 0 for background layer id! (%s line=%u)",__FILE__,__LINE__);
}
-#endif // _DEBUG
+#endif // _BS2_DEBUG
//-------------------------------------------------------
diff --git a/sword2/logic.cpp b/sword2/logic.cpp
index 167cf9dc17..db0f2e280b 100644
--- a/sword2/logic.cpp
+++ b/sword2/logic.cpp
@@ -401,7 +401,7 @@ int32 FN_add_to_kill_list(int32 *params) //James9jan97
if (entry == kills) // if this ID isn't already in the list, then add it, (otherwise finish) (05mar97 James)
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (kills == OBJECT_KILL_LIST_SIZE) // no room at the inn
Con_fatal_error("List full in FN_add_to_kill_list(%u) (%s line %u)",ID,__FILE__,__LINE__);
#endif
diff --git a/sword2/maketext.cpp b/sword2/maketext.cpp
index 617565892a..ddb6313b94 100644
--- a/sword2/maketext.cpp
+++ b/sword2/maketext.cpp
@@ -284,7 +284,7 @@ mem* BuildTextSprite( uint8 *sentence, uint32 fontRes, uint8 pen, _lineInfo *lin
{
charPtr = FindChar( sentence[pos++], charSet );
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if ((charPtr->height) != charHeight)
Con_fatal_error("FONT ERROR: '%c' is not same height as the space (%s line %u)",sentence[pos-1],__FILE__,__LINE__);
#endif
@@ -425,11 +425,11 @@ void CopyChar( _frameHeader *charPtr, uint8 *spritePtr, uint16 spriteWidth, uint
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
#define MAX_text_blocs MAX_DEBUG_TEXT_BLOCKS+1 // allow enough for all the debug text blocks (see debug.cpp)
#else
#define MAX_text_blocs 2 // only need one for speech, and possibly one for "PAUSED"
-#endif // _DEBUG
+#endif // _BS2_DEBUG
typedef struct
{
@@ -469,7 +469,7 @@ uint32 Build_new_block(uint8 *ascii, int16 x, int16 y, uint16 width, uint8 pen,
while((j<MAX_text_blocs)&&(text_sprite_list[j].text_mem))
j++;
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (j==MAX_text_blocs) //we've run out
Con_fatal_error("Build_new_block ran out of blocks! (%s line %u)",__FILE__,__LINE__); //might as well stop the system
#endif
diff --git a/sword2/mouse.cpp b/sword2/mouse.cpp
index 003b91b15d..4ace612770 100644
--- a/sword2/mouse.cpp
+++ b/sword2/mouse.cpp
@@ -392,7 +392,7 @@ void Drag_mouse(void) //Tony21Nov96
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"USED \"%s\" ICON ON %s", FetchObjectName(OBJECT_HELD), FetchObjectName(CLICKED_ID));
#endif
//--------------------------------------
@@ -429,7 +429,7 @@ void Drag_mouse(void) //Tony21Nov96
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"USED \"%s\" ICON ON \"%s\" ICON", FetchObjectName(OBJECT_HELD), FetchObjectName(COMBINE_BASE));
#endif
//--------------------------------------
@@ -488,7 +488,7 @@ void Top_menu_mouse(void) //Tony3Oct96
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"RIGHT-CLICKED ON \"%s\" ICON", FetchObjectName(OBJECT_HELD));
#endif
//--------------------------------------
@@ -600,7 +600,7 @@ void Normal_mouse(void) //Tony30Sept96
me = MouseEvent(); //get mouse event
//-----------------------------------------------------
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (definingRectangles)
{
if (draggingRectangle==0) // not yet dragging a rectangle, so need click to start
@@ -633,7 +633,7 @@ void Normal_mouse(void) //Tony30Sept96
}
}
else
-#endif // _DEBUG
+#endif // _BS2_DEBUG
//-----------------------------------------------------
{
@@ -697,7 +697,7 @@ void Normal_mouse(void) //Tony30Sept96
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (OBJECT_HELD)
Zdebug(0,"USED \"%s\" ICON ON %s", FetchObjectName(OBJECT_HELD), FetchObjectName(CLICKED_ID));
else if (LEFT_BUTTON)
@@ -1170,7 +1170,7 @@ void No_human(void) //Tony4June97
int32 FN_add_human(int32 *params) //Tony30Sept96
{
//param none
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
uint8 black[4] = {0,0,0,0};
uint8 white[4] = {255,255,255,0};
#endif // ('0' means don't print to console, but console isn't up anyway)
@@ -1215,7 +1215,7 @@ int32 FN_add_human(int32 *params) //Tony30Sept96
//----------------------------------------------------------------------------------------------
// enabled/disabled from console; status printed with on-screen debug info
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (testingSnR) // testing logic scripts by simulating an instant Save & Restore
{
SetPalette(0, 1, white, RDPAL_INSTANT);
@@ -1249,7 +1249,7 @@ int32 FN_register_mouse(int32 *params) //Tony29Oct96
if (ob_mouse->pointer) // only if 'pointer' isn't NULL
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_mouse==TOTAL_mouse_list)
Con_fatal_error("ERROR: mouse_list full [%s line %u]",__FILE__,__LINE__);
#endif
@@ -1290,7 +1290,7 @@ int32 FN_register_pointer_text(int32 *params) // James16jun97
{
// param 0 local id of text line to use as pointer text
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (cur_mouse==TOTAL_mouse_list)
Con_fatal_error("ERROR: mouse_list full [%s line %u]",__FILE__,__LINE__);
#endif
diff --git a/sword2/protocol.cpp b/sword2/protocol.cpp
index ab942f6dbb..857036f809 100644
--- a/sword2/protocol.cpp
+++ b/sword2/protocol.cpp
@@ -82,7 +82,7 @@ _layerHeader *FetchLayerHeader(uint8 *screenFile, uint16 layerNo) //Chris 04Oct9
screenHead = FetchScreenHeader(screenFile);
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (layerNo > (screenHead->noLayers-1)) // layer number too large!
Con_fatal_error("FetchLayerHeader(%d) invalid layer number! (%s line %u)",layerNo,__FILE__,__LINE__);
#endif
@@ -123,7 +123,7 @@ _cdtEntry *FetchCdtEntry(uint8 *animFile, uint16 frameNo) // Chris 09Oct96
animHead = FetchAnimHeader(animFile);
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (frameNo > (animHead->noAnimFrames-1)) // frame number too large!
Con_fatal_error("FetchCdtEntry(animFile,%d) - anim only %d frames (%s line %u)",frameNo,animHead->noAnimFrames,__FILE__,__LINE__);
#endif
@@ -147,7 +147,7 @@ _parallax *FetchBackgroundParallaxLayer(uint8 *screenFile, int layer) // Chris 0
{
_multiScreenHeader *mscreenHeader = (_multiScreenHeader *) (screenFile + sizeof(_standardHeader));
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (mscreenHeader->bg_parallax[layer] == 0)
Con_fatal_error("FetchBackgroundParallaxLayer(%d) - No parallax layer exists (%s line %u)",layer,__FILE__,__LINE__);
#endif
@@ -159,7 +159,7 @@ _parallax *FetchBackgroundLayer(uint8 *screenFile) // Chris 04Oct96
{
_multiScreenHeader *mscreenHeader = (_multiScreenHeader *) (screenFile + sizeof(_standardHeader));
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (mscreenHeader->screen == 0)
Con_fatal_error("FetchBackgroundLayer (%d) - No background layer exists (%s line %u)",__FILE__,__LINE__);
#endif
@@ -171,7 +171,7 @@ _parallax *FetchForegroundParallaxLayer(uint8 *screenFile, int layer) // Chris 0
{
_multiScreenHeader *mscreenHeader = (_multiScreenHeader *) (screenFile + sizeof(_standardHeader));
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (mscreenHeader->fg_parallax[layer] == 0)
Con_fatal_error("FetchForegroundParallaxLayer(%d) - No parallax layer exists (%s line %u)",layer,__FILE__,__LINE__);
#endif
diff --git a/sword2/resman.cpp b/sword2/resman.cpp
index e3fa62083d..ec1ad359f4 100644
--- a/sword2/resman.cpp
+++ b/sword2/resman.cpp
@@ -306,7 +306,7 @@ uint8 *resMan::Res_open( uint32 res ) //BHTony30May96
uint32 table_offset;
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (res>=total_res_files)
Con_fatal_error("Res_open illegal resource %d (there are %d resources 0-%d)", res, total_res_files, total_res_files-1);
#endif
@@ -319,7 +319,7 @@ uint8 *resMan::Res_open( uint32 res ) //BHTony30May96
parent_res_file = res_conv_table[res*2]; //points to the number of the ascii filename
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (parent_res_file==0xffff)
Con_fatal_error("Res_open tried to open null & void resource number %d", res);
#endif
@@ -420,13 +420,13 @@ void resMan::Res_next_cycle( void ) //Tony8Feb97
{
//increment the cycle and calculate actual per-cycle memory useage
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
uint32 j;
#endif
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
current_memory_useage=0;
for (j=1;j<total_res_files;j++)
@@ -460,7 +460,7 @@ void resMan::Res_close( uint32 res ) //Tony30May96
//resource floats when count=0
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (res>=total_res_files)
Con_fatal_error("Res_closeing illegal resource %d (there are %d resources 0-%d)", res, total_res_files, total_res_files-1);
@@ -742,7 +742,7 @@ void resMan::Kill_res(uint8 *input) //Tony23Oct96
res = atoi((char*)input);
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (!res)
Print_to_console("illegal resource");
diff --git a/sword2/router.cpp b/sword2/router.cpp
index 6fa7d02a09..0b50fc0d9e 100644
--- a/sword2/router.cpp
+++ b/sword2/router.cpp
@@ -319,7 +319,7 @@ void AllocateRouteMem(void)
{
slotNo++;
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (slotNo == TOTAL_ROUTE_SLOTS)
Con_fatal_error("ERROR: route_slots[] full in AllocateRouteMem() (%s line %u)",__FILE__,__LINE__);
#endif
@@ -722,7 +722,7 @@ int32 SmoothestPath()
options = NewCheck(1, route[p].x, route[p].y, route[p + 1].x, route[p + 1].y);
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (options == 0)
{
Zdebug("BestTurns fail %d %d %d %d",route[p].x, route[p].y, route[p + 1].x, route[p + 1].y);
@@ -756,7 +756,7 @@ int32 SmoothestPath()
#endif
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (steps == 0)
{
Zdebug("BestTurns failed %d %d %d %d",route[p].x, route[p].y, route[p + 1].x, route[p + 1].y);
@@ -1459,7 +1459,7 @@ void SlidyWalkAnimator(_walkData *walkAnim)
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (lastRealDir == 99)
{
Con_fatal_error("SlidyWalkAnimatorlast direction error (%s line %u)",__FILE__,__LINE__);
@@ -2988,7 +2988,7 @@ void LoadWalkGrid(void)
//-------------------------------
// check that we're not going to exceed the max allowed in the complete walkgrid arrays
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if ((nbars+theseBars) >= O_GRID_SIZE)
Con_fatal_error("Adding walkgrid(%d): %d+%d bars exceeds max %d (%s line %u)", walkGridList[entry], nbars, theseBars, O_GRID_SIZE, __FILE__, __LINE__);
diff --git a/sword2/save_rest.cpp b/sword2/save_rest.cpp
index 9fc37138f9..600c7e427b 100644
--- a/sword2/save_rest.cpp
+++ b/sword2/save_rest.cpp
@@ -367,7 +367,7 @@ uint32 RestoreFromBuffer(mem *buffer, uint32 size)
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"*************************************");
Zdebug(0,"RESTORED GAME \"%s\"", header.description);
Zdebug(0,"*************************************");
diff --git a/sword2/sound.cpp b/sword2/sound.cpp
index 0964f9d093..2bf4b98d02 100644
--- a/sword2/sound.cpp
+++ b/sword2/sound.cpp
@@ -144,7 +144,7 @@ void Trigger_fx(uint8 j) // called from Process_fx_queue only
rv = PlayFx( id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXLOOP ); // looped
}
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (rv)
Zdebug("SFX ERROR: PlayFx() returned %.8x (%s line %u)", rv, __FILE__, __LINE__);
#endif
@@ -172,7 +172,7 @@ int32 FN_play_fx(int32 *params) // called from script only
uint32 rv;
//----------------------------------
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
_standardHeader *header;
char type[10];
@@ -201,7 +201,7 @@ int32 FN_play_fx(int32 *params) // called from script only
Zdebug("SFX (sample=\"%s\", vol=%d, pan=%d, delay=%d, type=%s)", FetchObjectName(params[0]), params[3], params[4], params[2], type);
}
- #endif //_DEBUG
+ #endif //_BS2_DEBUG
//----------------------------------
while ((j < FXQ_LENGTH) && (fxq[j].resource != 0))
@@ -228,7 +228,7 @@ int32 FN_play_fx(int32 *params) // called from script only
if (fxq[j].type == FX_SPOT) // spot fx
{
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
data = res_man.Res_open(fxq[j].resource); // "pre-load" the sample; this gets it into memory
header = (_standardHeader*)data;
if (header->fileType != WAV_FILE)
@@ -244,7 +244,7 @@ int32 FN_play_fx(int32 *params) // called from script only
data = res_man.Res_open(fxq[j].resource); // load in the sample
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
header = (_standardHeader*)data;
if (header->fileType != WAV_FILE)
Con_fatal_error("FN_play_fx given invalid resource (%s line %u)",__FILE__,__LINE__);
@@ -253,7 +253,7 @@ int32 FN_play_fx(int32 *params) // called from script only
data += sizeof(_standardHeader);
rv = OpenFx(id,data); // copy it to sound memory, using position in queue as 'id'
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (rv)
Zdebug("SFX ERROR: OpenFx() returned %.8x (%s line %u)", rv, __FILE__, __LINE__);
#endif
@@ -323,7 +323,7 @@ int32 FN_stop_fx(int32 *params) // called from script only
id = (uint32)j+1; // because 0 is not a valid id
rv = CloseFx(id); // stop fx & remove sample from sound memory
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (rv)
Zdebug("SFX ERROR: CloseFx() returned %.8x (%s line %u)", rv, __FILE__, __LINE__);
#endif
@@ -417,7 +417,7 @@ int32 FN_play_music(int32 *params) // updated by James on 10apr97
rv = StreamCompMusic(filename, params[0], loopFlag);
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (rv)
Zdebug("ERROR: StreamCompMusic(%s, %d, %d) returned error 0x%.8x", filename, params[0], loopFlag, rv);
#endif
diff --git a/sword2/speech.cpp b/sword2/speech.cpp
index fe1979b4a4..91fc89278c 100644
--- a/sword2/speech.cpp
+++ b/sword2/speech.cpp
@@ -94,7 +94,7 @@ void Form_text(int32 *params); //Tony18Oct96
BOOL Is_anim_boxed(uint32 res); //Tony20Oct96
uint8 WantSpeechForLine(uint32 wavId); // James (29july97)
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
void GetCorrectCdForSpeech(int32 wavId); // for testing speech & text
#endif
@@ -257,7 +257,7 @@ int32 FN_choose(int32 *params) //Tony19Nov96
{
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"----------------------");
Zdebug(0,"Icons available:");
#endif
@@ -267,7 +267,7 @@ int32 FN_choose(int32 *params) //Tony19Nov96
{
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"%s", FetchObjectName(subject_list[j].res));
#endif
//--------------------------------------
@@ -282,7 +282,7 @@ int32 FN_choose(int32 *params) //Tony19Nov96
//--------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug(0,"Selected: %s", FetchObjectName(subject_list[hit].res));
Zdebug(0,"----------------------");
#endif
@@ -1350,7 +1350,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
char speechFile[256];
static uint8 cycle_skip=0;
- #ifdef _DEBUG // (James26jun97)
+ #ifdef _BS2_DEBUG // (James26jun97)
_standardHeader *head; // for text/speech testing & checking for correct file type
static uint32 currentTextResource=0; // for text/speech testing - keeping track of text resource currently being tested
#endif
@@ -1396,7 +1396,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
//-------------------------
//-----------------------------------------------------------
- #ifdef _DEBUG // (James26jun97)
+ #ifdef _BS2_DEBUG // (James26jun97)
textNumber = params[S_TEXT]; // for debug info
@@ -1437,10 +1437,10 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
}
}
- #endif // _DEBUG
+ #endif // _BS2_DEBUG
//-----------------------------------------------------------
// pull out the text line to get the official text number (for wav id)
- // Once the wav id's go into all script text commands, we'll only need this for _DEBUG
+ // Once the wav id's go into all script text commands, we'll only need this for _BS2_DEBUG
text_res = params[S_TEXT]/SIZE;
local_text = params[S_TEXT]&0xffff;
@@ -1452,7 +1452,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
res_man.Res_close(text_res); // now ok to close the text file
//--------------------------------------
- #ifdef _DEBUG // (James09jul97)
+ #ifdef _BS2_DEBUG // (James09jul97)
// prevent dud lines from appearing while testing text & speech
// since these will not occur in the game anyway
@@ -1466,7 +1466,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
}
}
- #endif // _DEBUG
+ #endif // _BS2_DEBUG
//--------------------------------------
// set the 'looping_flag' & the text-click-delay
@@ -1477,7 +1477,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
//----------------------------------------------------------
// Write to walkthrough file (zebug0.txt)
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (PLAYER_ID!=CUR_PLAYER_ID) // if (player_id != george), then player is controlling Nico
Zdebug(0,"(%d) Nico: %s", officialTextNumber, text+2); // so write 'Nico' instead of George
else // ok, it's George anyway
@@ -1547,7 +1547,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
else if (speech_pan>16)
speech_pan=16;
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (SYSTEM_TESTING_TEXT) // if we're testing text & speech
{
// if we've moved onto a new text resource, we will want to check
@@ -1569,13 +1569,13 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
strcpy(speechFile,"SPEECH.CLU");
else {
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if ((res_man.WhichCd()==1) && (!access("speech1.clu",0))) { // if 0 ie. if it's there
strcpy(speechFile,"speech1.clu");
} else if ((res_man.WhichCd()==2) && (!access("speech2.clu",0))) { // if 0 ie. if it's there
strcpy(speechFile,"speech2.clu");
} else
-#endif // _DEBUG
+#endif // _BS2_DEBUG
{
strcpy(speechFile,res_man.GetCdPath());
strcat(speechFile,"CLUSTERS\\SPEECH.CLU");
@@ -1590,7 +1590,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
speechRunning=1; // ok, we've got something to play (2 means not playing yet - see below)
UnpauseSpeech(); // set it playing now (we might want to do this next cycle, don't know yet)
}
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
else
{
Zdebug("ERROR: PlayCompSpeech(speechFile=\"%s\", wav=%d (res=%d pos=%d)) returned %.8x", speechFile, params[S_WAV], text_res, local_text, rv);
@@ -1672,7 +1672,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
//-----------------------------------------------------------------------
// ok, all is running along smoothly - but a click means stop unnaturally
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if ((SYSTEM_TESTING_TEXT==0)||(mousey>0)) // so that we can go to the options panel while text & speech is being tested
#endif
{
@@ -1685,7 +1685,7 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
// we ignore mouse releases
//-----------------------------------------------------------
- #ifdef _DEBUG // (James26jun97)
+ #ifdef _BS2_DEBUG // (James26jun97)
if (SYSTEM_TESTING_TEXT) // if testing text & speech
{
if (me->buttons&RD_RIGHTBUTTONDOWN) // and RB used to click past text
@@ -1730,9 +1730,9 @@ int32 FN_i_speak(int32 *params) //Tony18Oct96 (revamped by James01july97)
ob_logic->looping=0; // no longer in a script function loop
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
textNumber = 0; // reset for debug info
-#endif // _DEBUG
+#endif // _BS2_DEBUG
officialTextNumber = 0; // reset to zero, in case text line not even extracted (since this number comes from the text line)
RESULT=0; // ok (James09july97)
@@ -1909,7 +1909,7 @@ void Form_text(int32 *params) //Tony18Oct96
}
}
//------------------------------------------------------------------------------------
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
void GetCorrectCdForSpeech(int32 wavId)
{
diff --git a/sword2/startup.cpp b/sword2/startup.cpp
index 4fbe1a4999..7ecede6635 100644
--- a/sword2/startup.cpp
+++ b/sword2/startup.cpp
@@ -163,7 +163,7 @@ int32 FN_register_start_point(int32 *params) //Tony14Oct96
// Zdebug(" FN_register_start_point %d %s", params[0], params[1]);
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
if (total_startups==MAX_starts)
Con_fatal_error("ERROR: start_list full [%s line %u]",__FILE__,__LINE__);
diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp
index 292c13c45d..e51aca86c4 100644
--- a/sword2/sword2.cpp
+++ b/sword2/sword2.cpp
@@ -146,11 +146,11 @@ int32 BS2State::InitialiseGame(void)
Init_console(); // set up the console system
Zdebug("RETURNED.");
- #ifdef _DEBUG
+ #ifdef _BS2_DEBUG
Zdebug("CALLING: Init_start_menu");
Init_start_menu(); // read in all the startup information
Zdebug("RETURNED from Init_start_menu");
- #endif // _DEBUG
+ #endif // _BS2_DEBUG
@@ -241,7 +241,7 @@ void BS2State::go()
// Zdebug("[%s]", lpCmdLine);
- #ifndef _DEBUG
+ #ifndef _BS2_DEBUG
DisableQuitKey(); // so cannot use Ctrl-Q from the release versions (full game or demo)
#endif
@@ -342,7 +342,7 @@ void BS2State::go()
// check for events
parseEvents();
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (grabbingSequences && (!console_status))
GrabScreenShot();
#endif
@@ -361,7 +361,7 @@ void BS2State::go()
//-----
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (console_status)
{
if (One_console())
@@ -374,7 +374,7 @@ void BS2State::go()
if (!console_status) //not in console mode - if the console is quit we want to get a logic cycle in before
{ //the screen is build. Mostly because of first scroll cycle stuff
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (stepOneCycle) // if we've just stepped forward one cycle while the game was paused
{
PauseGame();
@@ -384,7 +384,7 @@ void BS2State::go()
if (KeyWaiting())
{
ReadKey(&c);
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if (c==27) // ESC whether paused or not
{
PauseAllSound(); // see sound.cpp
@@ -398,29 +398,29 @@ void BS2State::go()
{
UnpauseGame();
}
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
else if (toupper(c)==' ') // SPACE bar while paused = step one frame!
{
stepOneCycle=1; // step through one game cycle
UnpauseGame();
}
-#endif // _DEBUG
+#endif // _BS2_DEBUG
}
else if (toupper(c)=='P') // 'P' while not paused = pause!
{
PauseGame();
}
-#ifdef _DEBUG // frame-skipping only allowed on debug version
+#ifdef _BS2_DEBUG // frame-skipping only allowed on debug version
else if (toupper(c)=='S') // 'S' toggles speed up (by skipping display rendering)
{
renderSkip = 1 - renderSkip;
}
-#endif // _DEBUG
+#endif // _BS2_DEBUG
}
if (gamePaused==0) // skip GameCycle if we're paused
{
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
gameCycle += 1;
#endif
@@ -428,20 +428,20 @@ void BS2State::go()
break; // break out of main game loop
}
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
Build_debug_text(); // creates the debug text blocks
-#endif // _DEBUG
+#endif // _BS2_DEBUG
}
//-----
// James (24mar97)
-#ifdef _DEBUG
+#ifdef _BS2_DEBUG
if ((console_status)||(renderSkip==0)||(gameCycle%4 == 0)) // if not in console & 'renderSkip' is set, only render display once every 4 game-cycles
Build_display(); // create and flip the screen
#else
Build_display(); // create and flip the screen
-#endif // _DEBUG
+#endif // _BS2_DEBUG
}