Skip to content

Commit

Permalink
more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
BR- committed Jan 27, 2024
1 parent b83dada commit df70582
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 8 deletions.
110 changes: 108 additions & 2 deletions src/melee/db/db_2253.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ void db_8022659C(void)
int sp8;

HSD_GObj* gobj = DevText_GetGObj();
db_804D6B40 &= ~0x80;
db_804D6B40.bits.b0 = 0;
db_8049FAC8.x0 = DevText_Create(6, 20, 20, 60, 7, db_8049FAC8.x4);
if (db_8049FAC8.x0 != NULL) {
sp14 = db_804DBD08;
Expand All @@ -667,7 +667,111 @@ void db_8022659C(void)
}
}

///////////////////////////////
void db_8022666C(void)
{
int stack[2];
DevText* text;
StaticPlayer* player;
s32 slot;

if (db_804D6B40.bits.b0) {
text = db_8049FAC8.x0;
DevText_Erase(text);
DevText_SetCursorXY(text, 0, 0);
DevText_Printf(text, "A B C D E F G");
for (slot = 0; slot < 6; slot++) {
player = Player_GetPtrForSlot(slot);
DevText_Printf(text, "\n%d %d %2d %d %2.2f %2.2f %2.2f",
player->player_state, player->cpu_level,
player->cpu_type, player->handicap, player->unk50,
player->attack_ratio, player->defense_ratio);
}
}
}

void db_80226730(int arg0)
{
if ((db_8022558C_suppress_inline(arg0) & 0x200) &&
(db_802255A4_suppress_inline(arg0) & 4))
{
db_804D6B40.bits.b0 ^= 1;
if (db_804D6B40.bits.b0 == 0) {
DevText_HideBackground(db_8049FAC8.x0);
DevText_HideText(db_8049FAC8.x0);
return;
}
DevText_ShowBackground(db_8049FAC8.x0);
DevText_ShowText(db_8049FAC8.x0);
}
}

void db_802267C8(void)
{
s32 sp14;
s32 sp10;
s32 spC;
s32 sp8;
HSD_GObj* temp_r3;

temp_r3 = DevText_GetGObj();
M2C_FIELD(&db_804D6B48, u8*, 0) =
(M2C_FIELD(&db_804D6B48, u8*, 0) & ~0xE0) | 0x20;
M2C_FIELD(&db_804D6B48, u8*, 1) = M2C_FIELD(&db_804D6B48, u8*, 1) & ~0x40;
M2C_FIELD(&db_804D6B48, u8*, 0) =
M2C_FIELD(&db_804D6B48, u8*, 0) & ~0x1F80;
*db_8049FE18 = DevText_Create(7, 0x14, 0x14, 0x3C, 0xC, db_8049FE18 + 4);
if (*db_8049FE18 != NULL) {
sp14 = db_804DBD18;
sp10 = db_804DBD1C;
DevText_Show(temp_r3, *db_8049FE18, db_804DBD18);
DevText_HideCursor(*db_8049FE18);
spC = sp14;
DevText_SetBGColor(*db_8049FE18, &spC);
sp8 = sp10;
DevText_SetTextColor(*db_8049FE18, &sp8);
DevText_SetScale(*db_8049FE18, M2C_BITWISE(f32, db_804DBD20),
M2C_BITWISE(f32, db_804DBD24));
}
}

void db_802268B8(void)
{
Fighter* temp_r5;
Fighter_GObj* var_r4;
s32 temp_r3;

temp_r3 = (db_804D6B48 >> 7) & 0x3F;
if (temp_r3 != 0) {
db_804D6B48 =
(db_804D6B48 & ~0x1F80) | ((((temp_r3 * 2) & 0x3E) << 7) & 0x1F80);
} else {
db_804D6B48 = (db_804D6B48 & ~0x1F80) | 0x80;
}
var_r4 = HSD_GObj_Entities->fighters;
loop_5:
if (var_r4 != NULL) {
temp_r5 = var_r4->user_data;
temp_r5->x21FC_flag.u8 =
((db_804D6B48 >> 5) & 0xFC & ~3) | (temp_r5->x21FC_flag.u8 & 3);
var_r4 = var_r4->next;
goto loop_5;
}
if ((db_804D6B48 >> 7) & 2) {
db_80225BF0();
} else {
db_80225C44();
}
if ((db_804D6B48 >> 7) & 8) {
db_80225C8C();
} else {
db_80225CD4();
}
if ((db_804D6B48 >> 7) & 0x20) {
db_80225B48();
return;
}
db_80225B9C();
}

u8 db_8022697C(Fighter_GObj* owner)
{
Expand All @@ -679,6 +783,8 @@ u8 db_8022697C(Fighter_GObj* owner)
}
}

/////////////////////////////////////////////////////////////////////////////

void db_8022886C(void)
{
db_804D6B94 = 0;
Expand Down
4 changes: 1 addition & 3 deletions src/melee/db/db_2253_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ int db_803EABDC[0xD] = { 0 };
char db_string_803EAC10[0x78] =
"Item=%d Foods=%d Yaku=%d Sp_Item=%d Pokemon=%d PokeShot=%d CZako=%d "
"CZakoShot=%d Zako=%d ZakoShot=%d Shot=%d Etc=%d\n";
char db_string_803EACD8[0x18] = "A B C D E F G";
char db_string_803EACF0[0x20] = "\n%d %d %2d %d %2.2f %2.2f %2.2f";
char db_string_803EAD10[0x10] = "EYE %d,%d,%d";
char db_string_803EAD20[0x10] = "INT %d,%d,%d";
char db_string_803EAD30[0x10] = "FOV %d ANG %d";
Expand Down Expand Up @@ -228,7 +226,7 @@ void* db_804D6B2C;
unsigned short db_804D6B30;
DevText* db_804D6B38;
int db_804D6B3C;
int db_804D6B40;
UnkFlagStruct db_804D6B40;
int db_804D6B48;
int db_804D6B50;
int db_804D6B58;
Expand Down
6 changes: 3 additions & 3 deletions src/melee/pl/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ typedef struct _StaticPlayer {
/*0x46*/ s8 controller_index;
/*0x47*/ u8 team; /// 00 = red, 01 = blue, 02 = green
/*0x48*/ s8 player_id;
/*0x49*/ s8 cpu_level;
/*0x4A*/ s8 cpu_type;
/*0x4B*/ s8 handicap;
/*0x49*/ u8 cpu_level;
/*0x4A*/ u8 cpu_type;
/*0x4B*/ u8 handicap;

/*0x4C*/ s8 unk4C;
/*0x4D*/ s8 unk4D;
Expand Down

0 comments on commit df70582

Please sign in to comment.