From 88cd91824ecf419382501c86674f51028a7a59d5 Mon Sep 17 00:00:00 2001 From: dborth Date: Thu, 21 May 2009 04:16:41 +0000 Subject: [PATCH] corrections to compile on r18 --- Makefile.gc | 2 +- Makefile.wii | 2 +- source/ngc/FreeTypeGX.h | 1 + source/ngc/gameinput.cpp | 12 ------------ source/ngc/gamesettings.h | 4 ++-- source/ngc/gui/gui.h | 1 + source/ngc/gui/gui_button.cpp | 12 ++++++------ source/ngc/inputmortalkombat.cpp | 16 ++++++++-------- source/ngc/wiiusbsupport.cpp | 2 +- 9 files changed, 21 insertions(+), 31 deletions(-) diff --git a/Makefile.gc b/Makefile.gc index d2f6f66..1d9c8c2 100644 --- a/Makefile.gc +++ b/Makefile.gc @@ -33,7 +33,7 @@ CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) \ -DC_CORE -D__ppc__ -D__POWERPC__ -DFINAL_VERSION \ -DSDL -DNO_PNG -DHAVE_ZUTIL_H \ -D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ \ - -fomit-frame-pointer -fno-exceptions \ + -fomit-frame-pointer \ -Wno-unused-parameter -Wno-strict-aliasing CXXFLAGS = $(CFLAGS) LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map diff --git a/Makefile.wii b/Makefile.wii index 16adc9a..b408c86 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -33,7 +33,7 @@ CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) \ -DC_CORE -D__ppc__ -D__POWERPC__ -DFINAL_VERSION \ -DSDL -DNO_PNG -DHAVE_ZUTIL_H \ -D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ \ - -fomit-frame-pointer -fno-exceptions \ + -fomit-frame-pointer \ -Wno-unused-parameter -Wno-strict-aliasing CXXFLAGS = $(CFLAGS) LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref diff --git a/source/ngc/FreeTypeGX.h b/source/ngc/FreeTypeGX.h index 935cd7d..85453cd 100644 --- a/source/ngc/FreeTypeGX.h +++ b/source/ngc/FreeTypeGX.h @@ -159,6 +159,7 @@ #include #include +#include #include /*! \struct ftgxCharData_ diff --git a/source/ngc/gameinput.cpp b/source/ngc/gameinput.cpp index 9cd2dc9..051a77f 100644 --- a/source/ngc/gameinput.cpp +++ b/source/ngc/gameinput.cpp @@ -263,8 +263,6 @@ u32 TMNTInput(unsigned short pad) { u32 TMNT1Input(unsigned short pad) { u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad); static u32 LastDir = VBA_RIGHT; - static bool wait = false; - static int holdcount = 0; bool Jump=0, Attack=0, SpinKick=0, Roll=0, Pause=0, Select=0; #ifdef HW_RVL @@ -307,7 +305,6 @@ u32 TMNT1Input(unsigned short pad) { #endif u32 gc = PAD_ButtonsHeld(pad); - u32 released = PAD_ButtonsUp(pad); // DPad moves if (gc & PAD_BUTTON_UP) J |= VBA_UP; @@ -347,8 +344,6 @@ u32 TMNT1Input(unsigned short pad) { u32 TMNT2Input(unsigned short pad) { u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad); static u32 LastDir = VBA_RIGHT; - static bool wait = false; - static int holdcount = 0; bool Jump=0, Attack=0, SpinKick=0, Roll=0, Pause=0, Select=0; #ifdef HW_RVL @@ -391,7 +386,6 @@ u32 TMNT2Input(unsigned short pad) { #endif u32 gc = PAD_ButtonsHeld(pad); - u32 released = PAD_ButtonsUp(pad); // DPad moves if (gc & PAD_BUTTON_UP) J |= VBA_UP; @@ -432,8 +426,6 @@ u32 TMNT2Input(unsigned short pad) { u32 TMNT3Input(unsigned short pad) { u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad); static u32 LastDir = VBA_RIGHT; - static bool wait = false; - static int holdcount = 0; bool Jump=0, Attack=0, SpinKick=0, Roll=0, Pause=0, Select=0; #ifdef HW_RVL @@ -476,7 +468,6 @@ u32 TMNT3Input(unsigned short pad) { #endif u32 gc = PAD_ButtonsHeld(pad); - u32 released = PAD_ButtonsUp(pad); // DPad moves if (gc & PAD_BUTTON_UP) J |= VBA_UP; @@ -516,8 +507,6 @@ u32 TMNT3Input(unsigned short pad) { u32 TMNTGBAInput(unsigned short pad) { u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad); static u32 LastDir = VBA_RIGHT; - static bool wait = false; - static int holdcount = 0; bool Jump=0, Attack=0, SpinKick=0, SpecialMove=0, Pause=0, Select=0; #ifdef HW_RVL @@ -559,7 +548,6 @@ u32 TMNTGBAInput(unsigned short pad) { #endif u32 gc = PAD_ButtonsHeld(pad); - u32 released = PAD_ButtonsUp(pad); // DPad moves if (gc & PAD_BUTTON_UP) J |= VBA_UP; diff --git a/source/ngc/gamesettings.h b/source/ngc/gamesettings.h index 099f222..60de730 100644 --- a/source/ngc/gamesettings.h +++ b/source/ngc/gamesettings.h @@ -13,7 +13,7 @@ #include -typedef struct gameSetting { +struct gameSetting { char gameName[100]; char gameID[5]; int saveType; @@ -25,7 +25,7 @@ typedef struct gameSetting { extern gameSetting gameSettings[]; extern int gameSettingsCount; -typedef struct gamePalette { +struct gamePalette { char gameName[17]; u32 palette[14]; // in 24-bit 0xRRGGBB }; diff --git a/source/ngc/gui/gui.h b/source/ngc/gui/gui.h index 4638c84..4cac928 100644 --- a/source/ngc/gui/gui.h +++ b/source/ngc/gui/gui.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/source/ngc/gui/gui_button.cpp b/source/ngc/gui/gui_button.cpp index 16299b4..b4064b0 100644 --- a/source/ngc/gui/gui_button.cpp +++ b/source/ngc/gui/gui_button.cpp @@ -218,8 +218,8 @@ void GuiButton::Update(GuiTrigger * t) if( (t->wpad.btns_d > 0 && - wm_btns == wm_btns_trig || - (cc_btns == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC)) || + (wm_btns == wm_btns_trig || + (cc_btns == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC))) || (t->pad.btns_d == trigger[i]->pad.btns_d && t->pad.btns_d > 0)) { if(t->chan == stateChan || stateChan == -1) @@ -267,8 +267,8 @@ void GuiButton::Update(GuiTrigger * t) if( (t->wpad.btns_d > 0 && - wm_btns == wm_btns_trig || - (cc_btns == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC)) || + (wm_btns == wm_btns_trig || + (cc_btns == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC))) || (t->pad.btns_d == trigger[i]->pad.btns_h && t->pad.btns_d > 0)) { if(trigger[i]->type == TRIGGER_HELD && state == STATE_SELECTED && @@ -278,8 +278,8 @@ void GuiButton::Update(GuiTrigger * t) if( (t->wpad.btns_h > 0 && - wm_btns_h == wm_btns_trig || - (cc_btns_h == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC)) || + (wm_btns_h == wm_btns_trig || + (cc_btns_h == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC))) || (t->pad.btns_h == trigger[i]->pad.btns_h && t->pad.btns_h > 0)) { if(trigger[i]->type == TRIGGER_HELD) diff --git a/source/ngc/inputmortalkombat.cpp b/source/ngc/inputmortalkombat.cpp index 923710e..22b37dd 100644 --- a/source/ngc/inputmortalkombat.cpp +++ b/source/ngc/inputmortalkombat.cpp @@ -236,8 +236,8 @@ u32 MK1Input(unsigned short pad) { OpponentHealth = gbReadMemory(0xD696); OurX = gbReadMemory(0xCF00); OpponentX = gbReadMemory(0xCF26); - u8 OurChar = gbReadMemory(0xD685); - u8 OpponentChar = gbReadMemory(0xD686); + //u8 OurChar = gbReadMemory(0xD685); + //u8 OpponentChar = gbReadMemory(0xD686); u8 MenuChar = gbReadMemory(0xD61D)+1; static u8 OldMenuChar = 0; // Rumble when they change character @@ -267,8 +267,8 @@ u32 MK1Input(unsigned short pad) { } u32 MK2Input(unsigned short pad) { - u8 OurChar = gbReadMemory(0xDD01); - u8 OpponentChar = gbReadMemory(0xDD01+0x40); + //u8 OurChar = gbReadMemory(0xDD01); + //u8 OpponentChar = gbReadMemory(0xDD01+0x40); OurX = gbReadMemory(0xDD12) | (gbReadMemory(0xDD13) << 8); OpponentX = gbReadMemory(0xDD12+0x40) | (gbReadMemory(0xDD13+0x40) << 8); OurHealth = gbReadMemory(0xDD20); @@ -590,7 +590,7 @@ u8 MK3SetSubchar(int Char, int Subchar, bool menu=false) { u32 MK3Input(unsigned short pad) { OurHealth = gbReadMemory(0xC0D6); OpponentHealth = gbReadMemory(0xC0D7); - u8 OurChar = gbReadMemory(0xC0F0); // + //u8 OurChar = gbReadMemory(0xC0F0); // u8 OpponentChar = gbReadMemory(0xC0F1); // also CD40, D526 OurX = gbReadMemory(0xCD02) | (gbReadMemory(0xCD03) << 8); OpponentX = gbReadMemory(0xCD42) | (gbReadMemory(0xCD43) << 8); @@ -730,8 +730,8 @@ u32 MK4Input(unsigned short pad) { OurHealth = gbReadMemory(0xC0D6); OpponentHealth = gbReadMemory(0xC0D7); - u8 OurChar = gbReadMemory(0xC0F0); // also CD00? - u8 OpponentChar = gbReadMemory(0xC0F1); // also CD40, D526 + //u8 OurChar = gbReadMemory(0xC0F0); // also CD00? + //u8 OpponentChar = gbReadMemory(0xC0F1); // also CD40, D526 OurX = gbReadMemory(0xCD02) | (gbReadMemory(0xCD03) << 8); OpponentX = gbReadMemory(0xCD42) | (gbReadMemory(0xCD43) << 8); bool InMenu = false; // CAKTODO @@ -1597,7 +1597,7 @@ u32 MKAInput(unsigned short pad) OurX = (s16)CPUReadHalfWord(0x2000008); OpponentX = (s16)CPUReadHalfWord(0x2000008+0x68); u8 OurChar = CPUReadByte(0x2000025); // also 202f6a8 - u8 OpponentChar = CPUReadByte(0x2000025+0x68); + //u8 OpponentChar = CPUReadByte(0x2000025+0x68); // Special characters static int MenuChar = 0; diff --git a/source/ngc/wiiusbsupport.cpp b/source/ngc/wiiusbsupport.cpp index 70c7367..dcbdb81 100644 --- a/source/ngc/wiiusbsupport.cpp +++ b/source/ngc/wiiusbsupport.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include