rnd-20091211-1-src
[rocksndiamonds.git] / src / game_sp / main.c
1
2 #include "main_sp.h"
3 #include "global.h"
4
5
6 struct GameInfo_SP game_sp_info;
7 struct LevelInfo_SP native_sp_level;
8
9 void InitGameEngine_SP()
10 {
11   game_sp_info.LevelSolved = FALSE;
12   game_sp_info.GameOver = FALSE;
13
14   menBorder.Checked = setup.sp_show_border_elements;
15
16   InitScrollPlayfield();
17
18 #if 1
19   menPlay_Click();
20 #else
21   menPlayDemo_Click();
22 #endif
23 }
24
25 #if 0
26 void BlitScreenToBitmap_SP(Bitmap *target_bitmap)
27 {
28   DDScrollBuffer_Blt_Ext(target_bitmap);
29 }
30 #endif
31
32 void RedrawPlayfield_SP(boolean force_redraw)
33 {
34   // subDisplayLevel();
35
36   UpdatePlayfield();
37
38   BackToFront_SP();
39 }
40
41 void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode)
42 {
43   byte single_player_action = action[0];
44
45   subMainGameLoop_Main(single_player_action, warp_mode);
46
47   RedrawPlayfield_SP(FALSE);
48 }