From 4b7b1b71fbd036017e6cfb0ee4cb1ec2331cd9ce Mon Sep 17 00:00:00 2001 From: maple! Date: Thu, 29 Aug 2024 13:59:22 +0200 Subject: [PATCH 1/3] debug size warning tweaks --- src/cache.cpp | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/cache.cpp b/src/cache.cpp index 9006b07f41..2f66d2e3f9 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -174,30 +174,30 @@ namespace { struct Spec { char const* directory; + DummyRenderer dummy_renderer; bool transparent; int min_width , max_width; int min_height, max_height; - DummyRenderer dummy_renderer; bool oob_check; bool warn_missing; }; constexpr Spec spec[] = { - { "Backdrop", false, 320, 320, 160, 240, DrawCheckerboard, true, true }, - { "Battle", true, 480, 480, 96, 480, DrawCheckerboard, true, true }, - { "CharSet", true, 288, 288, 256, 256, DrawCheckerboard, true, true }, - { "ChipSet", true, 480, 480, 256, 256, DrawCheckerboard, true, true }, - { "FaceSet", true, 192, 192, 192, 192, DrawCheckerboard, true, true}, - { "GameOver", false, 320, 320, 240, 240, DrawCheckerboard, true, true }, - { "Monster", true, 16, 320, 16, 160, DrawCheckerboard, false, false }, - { "Panorama", false, 80, 640, 80, 480, DrawCheckerboard, false, true }, - { "Picture", true, 1, 640, 1, 480, DrawCheckerboard, false, true }, - { "System", true, 160, 160, 80, 80, DummySystem, true, true }, - { "Title", false, 320, 320, 240, 240, DrawCheckerboard, true, true }, - { "System2", true, 80, 80, 96, 96, DrawCheckerboard, true, true }, - { "Battle2", true, 640, 640, 640, 640, DrawCheckerboard, true, true }, - { "BattleCharSet", true, 144, 144, 384, 384, DrawCheckerboard, true, false }, - { "BattleWeapon", true, 192, 192, 512, 512, DrawCheckerboard, true, false }, - { "Frame", true, 320, 320, 240, 240, DrawCheckerboard, true, true }, + { "Backdrop", DrawCheckerboard, false, 320, 320, 160, 240, true, true }, + { "Battle", DrawCheckerboard, true, 96, 480, 96, 480, true, true }, + { "CharSet", DrawCheckerboard, true, 288, 288, 256, 256, true, true }, + { "ChipSet", DrawCheckerboard, true, 480, 480, 256, 256, true, true }, + { "FaceSet", DrawCheckerboard, true, 192, 192, 192, 192, true, true}, + { "GameOver", DrawCheckerboard, false, 320, 320, 240, 240, true, true }, + { "Monster", DrawCheckerboard, true, 16, 320, 16, 160, false, false }, + { "Panorama", DrawCheckerboard, false, 80, 640, 80, 480, false, true }, + { "Picture", DrawCheckerboard, true, 1, 640, 1, 480, false, true }, + { "System", DummySystem, true, 160, 160, 80, 80, true, true }, + { "Title", DrawCheckerboard, false, 320, 320, 240, 240, true, true }, + { "System2", DrawCheckerboard, true, 80, 80, 96, 96, true, true }, + { "Battle2", DrawCheckerboard, true, 640, 640, 640, 640, true, true }, + { "BattleCharSet", DrawCheckerboard, true, 144, 144, 384, 384, true, false }, + { "BattleWeapon", DrawCheckerboard, true, 192, 192, 512, 512, true, false }, + { "Frame", DrawCheckerboard, true, 320, 320, 240, 240, true, true }, }; template @@ -312,6 +312,12 @@ namespace { max_h = min_h = Player::IsRPG2k() ? 160 : 240; } + // EasyRPG extensions add support for large charsets; size is spoofed to ignore the error + if (!filename.empty() && filename.front() == '$' && T == Material::Charset && Player::HasEasyRpgExtensions()) { + w = 288; + h = 256; + } + if (w < min_w || max_w < w || h < min_h || max_h < h) { Output::Debug("Image size out of bounds: {}/{} ({}x{} < {}x{} < {}x{})", s.directory, filename, min_w, min_h, w, h, max_w, max_h); From b56e60518b80dc747c12241770a0c49644f238a9 Mon Sep 17 00:00:00 2001 From: lumiscosity Date: Fri, 30 Aug 2024 08:56:35 +0200 Subject: [PATCH 2/3] tabs --- src/cache.cpp | 76 +++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/cache.cpp b/src/cache.cpp index 2f66d2e3f9..dc65c97ce3 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -1,19 +1,19 @@ /* - * This file is part of EasyRPG Player. - * - * EasyRPG Player is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * EasyRPG Player is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with EasyRPG Player. If not, see . - */ +* This file is part of EasyRPG Player. +* +* EasyRPG Player is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* EasyRPG Player is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with EasyRPG Player. If not, see . +*/ // Headers #ifdef _MSC_VER @@ -174,7 +174,7 @@ namespace { struct Spec { char const* directory; - DummyRenderer dummy_renderer; + DummyRenderer dummy_renderer; bool transparent; int min_width , max_width; int min_height, max_height; @@ -182,22 +182,22 @@ namespace { bool warn_missing; }; constexpr Spec spec[] = { - { "Backdrop", DrawCheckerboard, false, 320, 320, 160, 240, true, true }, - { "Battle", DrawCheckerboard, true, 96, 480, 96, 480, true, true }, - { "CharSet", DrawCheckerboard, true, 288, 288, 256, 256, true, true }, - { "ChipSet", DrawCheckerboard, true, 480, 480, 256, 256, true, true }, - { "FaceSet", DrawCheckerboard, true, 192, 192, 192, 192, true, true}, - { "GameOver", DrawCheckerboard, false, 320, 320, 240, 240, true, true }, - { "Monster", DrawCheckerboard, true, 16, 320, 16, 160, false, false }, - { "Panorama", DrawCheckerboard, false, 80, 640, 80, 480, false, true }, - { "Picture", DrawCheckerboard, true, 1, 640, 1, 480, false, true }, - { "System", DummySystem, true, 160, 160, 80, 80, true, true }, - { "Title", DrawCheckerboard, false, 320, 320, 240, 240, true, true }, - { "System2", DrawCheckerboard, true, 80, 80, 96, 96, true, true }, - { "Battle2", DrawCheckerboard, true, 640, 640, 640, 640, true, true }, - { "BattleCharSet", DrawCheckerboard, true, 144, 144, 384, 384, true, false }, - { "BattleWeapon", DrawCheckerboard, true, 192, 192, 512, 512, true, false }, - { "Frame", DrawCheckerboard, true, 320, 320, 240, 240, true, true }, + { "Backdrop", DrawCheckerboard, false, 320, 320, 160, 240, true, true }, + { "Battle", DrawCheckerboard, true, 96, 480, 96, 480, true, true }, + { "CharSet", DrawCheckerboard, true, 288, 288, 256, 256, true, true }, + { "ChipSet", DrawCheckerboard, true, 480, 480, 256, 256, true, true }, + { "FaceSet", DrawCheckerboard, true, 192, 192, 192, 192, true, true}, + { "GameOver", DrawCheckerboard, false, 320, 320, 240, 240, true, true }, + { "Monster", DrawCheckerboard, true, 16, 320, 16, 160, false, false }, + { "Panorama", DrawCheckerboard, false, 80, 640, 80, 480, false, true }, + { "Picture", DrawCheckerboard, true, 1, 640, 1, 480, false, true }, + { "System", DummySystem, true, 160, 160, 80, 80, true, true }, + { "Title", DrawCheckerboard, false, 320, 320, 240, 240, true, true }, + { "System2", DrawCheckerboard, true, 80, 80, 96, 96, true, true }, + { "Battle2", DrawCheckerboard, true, 640, 640, 640, 640, true, true }, + { "BattleCharSet", DrawCheckerboard, true, 144, 144, 384, 384, true, false }, + { "BattleWeapon", DrawCheckerboard, true, 192, 192, 512, 512, true, false }, + { "Frame", DrawCheckerboard, true, 320, 320, 240, 240, true, true }, }; template @@ -312,15 +312,15 @@ namespace { max_h = min_h = Player::IsRPG2k() ? 160 : 240; } - // EasyRPG extensions add support for large charsets; size is spoofed to ignore the error - if (!filename.empty() && filename.front() == '$' && T == Material::Charset && Player::HasEasyRpgExtensions()) { - w = 288; - h = 256; - } + // EasyRPG extensions add support for large charsets; size is spoofed to ignore the error + if (!filename.empty() && filename.front() == '$' && T == Material::Charset && Player::HasEasyRpgExtensions()) { + w = 288; + h = 256; + } if (w < min_w || max_w < w || h < min_h || max_h < h) { Output::Debug("Image size out of bounds: {}/{} ({}x{} < {}x{} < {}x{})", - s.directory, filename, min_w, min_h, w, h, max_w, max_h); + s.directory, filename, min_w, min_h, w, h, max_w, max_h); } } From 91cfb700f9d9e669041a2d0769572abcb48611e2 Mon Sep 17 00:00:00 2001 From: lumiscosity Date: Fri, 30 Aug 2024 12:34:12 +0200 Subject: [PATCH 3/3] tabs 2 electric boogaloo --- src/cache.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/cache.cpp b/src/cache.cpp index dc65c97ce3..37fdc98637 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -1,19 +1,19 @@ /* -* This file is part of EasyRPG Player. -* -* EasyRPG Player is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* EasyRPG Player is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with EasyRPG Player. If not, see . -*/ + * This file is part of EasyRPG Player. + * + * EasyRPG Player is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * EasyRPG Player is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with EasyRPG Player. If not, see . + */ // Headers #ifdef _MSC_VER