From c2f11ecfbe11bc0b07ec8a374de5394f7fbff3ea Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 5 Jan 2025 12:58:36 +0900 Subject: [PATCH] Fix Gpx.IsSurface() Used in Ore no Shita de Agake. --- modules/Gpx/Gpx.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/modules/Gpx/Gpx.c b/modules/Gpx/Gpx.c index 25f9a78..3f72c39 100644 --- a/modules/Gpx/Gpx.c +++ b/modules/Gpx/Gpx.c @@ -230,24 +230,16 @@ static void CreateAMapOnly() { static void IsSurface() { /* - Gpx.IsSurface(): 指定の番号の surface が surface かどうか - (pixel と alpha の両方のデータを持つ)を調べる + Gpx.IsSurface(): 指定の番号が surface かどうかを調べる p1 : surface 番号 var : 結果を返す変数。surface ならば 1, !surface ならば 0 */ int p1 = getCaliValue(); int *var = getCaliVariable(); - surface_t *s; - - s = sf_get(p1); - - if (s == NULL) { - *var = 0; - } else { - *var = (s->alpha && s->pixel) ? 1 : 0; - } - + + *var = sf_get(p1) ? 1 : 0; + DEBUG_COMMAND("Gpx.IsSurface %d,%p:", p1, var); }