From 56f42e81eba8150a4aa73e095b471ad4e96d9120 Mon Sep 17 00:00:00 2001 From: bgk Date: Thu, 1 Jan 2009 14:34:16 +0000 Subject: [PATCH] Modified the includes so that files from the dmg folder don't include anything from the agb folder. --- src/dmg/gbGfx.cpp | 5 +++-- src/dmg/gbGlobals.cpp | 3 ++- src/dmg/gbMemory.cpp | 8 ++++---- src/dmg/gbPrinter.cpp | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/dmg/gbGfx.cpp b/src/dmg/gbGfx.cpp index f3aa2244..a220a13f 100644 --- a/src/dmg/gbGfx.cpp +++ b/src/dmg/gbGfx.cpp @@ -1,6 +1,6 @@ #include -#include "../agb/GBA.h" +#include "../Globals.h" #include "gbGlobals.h" #include "gbSGB.h" @@ -565,11 +565,12 @@ void gbDrawSprites(bool draw) { for (int j = x-8; j<300; j++) if (j>=0) + { if (gbSpeed) gbSpritesTicks[j] += 5; else gbSpritesTicks[j] += 2+(count&1); - + } } count++; } diff --git a/src/dmg/gbGlobals.cpp b/src/dmg/gbGlobals.cpp index 69227223..70e6225e 100644 --- a/src/dmg/gbGlobals.cpp +++ b/src/dmg/gbGlobals.cpp @@ -1,4 +1,5 @@ -#include "../agb/GBA.h" +#include +#include "../common/Types.h" u8 *gbMemoryMap[16]; diff --git a/src/dmg/gbMemory.cpp b/src/dmg/gbMemory.cpp index 72723874..22d62785 100644 --- a/src/dmg/gbMemory.cpp +++ b/src/dmg/gbMemory.cpp @@ -1,4 +1,4 @@ -#include "../agb/GBA.h" +#include "../System.h" #include "../common/Port.h" #include "gbGlobals.h" #include "gbMemory.h" @@ -1322,8 +1322,8 @@ void mapperTAMA5RAM(u16 address, u8 value) // Write Commands !!! if (gbDataTAMA5.mapperCommands[0x0f] && (gbDataTAMA5.mapperCommandNumber == 7)) { - int data = gbDataTAMA5.mapperCommands[0x04] & 0x0f | - (gbDataTAMA5.mapperCommands[0x05] <<4); + int data = (gbDataTAMA5.mapperCommands[0x04] & 0x0f) | + (gbDataTAMA5.mapperCommands[0x05] <<4); // Not sure when the write command should reset... // but it doesn't seem to matter. @@ -1456,7 +1456,7 @@ void mapperTAMA5RAM(u16 address, u8 value) for (int i = 0; i<0x10; i++) for (int j = 0; j<0x10; j++) if (!(j&2)) - gbTAMA5ram[(i*0x10)+j | 2] = gbTAMA5ram[(i*0x10)+j]; + gbTAMA5ram[((i*0x10)+j) | 2] = gbTAMA5ram[(i*0x10)+j]; // Enable this to see the content of the flashrom in 0xe000 /*for (int k = 0; k<0x100; k++) gbMemoryMap[0xe][k] = gbTAMA5ram[k];*/ diff --git a/src/dmg/gbPrinter.cpp b/src/dmg/gbPrinter.cpp index 450b97fd..4bbac899 100644 --- a/src/dmg/gbPrinter.cpp +++ b/src/dmg/gbPrinter.cpp @@ -1,6 +1,6 @@ #include #include -#include "../agb/GBA.h" +#include "../System.h" u8 gbPrinterStatus = 0; int gbPrinterState = 0;