diff --git a/build/fps b/build/fps new file mode 100644 index 00000000..e69de29b diff --git a/src/Back.cpp b/src/Back.cpp index ff5cbb7e..1cd09b8e 100644 --- a/src/Back.cpp +++ b/src/Back.cpp @@ -91,9 +91,12 @@ void PutBack(int fx, int fy) case 6: case 7: //Sky + static unsigned int fillNext; + fillNext = 0; for (int y = 0; y < WINDOW_HEIGHT - 240 + 88; y += 88) { - for (int x = -((y * 54) % 149); x < WINDOW_WIDTH; x += 149) + fillNext = ((fillNext) * 214013 + 2531011); + for (int x = -(fillNext % 149); x < WINDOW_WIDTH; x += 149) { PutBitmap4(&grcGame, x, y, &rcSkyFiller, SURFACE_ID_LEVEL_BACKGROUND); } diff --git a/src/Draw.cpp b/src/Draw.cpp index 2ba7bf3f..7f424d64 100644 --- a/src/Draw.cpp +++ b/src/Draw.cpp @@ -66,6 +66,8 @@ bool Flip_SystemTask() static bool IsEnableBitmap(SDL_RWops *fp) { + return true; + /* char str[16]; const char *extra_text = "(C)Pixel"; @@ -75,6 +77,7 @@ static bool IsEnableBitmap(SDL_RWops *fp) fp->read(fp, str, 1, len); fp->seek(fp, 0, RW_SEEK_SET); return memcmp(str, extra_text, len) == 0; + */ } void ReleaseSurface(int s) diff --git a/src/Ending.cpp b/src/Ending.cpp index ff0feff1..3846d1cf 100644 --- a/src/Ending.cpp +++ b/src/Ending.cpp @@ -17,8 +17,6 @@ #include "Draw.h" #include "TextScr.h" -#define MAX_STRIP 0x10 - CREDIT Credit; STRIP Strip[MAX_STRIP]; ILLUSTRATION Illust; diff --git a/src/Ending.h b/src/Ending.h index 1a7627af..c32064d4 100644 --- a/src/Ending.h +++ b/src/Ending.h @@ -32,6 +32,8 @@ struct ISLAND_SPRITE int y; }; +#define MAX_STRIP ((WINDOW_HEIGHT + 14) / 15) + void ActionStripper(); void PutStripper(); void SetStripper(int x, int y, char *text, int cast); diff --git a/src/Frame.cpp b/src/Frame.cpp index 6e879a61..c6b5f4de 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -22,30 +22,24 @@ void MoveFrame3() const int num_x = ((WINDOW_WIDTH + 0xF) >> 4) + 1; const int num_y = ((WINDOW_HEIGHT + 0xF) >> 4) + 1; - if (map_w >= num_x || g_GameFlags & 8) + if (map_w >= num_x) { if (gFrame.x <= -0x200) gFrame.x = 0; if (gFrame.x > ((((map_w - 1) << 4) - ((g_GameFlags & 8) ? 320 : WINDOW_WIDTH))) << 9) gFrame.x = (((map_w - 1) << 4) - ((g_GameFlags & 8) ? 320 : WINDOW_WIDTH)) << 9; - - if (g_GameFlags & 8) - gFrame.x -= ((WINDOW_WIDTH - 320) / 2) << 9; } else { gFrame.x = (((map_w - 1) << 4) - WINDOW_WIDTH) << 8; } - if (map_l >= num_y || g_GameFlags & 8) + if (map_l >= num_y) { if (gFrame.y <= -0x200) gFrame.y = 0; if (gFrame.y > ((((map_l - 1) << 4) - ((g_GameFlags & 8) ? 240 : WINDOW_HEIGHT))) << 9) gFrame.y = (((map_l - 1) << 4) - ((g_GameFlags & 8) ? 240 : WINDOW_HEIGHT)) << 9; - - if (g_GameFlags & 8) - gFrame.y += ((WINDOW_HEIGHT - 240) / 2) << 9; } else { diff --git a/src/GenericLoad.cpp b/src/GenericLoad.cpp index 0cde4c67..7194cf75 100644 --- a/src/GenericLoad.cpp +++ b/src/GenericLoad.cpp @@ -2,6 +2,7 @@ #include "Draw.h" #include "Sound.h" #include "PixTone.h" +#include "Ending.h" bool LoadGenericData() { @@ -52,7 +53,7 @@ bool LoadGenericData() MakeSurface_Generic(40, 240, 29); //Unknown? MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_1); MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_2); - MakeSurface_Generic(WINDOW_WIDTH, 240, SURFACE_ID_CREDIT_CAST); + MakeSurface_Generic(WINDOW_WIDTH, 15 * MAX_STRIP, SURFACE_ID_CREDIT_CAST); char path[0x100]; uint8_t *buf = nullptr;