rnd-20090721-2-src
[rocksndiamonds.git] / src / game_sp / init.c
1
2 #include "main_sp.h"
3 #include "global.h"
4
5
6 Bitmap *sp_objects;
7
8 Bitmap *screenBitmap;
9
10
11 static void BlitScreenToBitmap_SP__Stage_Blt()
12 {
13   BlitScreenToBitmap_SP(window);
14 }
15
16 static void init_struct_functions()
17 {
18   Stage.Blt = &BlitScreenToBitmap_SP__Stage_Blt;
19
20   Stage.ScrollTo      = &DDScrollBuffer_ScrollTo;
21   Stage.ScrollTowards = &DDScrollBuffer_ScrollTowards;
22   Stage.SoftScrollTo  = &DDScrollBuffer_SoftScrollTo;
23
24   StretchedSprites.BltEx = &DDSpriteBuffer_BltEx;
25 }
26
27 void sp_open_all()
28 {
29   init_struct_functions();
30
31   Form_Load();
32
33   SetBitmaps_SP(&sp_objects);
34
35   screenBitmap = CreateBitmap(MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY,
36                               DEFAULT_DEPTH);
37
38   DDSpriteBuffer_CreateFromFile("[NONE]", 16, 16);
39 }
40
41 void sp_close_all()
42 {
43 }