corrections to compile on r18

This commit is contained in:
dborth 2009-05-21 04:16:41 +00:00
parent e4e4624a29
commit 88cd91824e
9 changed files with 21 additions and 31 deletions

View File

@ -33,7 +33,7 @@ CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) \
-DC_CORE -D__ppc__ -D__POWERPC__ -DFINAL_VERSION \ -DC_CORE -D__ppc__ -D__POWERPC__ -DFINAL_VERSION \
-DSDL -DNO_PNG -DHAVE_ZUTIL_H \ -DSDL -DNO_PNG -DHAVE_ZUTIL_H \
-D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ \ -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 -Wno-unused-parameter -Wno-strict-aliasing
CXXFLAGS = $(CFLAGS) CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map

View File

@ -33,7 +33,7 @@ CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) \
-DC_CORE -D__ppc__ -D__POWERPC__ -DFINAL_VERSION \ -DC_CORE -D__ppc__ -D__POWERPC__ -DFINAL_VERSION \
-DSDL -DNO_PNG -DHAVE_ZUTIL_H \ -DSDL -DNO_PNG -DHAVE_ZUTIL_H \
-D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ \ -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 -Wno-unused-parameter -Wno-strict-aliasing
CXXFLAGS = $(CFLAGS) CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref

View File

