[HRP] Code correction

This commit is contained in:
NovaRain
2021-12-29 07:06:56 +08:00
parent a30f640eb9
commit 5fbbeeb328
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ static void __cdecl main_death_scene_hook_buf_to_buf(fo::FrmData* frm, long w, l
h = Setting::ScreenHeight();
if (DeathScreen::DEATH_SCRN_SIZE || width > w || height > h) {
if (DeathScreen::DEATH_SCRN_SIZE == 1) {
if (DeathScreen::DEATH_SCRN_SIZE <= 1) {
long x = 0;
long y = 0;
Image::GetAspectSize(width, height, &x, &y, w, h);
+1 -1
View File
@@ -37,7 +37,7 @@ static void __cdecl game_help_hook_buf_to_buf(fo::FrmData* frm, long w, long h,
h = Setting::ScreenHeight();
if (HelpScreen::HELP_SCRN_SIZE || width > w || height > h) {
if (HelpScreen::HELP_SCRN_SIZE == 1) {
if (HelpScreen::HELP_SCRN_SIZE <= 1) {
long x = 0;
long y = 0;
Image::GetAspectSize(width, height, &x, &y, w, h);
+1 -1
View File
@@ -53,7 +53,7 @@ static void __cdecl endgame_display_image_hook_buf_to_buf(BYTE* src, long w, lon
if (SlidesScreen::END_SLIDE_SIZE != 2) std::memset(dst, color, w * h);
if (SlidesScreen::END_SLIDE_SIZE || width > w || height > h) {
if (SlidesScreen::END_SLIDE_SIZE == 1) {
if (SlidesScreen::END_SLIDE_SIZE <= 1) {
long x = 0;
long y = 0;
Image::GetAspectSize(width, height, &x, &y, w, h);
+7 -7
View File
@@ -42,7 +42,12 @@ static void __cdecl game_splash_screen_hack_scr_blit(BYTE* srcPixels, long srcWi
}
if (SplashScreen::SPLASH_SCRN_SIZE || srcWidth > w || srcHeight > h) {
if (SplashScreen::SPLASH_SCRN_SIZE == 1) {
if (SplashScreen::SPLASH_SCRN_SIZE == 2) {
rect.top = 0;
rect.left = 0;
rect.right = w - 1;
rect.bottom = h - 1;
} else {
x = 0;
Image::GetAspectSize(srcWidth, srcHeight, &x, &y, w, h);
@@ -50,11 +55,6 @@ static void __cdecl game_splash_screen_hack_scr_blit(BYTE* srcPixels, long srcWi
rect.bottom = (y + h) - 1;
rect.left = x;
rect.right = (rect.left + w) - 1;
} else {
rect.top = 0;
rect.left = 0;
rect.right = w - 1;
rect.bottom = h - 1;
}
BYTE* resizeBuff = new BYTE[w * h];
Image::Scale(srcPixels, srcWidth, srcHeight, resizeBuff, w, h);
@@ -97,7 +97,7 @@ static fo::DbFile* __fastcall ReadRIX(fo::DbFile* file, fo::PALETTE* palette) {
size_t size = rixWidth * rixHeight;
rixBuffer = new BYTE[size];
fo::func::db_fseek(file, 4 + 768, SEEK_CUR);
fo::func::db_fseek(file, 2 + 768, SEEK_CUR);
fo::func::db_fread(rixBuffer, 1, size, file);
}
Clear(palette);