From cc2a52a3a2a299a34acd9646f5b2ceed1c502e34 Mon Sep 17 00:00:00 2001 From: yabause Date: Fri, 1 Dec 2006 21:33:45 +0000 Subject: [PATCH] Changed GPU_screen to u8 * --- desmume/src/GPU.c | 2 +- desmume/src/GPU.h | 6 ++---- desmume/src/NDSSystem.c | 2 +- desmume/src/saves.c | 1 + 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/desmume/src/GPU.c b/desmume/src/GPU.c index f7de6b13f..adec85514 100644 --- a/desmume/src/GPU.c +++ b/desmume/src/GPU.c @@ -37,7 +37,7 @@ Screen SubScreen; //#define DEBUG_TRI -u16 GPU_screen[2*256*192]; +u8 GPU_screen[4*256*192]; short sizeTab[4][4][2] = { diff --git a/desmume/src/GPU.h b/desmume/src/GPU.h index e8460eab2..d1b5c12f0 100644 --- a/desmume/src/GPU.h +++ b/desmume/src/GPU.h @@ -100,7 +100,7 @@ struct _GPU void (*spriteRender)(GPU * gpu, u16 l, u8 * dst, u8 * prioTab); }; -extern u16 GPU_screen[2*256*192]; +extern u8 GPU_screen[4*256*192]; GPU * GPU_Init(u8 l); void GPU_Reset(GPU *g, u8 l); @@ -132,9 +132,7 @@ void Screen_DeInit(void); static INLINE void GPU_ligne(Screen * screen, u16 l) { GPU * gpu = screen->gpu; - //u16 * dst = GPU_screen + (screen->offset + l) * 256; - u8 * dst = GPU_screen + (screen->offset + l) * 256; - //u16 spr[256]; + u8 * dst = GPU_screen + (screen->offset + l) * 512; u8 spr[512]; u8 sprPrio[256]; u8 bgprio; diff --git a/desmume/src/NDSSystem.c b/desmume/src/NDSSystem.c index ac42cb142..6fa2d6ba9 100644 --- a/desmume/src/NDSSystem.c +++ b/desmume/src/NDSSystem.c @@ -447,7 +447,7 @@ int NDS_WriteBMP(const char *filename) bmpimgheader_struct imageheader; FILE *file; int i,j,k; - u16 *bmp = GPU_screen; + u16 * bmp = GPU_screen; memset(&fileheader, 0, sizeof(fileheader)); fileheader.size = sizeof(fileheader); diff --git a/desmume/src/saves.c b/desmume/src/saves.c index 88ad00699..2ac83a9c4 100644 --- a/desmume/src/saves.c +++ b/desmume/src/saves.c @@ -22,6 +22,7 @@ #include #endif #include +#include #include "saves.h" #include "MMU.h" #include "NDSSystem.h"