commit
3e35ccad72
4 changed files with 40 additions and 25 deletions
|
|
@ -4,5 +4,6 @@
|
|||
#include "types.h"
|
||||
#include "common_structs.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#endif
|
||||
23
include/variables.h
Normal file
23
include/variables.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef _VARIABLES_H
|
||||
#define _VARIABLES_H
|
||||
|
||||
#include "types.h"
|
||||
#include "common_structs.h"
|
||||
#include "dolphin/os.h"
|
||||
|
||||
extern u16 HuPadBtnDown[4];
|
||||
extern u8 HuPadDStk[4];
|
||||
|
||||
extern OSHeapHandle currentHeapHandle;
|
||||
|
||||
extern BOOL saftyFrameF;
|
||||
extern u16 strlinecnt;
|
||||
extern u16 empstrline;
|
||||
extern int fontcolor;
|
||||
extern u32 procfunc;
|
||||
|
||||
extern WipeState wipeData;
|
||||
|
||||
extern PlayerConfig gPlayerConfig[4];
|
||||
|
||||
#endif
|
||||
|
|
@ -4,13 +4,6 @@
|
|||
const double _half = 0.5;
|
||||
const double _three = 3.0;
|
||||
|
||||
extern WipeState wipeData;
|
||||
|
||||
extern PlayerConfig gPlayerConfig[4];
|
||||
extern u16 HuPadBtnDown[4];
|
||||
extern u8 HuPadDStk[4];
|
||||
extern int fontcolor;
|
||||
|
||||
static void SubchrMain(void);
|
||||
|
||||
static u8 cur_direction[4];
|
||||
|
|
@ -64,12 +57,12 @@ static u16 GetBtns(void)
|
|||
|
||||
static void SubchrMain()
|
||||
{
|
||||
int prev_character[4];
|
||||
int character[4];
|
||||
int ext_character[4];
|
||||
int i, cursor_pos;
|
||||
for(i=0; i<4; i++) {
|
||||
prev_character[i] = gPlayerConfig[i].character;
|
||||
character[i] = 0;
|
||||
character[i] = gPlayerConfig[i].character;
|
||||
ext_character[i] = 0;
|
||||
cur_direction[i] = 0;
|
||||
}
|
||||
cursor_pos = 0;
|
||||
|
|
@ -88,16 +81,16 @@ static void SubchrMain()
|
|||
} else {
|
||||
fontcolor = 12;
|
||||
}
|
||||
if(character[i] != 0) {
|
||||
print8(x+200, y, 2.0f, ext_character_str[character[i]]);
|
||||
if(ext_character[i] != 0) {
|
||||
print8(x+200, y, 2.0f, ext_character_str[ext_character[i]]);
|
||||
} else {
|
||||
print8(x+200, y, 2.0f, character_str[prev_character[i]]);
|
||||
print8(x+200, y, 2.0f, character_str[character[i]]);
|
||||
}
|
||||
}
|
||||
if(GetBtns() & 0x1000) {
|
||||
for(i=0; i<4; i++) {
|
||||
if(character[i] != 0) {
|
||||
gPlayerConfig[i]. character = character[i]+7;
|
||||
if(ext_character[i] != 0) {
|
||||
gPlayerConfig[i]. character = ext_character[i]+7;
|
||||
}
|
||||
}
|
||||
fn_80032A58(30);
|
||||
|
|
@ -111,13 +104,13 @@ static void SubchrMain()
|
|||
} else {
|
||||
if(GetBtns() & 0x1) {
|
||||
do {
|
||||
character[cursor_pos]--;
|
||||
if(character[cursor_pos] < 0) {
|
||||
character[cursor_pos] = 6;
|
||||
ext_character[cursor_pos]--;
|
||||
if(ext_character[cursor_pos] < 0) {
|
||||
ext_character[cursor_pos] = 6;
|
||||
}
|
||||
for(i=0; i<4; i++) {
|
||||
if(cursor_pos != i) {
|
||||
if(character[cursor_pos] == character[i] && character[cursor_pos] != 0) {
|
||||
if(ext_character[cursor_pos] == ext_character[i] && ext_character[cursor_pos] != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -126,13 +119,13 @@ static void SubchrMain()
|
|||
}
|
||||
if(GetBtns() & 0x2) {
|
||||
do {
|
||||
character[cursor_pos]++;
|
||||
if(character[cursor_pos] > 6) {
|
||||
character[cursor_pos] = 0;
|
||||
ext_character[cursor_pos]++;
|
||||
if(ext_character[cursor_pos] > 6) {
|
||||
ext_character[cursor_pos] = 0;
|
||||
}
|
||||
for(i=0; i<4; i++) {
|
||||
if(cursor_pos != i) {
|
||||
if(character[cursor_pos] == character[i] && character[cursor_pos] != 0) {
|
||||
if(ext_character[cursor_pos] == ext_character[i] && ext_character[cursor_pos] != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
#include "common.h"
|
||||
#include "dolphin/os.h"
|
||||
|
||||
extern OSHeapHandle currentHeapHandle;
|
||||
|
||||
static u32 HeapSizeTbl[5] = { 0x240000, 0x140000, 0xA80000, 0x580000, 0 };
|
||||
static void *HeapTbl[5];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue