From b6cdba145f6029daea133863a99fa1216c5b7963 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Tue, 30 Nov 2021 17:15:50 +0900 Subject: [PATCH] ags: Initialize alpha plane with 255 (opaque) This fixes an issue in Ouji-sama Lv1 where the background of the map was not drawn. --- src/ags.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ags.c b/src/ags.c index 3c5a44e..08fc561 100644 --- a/src/ags.c +++ b/src/ags.c @@ -137,8 +137,10 @@ void ags_setWorldSize(int width, int height, int depth) { nact->ags.dib = sdl_getDIB(); /* DIBが8以上の場合は、alpha plane を用意 */ - if (depth > 8) - nact->ags.dib->alpha = calloc(width * height, sizeof(BYTE)); + if (depth > 8) { + nact->ags.dib->alpha = malloc(width * height); + memset(nact->ags.dib->alpha, 255, width * height); + } fade_outed = FALSE; /* thanx tajiri@wizard */