X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2Finit.c;h=736211c8642a97759295c406ba800bd8765bb5b7;hb=026c569fc47fbe95d8cb131442a4e04610f27f05;hp=0f380e5845e4640cc442094f0a806f63f43b27a8;hpb=ac592f78bbedc4808c5e35fb22bc8fc9f0398c8d;p=rocksndiamonds.git diff --git a/src/game_sp/init.c b/src/game_sp/init.c index 0f380e58..736211c8 100644 --- a/src/game_sp/init.c +++ b/src/game_sp/init.c @@ -7,24 +7,56 @@ Bitmap *sp_objects; Bitmap *screenBitmap; - +#if 0 static void BlitScreenToBitmap_SP__Stage_Blt() { BlitScreenToBitmap_SP(window); } +#endif + +static void init_struct_functions() +{ +#if 1 + Stage.Blt = &DDScrollBuffer_Blt; +#else + Stage.Blt = &BlitScreenToBitmap_SP__Stage_Blt; +#endif + + Stage.ScrollTo = &DDScrollBuffer_ScrollTo; + Stage.ScrollTowards = &DDScrollBuffer_ScrollTowards; + Stage.SoftScrollTo = &DDScrollBuffer_SoftScrollTo; + + StretchedSprites.BltEx = &DDSpriteBuffer_BltEx; +} + +static void init_global_values() +{ + menBorder.Checked = True * 0; + menPanel.Checked = True; + menAutoScroll.Checked = True; + + MainForm.picPane.Width = picPane.Width = SCR_FIELDX * TILEX; + MainForm.picPane.Height = picPane.Height = SCR_FIELDY * TILEY; +} void sp_open_all() { + init_struct_functions(); + init_global_values(); + + Form_Load(); + SetBitmaps_SP(&sp_objects); +#if 1 + screenBitmap = CreateBitmap(60 * TILEX, 24 * TILEY, + DEFAULT_DEPTH); +#else screenBitmap = CreateBitmap(MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY, DEFAULT_DEPTH); - - StretchedSprites.BltEx = &DDSpriteBuffer_BltEx; +#endif DDSpriteBuffer_CreateFromFile("[NONE]", 16, 16); - - Stage.Blt = &BlitScreenToBitmap_SP__Stage_Blt; } void sp_close_all()