X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2Fmain.c;h=467c82d2a2d267abea2c5275284abe3c3ec73eef;hb=572a4bab20b6f36ef1a4782094b27ac5a703a476;hp=702cb7d36e0367a7752df1e4b56cf5b4b3c304c7;hpb=148d0ad7e7ac1a97eb50de7ecbb642f36c877311;p=rocksndiamonds.git diff --git a/src/game_sp/main.c b/src/game_sp/main.c index 702cb7d3..467c82d2 100644 --- a/src/game_sp/main.c +++ b/src/game_sp/main.c @@ -3,23 +3,42 @@ #include "global.h" +struct GameInfo_SP game_sp_info; struct LevelInfo_SP native_sp_level; void InitGameEngine_SP() { -#if 0 + game_sp_info.LevelSolved = FALSE; + game_sp_info.GameOver = FALSE; + +#if 1 menPlay_Click(); #else menPlayDemo_Click(); #endif } +#if 0 void BlitScreenToBitmap_SP(Bitmap *target_bitmap) { - BlitBitmap(screenBitmap, target_bitmap, 15 * 32, 7 * 32, - SCR_FIELDX * TILEX, SCR_FIELDY * TILEY, SX, SY); + DDScrollBuffer_Blt_Ext(target_bitmap); +} +#endif + +void RedrawPlayfield_SP(boolean force_redraw) +{ + // subDisplayLevel(); + + UpdatePlayfield(); + + BackToFront_SP(); } void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode) { + byte single_player_action = action[0]; + + subMainGameLoop_Main(single_player_action, warp_mode); + + RedrawPlayfield_SP(FALSE); }