X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2Fmain.c;h=d63d32a0f2966b9c6d1f18ddfa728c604ef51ecf;hb=c14ddc8b933f45b1fb02e0fe5a7637655b88f90a;hp=235d433454c80ec341a2b23aac4b0fbc98e0f6eb;hpb=1533b136c6f8d0656cc45ca4c204104ef3d75249;p=rocksndiamonds.git diff --git a/src/game_sp/main.c b/src/game_sp/main.c index 235d4334..d63d32a0 100644 --- a/src/game_sp/main.c +++ b/src/game_sp/main.c @@ -3,17 +3,46 @@ #include "global.h" +struct GameInfo_SP game_sp_info; +struct LevelInfo_SP native_sp_level; + void InitGameEngine_SP() { + game_sp_info.LevelSolved = FALSE; + game_sp_info.GameOver = FALSE; + + menBorder.Checked = setup.sp_show_border_elements; + + InitScrollPlayfield(); + +#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); }