From 5d1bd9d3e26c6050d8c1b1d1bab74a3cb797b979 Mon Sep 17 00:00:00 2001 From: yabause Date: Fri, 13 Oct 2006 21:15:27 +0000 Subject: [PATCH] Changed GPU_ligne arguments to something better. --- desmume/src/GPU.h | 5 +++-- desmume/src/NDSSystem.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/desmume/src/GPU.h b/desmume/src/GPU.h index 12b0924c2..c86e83bab 100644 --- a/desmume/src/GPU.h +++ b/desmume/src/GPU.h @@ -122,9 +122,10 @@ extern Screen SubScreen; void ScreenInit(void); void ScreenDeInit(void); -static INLINE void GPU_ligne(GPU * gpu, u16 * buffer, u16 l) +static INLINE void GPU_ligne(Screen * screen, u16 l) { - u16 * dst = buffer + l*256; + GPU * gpu = screen->gpu; + u16 * dst = GPU_screen + (screen->offset + l) * 256; u16 spr[256]; u8 sprPrio[256]; u8 bgprio; diff --git a/desmume/src/NDSSystem.h b/desmume/src/NDSSystem.h index d51bea17b..bdeeb0e63 100644 --- a/desmume/src/NDSSystem.h +++ b/desmume/src/NDSSystem.h @@ -292,8 +292,8 @@ void NDS_releasTouch(void); { if(nds.VCount<192) { - GPU_ligne(MainScreen.gpu, GPU_screen + (MainScreen.offset * 256), nds.VCount); - GPU_ligne(SubScreen.gpu, GPU_screen + (SubScreen.offset * 256), nds.VCount); + GPU_ligne(&MainScreen, nds.VCount); + GPU_ligne(&SubScreen, nds.VCount); ((u16 *)ARM9Mem.ARM9_REG)[0x0004>>1] |= 2; ((u16 *)MMU.ARM7_REG)[0x0004>>1] |= 2; NDS_ARM9HBlankInt();