projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20111007-1-src
[rocksndiamonds.git]
/
src
/
game_sp
/
Globals.c
diff --git
a/src/game_sp/Globals.c
b/src/game_sp/Globals.c
index 91c715172ee6c8c5981e8b4d5b5149b36ca07031..9ddbf2b0d3cc1787f9253ace9d4866a9e89f0602 100644
(file)
--- a/
src/game_sp/Globals.c
+++ b/
src/game_sp/Globals.c
@@
-14,12
+14,15
@@
int FieldWidth; // standard size = 60
int FieldHeight; // standard size = 24
int HeaderSize; // standard size = 96
int FieldMax, LevelMax;
int FieldHeight; // standard size = 24
int HeaderSize; // standard size = 96
int FieldMax, LevelMax;
-long FileMax;
+#if 0
+int FileMax;
+#endif
#if 1
int *PlayField16;
#if 1
int *PlayField16;
+byte *PlayField8;
// int PlayField16[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE];
// int PlayField16[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE];
-byte PlayField8[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE];
+
//
byte PlayField8[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE];
byte DisPlayField[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE];
#else
int *PlayField16;
byte DisPlayField[SP_MAX_PLAYFIELD_SIZE + SP_HEADER_SIZE];
#else
int *PlayField16;
@@
-45,7
+48,7
@@
int MurphyPosIndex, MurphyXPos, MurphyYPos;
int MurphyScreenXPos, MurphyScreenYPos;
int MurphyExplodePos, SplitMoveFlag, RedDiskReleaseMurphyPos;
int KillMurphyFlag, MurphyMoveCounter;
int MurphyScreenXPos, MurphyScreenYPos;
int MurphyExplodePos, SplitMoveFlag, RedDiskReleaseMurphyPos;
int KillMurphyFlag, MurphyMoveCounter;
-
long
YawnSleepCounter;
+
int
YawnSleepCounter;
int MurphyVarFaceLeft;
int ScratchGravity, GravityFlag;
int RedDiskReleaseFlag, MovingPictureSequencePhase;
int MurphyVarFaceLeft;
int ScratchGravity, GravityFlag;
int RedDiskReleaseFlag, MovingPictureSequencePhase;
@@
-178,11
+181,18
@@
void InitGlobals()
bPlaying = False;
menBorder = False;
bPlaying = False;
menBorder = False;
+ /* add preceding playfield buffer (as large as preceding memory area) */
PlayField16 = checked_calloc((game_sp.preceding_buffer_size +
SP_MAX_PLAYFIELD_SIZE +
SP_HEADER_SIZE) * sizeof(int));
PlayField16 = &PlayField16[game_sp.preceding_buffer_size];
PlayField16 = checked_calloc((game_sp.preceding_buffer_size +
SP_MAX_PLAYFIELD_SIZE +
SP_HEADER_SIZE) * sizeof(int));
PlayField16 = &PlayField16[game_sp.preceding_buffer_size];
+ /* add preceding playfield buffer (as large as one playfield row) */
+ PlayField8 = checked_calloc((SP_MAX_PLAYFIELD_WIDTH +
+ SP_MAX_PLAYFIELD_SIZE +
+ SP_HEADER_SIZE) * sizeof(byte));
+ PlayField8 = &PlayField8[SP_MAX_PLAYFIELD_WIDTH];
+
#if 0
/* these defaults will be changed after reading a Supaplex level file */
PlayField8 = REDIM_1D(sizeof(byte), 0, FieldMax);
#if 0
/* these defaults will be changed after reading a Supaplex level file */
PlayField8 = REDIM_1D(sizeof(byte), 0, FieldMax);