From 79923815000f01bd660f9b8f3f3de53ba597d240 Mon Sep 17 00:00:00 2001 From: otya128 Date: Sat, 10 Dec 2016 20:52:00 +0900 Subject: [PATCH] Fix BG --- SMILEBASIC/bg.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SMILEBASIC/bg.d b/SMILEBASIC/bg.d index 61bfff7..c480cbc 100644 --- a/SMILEBASIC/bg.d +++ b/SMILEBASIC/bg.d @@ -77,13 +77,13 @@ class BG int v2 = v + 16; int w = 16; int h = 16; - glTexCoord2f((u) / 512f - 1 , (v2) / 512f - 1); + glTexCoord2f(u / (cast(float)petitcom.graphic.width) - 1 , v2 / (cast(float)petitcom.graphic.height) - 1); glVertex3f((x * w), (y * h + h), 0); - glTexCoord2f((u) / 512f - 1, (v) / 512f - 1); + glTexCoord2f(u / (cast(float)petitcom.graphic.width) - 1, v / (cast(float)petitcom.graphic.height) - 1); glVertex3f((x * w), (y * h), 0); - glTexCoord2f((u2) / 512f - 1, (v) / 512f - 1); + glTexCoord2f(u2 / (cast(float)petitcom.graphic.width) - 1, v / (cast(float)petitcom.graphic.height) - 1); glVertex3f((x * w + w), (y * h), 0); - glTexCoord2f((u2) / 512f - 1, (v2) / 512f - 1); + glTexCoord2f(u2 / (cast(float)petitcom.graphic.width) - 1, v2 / (cast(float)petitcom.graphic.height) - 1); glVertex3f((x * w + w), (y * h + h), 0); rendercount++; if(rendercount >= 899)