X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2Finit.c;h=ee7034247ef27228fa77cc6e585a50d00b10412b;hb=572a4bab20b6f36ef1a4782094b27ac5a703a476;hp=736211c8642a97759295c406ba800bd8765bb5b7;hpb=0f5b7f63f2d3d75ba646795a3c1ea9fc4cee4845;p=rocksndiamonds.git diff --git a/src/game_sp/init.c b/src/game_sp/init.c index 736211c8..ee703424 100644 --- a/src/game_sp/init.c +++ b/src/game_sp/init.c @@ -7,21 +7,9 @@ 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.Blt = &DDScrollBuffer_Blt; Stage.ScrollTo = &DDScrollBuffer_ScrollTo; Stage.ScrollTowards = &DDScrollBuffer_ScrollTowards; Stage.SoftScrollTo = &DDScrollBuffer_SoftScrollTo; @@ -48,7 +36,10 @@ void sp_open_all() SetBitmaps_SP(&sp_objects); -#if 1 +#if 0 + /* too small for oversized levels, but too big for graphics performance */ + /* (the whole playfield is drawn/updated, not only visible/scrolled area) */ + /* !!! FIX THIS !!! */ screenBitmap = CreateBitmap(60 * TILEX, 24 * TILEY, DEFAULT_DEPTH); #else @@ -62,3 +53,25 @@ void sp_open_all() void sp_close_all() { } + +unsigned int InitEngineRandom_SP(long seed) +{ + if (seed == NEW_RANDOMIZE) + { +#if 0 + printf("::: init.c: InitEngineRandom_SP(): subRandomize()\n"); +#endif + + subRandomize(); + + seed = (long)RandomSeed; + } + + RandomSeed = (short)seed; + +#if 0 + printf("::: init.c: InitEngineRandom_SP(): RandomSeed == %d\n", RandomSeed); +#endif + + return (unsigned int) seed; +}