Rename GameId::GAKUEN to GameId::GAKUEN_SENKI

To clearly distinguish it from Gakuen KING. The game id remains `gakuen`
for backward compatibility.
This commit is contained in:
kichikuou
2026-08-29 07:09:54 +09:00
parent e2afd77ec9
commit 4e10e37444
8 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ SDL_Texture* create_scanline_texture(SDL_Renderer* renderer, int width, int heig
AGS::AGS(const Config& config, const GameId& game_id) : game_id(game_id)
{
// 画面サイズ
if (game_id.is(GameId::GAKUEN)) {
if (game_id.is(GameId::GAKUEN_SENKI)) {
window_width = 582;
screen_width = 512;
window_height = screen_height = 424;
@@ -481,7 +481,7 @@ bool AGS::save_screenshot(const char* path)
int AGS::calculate_menu_max(int window) {
if (game_id.is(GameId::INTRUDER))
return 6;
if (game_id.is(GameId::GAKUEN))
if (game_id.is(GameId::GAKUEN_SENKI))
return (menu_w[window - 1].ey - menu_w[window - 1].sy) / (menu.font_size + 4);
return 11;
}
+1 -1
View File
@@ -47,7 +47,7 @@ CG AGS::load_cg_surface(int page, int transparent)
case 1:
switch (game_id.game) {
case GameId::BUNKASAI:
case GameId::GAKUEN:
case GameId::GAKUEN_SENKI:
cg = load_vsp(data, set_palette, transparent);
break;
case GameId::INTRUDER:
+4 -4
View File
@@ -56,11 +56,11 @@ CG AGS::load_vsp(const std::vector<uint8_t>& data, bool set_palette, int transpa
uint8_t g = (data[p++] & 0xf) * 0x11;
colors[i] = {r, g, b, 255};
// In Gakuen Senki, zero entries should not be set to the palette.
if (game_id.is(GameId::GAKUEN) && (b | r | g) != 0) {
if (game_id.is(GameId::GAKUEN_SENKI) && (b | r | g) != 0) {
SDL_SetPaletteColors(program_palette, colors + i, base + i, 1);
}
}
if (!game_id.is(GameId::GAKUEN)) {
if (!game_id.is(GameId::GAKUEN_SENKI)) {
SDL_SetPaletteColors(program_palette, colors, base, 16);
}
}
@@ -72,7 +72,7 @@ CG AGS::load_vsp(const std::vector<uint8_t>& data, bool set_palette, int transpa
// VSP展開
// Gakuen Senki uses exact sx values rather than 8x.
CG cg(game_id.is(GameId::GAKUEN) ? sx : sx * 8, sy, width * 8, height);
CG cg(game_id.is(GameId::GAKUEN_SENKI) ? sx : sx * 8, sy, width * 8, height);
if (transparent >= 0) {
SDL_SetColorKey(cg.surface(), SDL_TRUE, transparent | base);
}
@@ -155,7 +155,7 @@ CG AGS::load_vsp(const std::vector<uint8_t>& data, bool set_palette, int transpa
}
}
if (game_id.is(GameId::GAKUEN)) {
if (game_id.is(GameId::GAKUEN_SENKI)) {
// Gakuen Senki's images were converted to VSP for the modern port, but don't always adhere to VSP's width restrictions, which demand
// every image width be a factor of 8. Thankfully, the exceptions are designed to fit into specific parts of the GUI, and so have
// consistent widths for each output position.
+1 -1
View File
@@ -87,7 +87,7 @@ void AGS::init_windows()
text_w[i].reset(104, 304, 620, 382, false, false);
menu_w[i].reset(420, 28, 620, 244, true, true);
break;
case GameId::GAKUEN:
case GameId::GAKUEN_SENKI:
text_w[i].reset(8, 260, 505, 384, false, false);
if (i == 1) {
menu_w[i].reset(128, 32, 337, 178, true, true);
+4 -4
View File
@@ -33,8 +33,8 @@
#define CRC32_VAMPIRE 0x957bcfbf // Little Vampire
#define CRC32_VAMPIRE_ENG 0x61985a7f // Little Vampire (English) Patch 2.0
#define CRC32_YAKATA 0x8cef6fa6 // ALICEの館
#define CRC32_GAKUEN 0xe4d6ec66 // 学園戦記 (unofficial system1 port) 1.0JP
#define CRC32_GAKUEN_ENG 0x6ba8c102 // Gakuen Senki (English) 1.2
#define CRC32_GAKUEN_SENKI 0xe4d6ec66 // 学園戦記 (unofficial system1 port) 1.0JP
#define CRC32_GAKUEN_SENKI_ENG 0x6ba8c102 // Gakuen Senki (English) 1.2
// SYSTEM2
@@ -120,8 +120,8 @@ const struct CRCTable {
{GameId::LITTLE_VAMPIRE, "little_vampire", 1, "Little Vampire", JAPANESE, CRC32_VAMPIRE},
{GameId::LITTLE_VAMPIRE, "little_vampire_eng", 1, "Little Vampire", ENGLISH, CRC32_VAMPIRE_ENG},
{GameId::YAKATA, "yakata", 1, "ALICEの館", JAPANESE, CRC32_YAKATA},
{GameId::GAKUEN, "gakuen", 1, "学園戦記", JAPANESE, CRC32_GAKUEN},
{GameId::GAKUEN, "gakuen_eng", 1, "Gakuen Senki", ENGLISH, CRC32_GAKUEN_ENG},
{GameId::GAKUEN_SENKI, "gakuen", 1, "学園戦記", JAPANESE, CRC32_GAKUEN_SENKI},
{GameId::GAKUEN_SENKI, "gakuen_eng", 1, "Gakuen Senki", ENGLISH, CRC32_GAKUEN_SENKI_ENG},
{GameId::SYSTEM2_GENERIC, "system2_generic", 2, "System 2", JAPANESE},
{GameId::AYUMI_FD, "ayumi_fd", 2, "あゆみちゃん物語", JAPANESE, CRC32_AYUMI_FD},
+1 -1
View File
@@ -38,7 +38,7 @@ struct GameId {
TOUSHIN_HINT,
LITTLE_VAMPIRE,
YAKATA,
GAKUEN,
GAKUEN_SENKI,
// System 2
SYSTEM2_GENERIC,
+1 -1
View File
@@ -334,7 +334,7 @@ void NACT::cmd_set_menu()
menu_items.emplace_back(sco.getw());
ags->draw_menu = true;
if (game_id.is(GameId::GAKUEN))
if (game_id.is(GameId::GAKUEN_SENKI))
menu_window = 2;
TRACE("$%x,", menu_items.back().addr);
+2 -2
View File
@@ -179,7 +179,7 @@ void NACT_Sys1::cmd_open_verb()
bool chk[MAX_VERB] = {};
int page = 0;
if (game_id.is(GameId::GAKUEN))
if (game_id.is(GameId::GAKUEN_SENKI))
menu_window = 1;
int menu_max = ags->calculate_menu_max(menu_window);
@@ -1052,7 +1052,7 @@ NACT* NACT::create_system1(const Config& config, const GameId& game_id)
switch (game_id.game) {
case GameId::LITTLE_VAMPIRE:
return new NACT_LittleVampire(config, game_id);
case GameId::GAKUEN:
case GameId::GAKUEN_SENKI:
return new NACT_GakuenSenki(config, game_id);
case GameId::INTRUDER:
return new NACT_Intruder(config, game_id);