@ -159,6 +159,7 @@
#include <malloc.h> #include <malloc.h>
#include <string.h> #include <string.h>
#include <wchar.h>
#include <map> #include <map>
/*! \struct ftgxCharData_ /*! \struct ftgxCharData_

View File

@ -263,8 +263,6 @@ u32 TMNTInput(unsigned short pad) {
u32 TMNT1Input(unsigned short pad) { u32 TMNT1Input(unsigned short pad) {
u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad); u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad);
static u32 LastDir = VBA_RIGHT; 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; bool Jump=0, Attack=0, SpinKick=0, Roll=0, Pause=0, Select=0;
#ifdef HW_RVL #ifdef HW_RVL
@ -307,7 +305,6 @@ u32 TMNT1Input(unsigned short pad) {
#endif #endif
u32 gc = PAD_ButtonsHeld(pad); u32 gc = PAD_ButtonsHeld(pad);
u32 released = PAD_ButtonsUp(pad);
// DPad moves // DPad moves
if (gc & PAD_BUTTON_UP) if (gc & PAD_BUTTON_UP)
J |= VBA_UP; J |= VBA_UP;
@ -347,8 +344,6 @@ u32 TMNT1Input(unsigned short pad) {
u32 TMNT2Input(unsigned short pad) { u32 TMNT2Input(unsigned short pad) {
u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad); u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad);
static u32 LastDir = VBA_RIGHT; 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; bool Jump=0, Attack=0, SpinKick=0, Roll=0, Pause=0, Select=0;
#ifdef HW_RVL #ifdef HW_RVL
@ -391,7 +386,6 @@ u32 TMNT2Input(unsigned short pad) {
#endif #endif
u32 gc = PAD_ButtonsHeld(pad); u32 gc = PAD_ButtonsHeld(pad);
u32 released = PAD_ButtonsUp(pad);
// DPad moves // DPad moves
if (gc & PAD_BUTTON_UP) if (gc & PAD_BUTTON_UP)
J |= VBA_UP; J |= VBA_UP;
@ -432,8 +426,6 @@ u32 TMNT2Input(unsigned short pad) {
u32 TMNT3Input(unsigned short pad) { u32 TMNT3Input(unsigned short pad) {
u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad); u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad);
static u32 LastDir = VBA_RIGHT; 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; bool Jump=0, Attack=0, SpinKick=0, Roll=0, Pause=0, Select=0;
#ifdef HW_RVL #ifdef HW_RVL
@ -476,7 +468,6 @@ u32 TMNT3Input(unsigned short pad) {
#endif #endif
u32 gc = PAD_ButtonsHeld(pad); u32 gc = PAD_ButtonsHeld(pad);
u32 released = PAD_ButtonsUp(pad);
// DPad moves // DPad moves
if (gc & PAD_BUTTON_UP) if (gc & PAD_BUTTON_UP)
J |= VBA_UP; J |= VBA_UP;
@ -516,8 +507,6 @@ u32 TMNT3Input(unsigned short pad) {
u32 TMNTGBAInput(unsigned short pad) { u32 TMNTGBAInput(unsigned short pad) {
u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad); u32 J = StandardMovement(pad) | StandardDPad(pad) | DecodeKeyboard(pad);
static u32 LastDir = VBA_RIGHT; 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; bool Jump=0, Attack=0, SpinKick=0, SpecialMove=0, Pause=0, Select=0;
#ifdef HW_RVL #ifdef HW_RVL
@ -559,7 +548,6 @@ u32 TMNTGBAInput(unsigned short pad) {
#endif #endif
u32 gc = PAD_ButtonsHeld(pad); u32 gc = PAD_ButtonsHeld(pad);
u32 released = PAD_ButtonsUp(pad);
// DPad moves // DPad moves
if (gc & PAD_BUTTON_UP) if (gc & PAD_BUTTON_UP)
J |= VBA_UP; J |= VBA_UP;

View File

@ -13,7 +13,7 @@
#include <gccore.h> #include <gccore.h>
typedef struct gameSetting { struct gameSetting {
char gameName[100]; char gameName[100];
char gameID[5]; char gameID[5];
int saveType; int saveType;
@ -25,7 +25,7 @@ typedef struct gameSetting {
extern gameSetting gameSettings[]; extern gameSetting gameSettings[];
extern int gameSettingsCount; extern int gameSettingsCount;
typedef struct gamePalette { struct gamePalette {
char gameName[17]; char gameName[17];
u32 palette[14]; // in 24-bit 0xRRGGBB u32 palette[14]; // in 24-bit 0xRRGGBB
}; };

View File

@ -37,6 +37,7 @@
#include <string.h> #include <string.h>
#include <vector> #include <vector>
#include <exception> #include <exception>
#include <wchar.h>
#include <math.h> #include <math.h>
#include <asndlib.h> #include <asndlib.h>
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>

View File

@ -218,8 +218,8 @@ void GuiButton::Update(GuiTrigger * t)
if( if(
(t->wpad.btns_d > 0 && (t->wpad.btns_d > 0 &&
wm_btns == wm_btns_trig || (wm_btns == wm_btns_trig ||
(cc_btns == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC)) || (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)) (t->pad.btns_d == trigger[i]->pad.btns_d && t->pad.btns_d > 0))
{ {
if(t->chan == stateChan || stateChan == -1) if(t->chan == stateChan || stateChan == -1)
@ -267,8 +267,8 @@ void GuiButton::Update(GuiTrigger * t)
if( if(
(t->wpad.btns_d > 0 && (t->wpad.btns_d > 0 &&
wm_btns == wm_btns_trig || (wm_btns == wm_btns_trig ||
(cc_btns == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC)) || (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)) (t->pad.btns_d == trigger[i]->pad.btns_h && t->pad.btns_d > 0))
{ {
if(trigger[i]->type == TRIGGER_HELD && state == STATE_SELECTED && if(trigger[i]->type == TRIGGER_HELD && state == STATE_SELECTED &&
@ -278,8 +278,8 @@ void GuiButton::Update(GuiTrigger * t)
if( if(
(t->wpad.btns_h > 0 && (t->wpad.btns_h > 0 &&
wm_btns_h == wm_btns_trig || (wm_btns_h == wm_btns_trig ||
(cc_btns_h == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC)) || (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)) (t->pad.btns_h == trigger[i]->pad.btns_h && t->pad.btns_h > 0))
{ {
if(trigger[i]->type == TRIGGER_HELD) if(trigger[i]->type == TRIGGER_HELD)

View File

@ -236,8 +236,8 @@ u32 MK1Input(unsigned short pad) {
OpponentHealth = gbReadMemory(0xD696); OpponentHealth = gbReadMemory(0xD696);
OurX = gbReadMemory(0xCF00); OurX = gbReadMemory(0xCF00);
OpponentX = gbReadMemory(0xCF26); OpponentX = gbReadMemory(0xCF26);
u8 OurChar = gbReadMemory(0xD685); //u8 OurChar = gbReadMemory(0xD685);
u8 OpponentChar = gbReadMemory(0xD686); //u8 OpponentChar = gbReadMemory(0xD686);
u8 MenuChar = gbReadMemory(0xD61D)+1; u8 MenuChar = gbReadMemory(0xD61D)+1;
static u8 OldMenuChar = 0; static u8 OldMenuChar = 0;
// Rumble when they change character // Rumble when they change character
@ -267,8 +267,8 @@ u32 MK1Input(unsigned short pad) {
} }
u32 MK2Input(unsigned short pad) { u32 MK2Input(unsigned short pad) {
u8 OurChar = gbReadMemory(0xDD01); //u8 OurChar = gbReadMemory(0xDD01);
u8 OpponentChar = gbReadMemory(0xDD01+0x40); //u8 OpponentChar = gbReadMemory(0xDD01+0x40);
OurX = gbReadMemory(0xDD12) | (gbReadMemory(0xDD13) << 8); OurX = gbReadMemory(0xDD12) | (gbReadMemory(0xDD13) << 8);
OpponentX = gbReadMemory(0xDD12+0x40) | (gbReadMemory(0xDD13+0x40) << 8); OpponentX = gbReadMemory(0xDD12+0x40) | (gbReadMemory(0xDD13+0x40) << 8);
OurHealth = gbReadMemory(0xDD20); OurHealth = gbReadMemory(0xDD20);
@ -590,7 +590,7 @@ u8 MK3SetSubchar(int Char, int Subchar, bool menu=false) {
u32 MK3Input(unsigned short pad) { u32 MK3Input(unsigned short pad) {
OurHealth = gbReadMemory(0xC0D6); OurHealth = gbReadMemory(0xC0D6);
OpponentHealth = gbReadMemory(0xC0D7); OpponentHealth = gbReadMemory(0xC0D7);
u8 OurChar = gbReadMemory(0xC0F0); // //u8 OurChar = gbReadMemory(0xC0F0); //
u8 OpponentChar = gbReadMemory(0xC0F1); // also CD40, D526 u8 OpponentChar = gbReadMemory(0xC0F1); // also CD40, D526
OurX = gbReadMemory(0xCD02) | (gbReadMemory(0xCD03) << 8); OurX = gbReadMemory(0xCD02) | (gbReadMemory(0xCD03) << 8);
OpponentX = gbReadMemory(0xCD42) | (gbReadMemory(0xCD43) << 8); OpponentX = gbReadMemory(0xCD42) | (gbReadMemory(0xCD43) << 8);
@ -730,8 +730,8 @@ u32 MK4Input(unsigned short pad)
{ {
OurHealth = gbReadMemory(0xC0D6); OurHealth = gbReadMemory(0xC0D6);
OpponentHealth = gbReadMemory(0xC0D7); OpponentHealth = gbReadMemory(0xC0D7);
u8 OurChar = gbReadMemory(0xC0F0); // also CD00? //u8 OurChar = gbReadMemory(0xC0F0); // also CD00?
u8 OpponentChar = gbReadMemory(0xC0F1); // also CD40, D526 //u8 OpponentChar = gbReadMemory(0xC0F1); // also CD40, D526
OurX = gbReadMemory(0xCD02) | (gbReadMemory(0xCD03) << 8); OurX = gbReadMemory(0xCD02) | (gbReadMemory(0xCD03) << 8);
OpponentX = gbReadMemory(0xCD42) | (gbReadMemory(0xCD43) << 8); OpponentX = gbReadMemory(0xCD42) | (gbReadMemory(0xCD43) << 8);
bool InMenu = false; // CAKTODO bool InMenu = false; // CAKTODO
@ -1597,7 +1597,7 @@ u32 MKAInput(unsigned short pad)
OurX = (s16)CPUReadHalfWord(0x2000008); OurX = (s16)CPUReadHalfWord(0x2000008);
OpponentX = (s16)CPUReadHalfWord(0x2000008+0x68); OpponentX = (s16)CPUReadHalfWord(0x2000008+0x68);
u8 OurChar = CPUReadByte(0x2000025); // also 202f6a8 u8 OurChar = CPUReadByte(0x2000025); // also 202f6a8
u8 OpponentChar = CPUReadByte(0x2000025+0x68); //u8 OpponentChar = CPUReadByte(0x2000025+0x68);
// Special characters // Special characters
static int MenuChar = 0; static int MenuChar = 0;

View File

@ -13,7 +13,7 @@
#include <ogc/ipc.h> #include <ogc/ipc.h>
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <cstdio> #include <cstdio>
#include <string> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <malloc.h> #include <malloc.h>