{ "game.forced_scroll_delay_value", "-1" },
{ "game.use_native_emc_graphics_engine", "false" },
+ { "game.use_native_sp_graphics_engine", "true" },
{ "game.use_masked_pushing", "false" },
{ "[player].boring_delay_fixed", "1000" },
"game.use_native_emc_graphics_engine",
&game.use_native_emc_graphics_engine
},
+ {
+ "game.use_native_sp_graphics_engine",
+ &game.use_native_sp_graphics_engine
+ },
{
"game.use_masked_pushing",
&game.use_masked_pushing
-#define COMPILE_DATE_STRING "2010-02-07 00:45"
+#define COMPILE_DATE_STRING "2010-02-07 16:03"
extern void SetBitmaps_SP(Bitmap **);
void getGraphicSource_SP(struct GraphicInfo_SP *, int, int, int, int);
+int getGraphicInfo_Delay(int);
#endif /* ENGINES_H */
/* values for graphics engine customization */
boolean use_native_emc_graphics_engine;
+ boolean use_native_sp_graphics_engine;
boolean use_masked_pushing;
int forced_scroll_delay_value;
int scroll_delay_value;
int bl, al, X, Y;
#endif
+#if 1
+ int lx = GetX(si);
+ int ly = GetY(si);
+ int graphic;
+#endif
+
if (LowByte(PlayField16[si]) != fiTerminal)
return subAnimateTerminals;
+ /* use native frame handling (undo frame incrementation in main loop) */
+ if (game.use_native_sp_graphics_engine)
+ GfxFrame[lx][ly]--;
+
bl = HighByte(PlayField16[si]);
if ((bl & 0x80) == 0x80)
bl = (bl | 0xFF00);
if (bl <= 0)
{
MovHighByte(&PlayField16[si], bl);
+
+#if 1
+ if (game.use_native_sp_graphics_engine)
+ return subAnimateTerminals;
+#else
return subAnimateTerminals;
+#endif
}
bl = -(subGetRandomNumber() & TerminalMaxCycles); // generate new random number
bl = 8;
}
+#if 1
+ graphic = (bl < 8 ? IMG_SP_TERMINAL : IMG_SP_TERMINAL_ACTIVE);
+
+ if (game.use_native_sp_graphics_engine)
+ GfxFrame[lx][ly] += getGraphicInfo_Delay(graphic);
+#endif
+
TerminalState[si] = bl;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
al = aniTerminal + bl;
X = GetStretchX(si);
Y = GetStretchY(si);
#if 1
- StretchedSprites.BltImg(X, Y,
- bl < 8 ? IMG_SP_TERMINAL : IMG_SP_TERMINAL_ACTIVE,
- FrameCounter);
+ StretchedSprites.BltImg(X, Y, graphic, GfxFrame[lx][ly]);
#else
StretchedSprites.BltEx(X, Y, al);
#endif
struct GameInfo_SP game_sp_info;
struct LevelInfo_SP native_sp_level;
+int GfxFrame[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
+
+
void InitGameEngine_SP()
{
+ int x, y;
+
game_sp_info.LevelSolved = FALSE;
game_sp_info.GameOver = FALSE;
menBorder.Checked = setup.sp_show_border_elements;
+ for (x = 0; x < SP_MAX_PLAYFIELD_WIDTH; x++)
+ for (y = 0; y < SP_MAX_PLAYFIELD_HEIGHT; y++)
+ GfxFrame[x][y] = 0;
+
InitScrollPlayfield();
#if 0
void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode)
{
byte single_player_action = action[0];
+ int x, y;
subMainGameLoop_Main(single_player_action, warp_mode);
RedrawPlayfield_SP(FALSE);
+
+ for (x = 0; x < SP_MAX_PLAYFIELD_WIDTH; x++)
+ for (y = 0; y < SP_MAX_PLAYFIELD_HEIGHT; y++)
+ GfxFrame[x][y]++;
}
extern Bitmap *sp_objects;
+extern int GfxFrame[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
+
/* ------------------------------------------------------------------------- */
/* exported functions */
getGraphicSource(graphic, frame, &g_sp->bitmap, &g_sp->src_x, &g_sp->src_y);
}
+int getGraphicInfo_Delay(int graphic)
+{
+ return graphic_info[graphic].anim_delay;
+}
+
void PlayMenuSoundExt(int sound)
{
if (sound == SND_UNDEFINED)