SSBM Decomp
Loading...
Searching...
No Matches
inlines.h
Go to the documentation of this file.
1#ifndef MELEE_GM_INLINES_H
2#define MELEE_GM_INLINES_H
3
5#include <melee/ty/toy.h>
6
7static inline s32 gmClampResultStat(s32 value)
8{
9 if (value > 999999) {
10 value = 999999;
11 } else if (value < -999999) {
12 value = -999999;
13 }
14 return value;
15}
16
18static inline s32 fn_801A7FB4_inline(void)
19{
20 s32 i;
21 s32 count;
22 count = 0;
23 for (i = count; i < 0x1A; i++) {
24 if (Toy_803048C0(gm_801A659C(i)) ? true : false) {
25 count++;
26 }
27 }
28 return count;
29}
30
31static inline s32 fn_801A7FB4_inline2(void)
32{
33 s32 count;
34 s32 i;
35 count = 0;
36 for (i = count; i < 0x1A; i++) {
37 if (Toy_803048C0(gm_801A659C(i)) ? true : false) {
38 count++;
39 }
40 }
41 return count;
42}
43
44static inline f32 gmTournament_GetPlayerX(u8 player_count, s32 player)
45{
46 if ((s32) player_count == 4) {
47 return (13.0f * (f32) player) + -19.5f;
48 }
49 if ((s32) player_count == 3) {
50 return 6.5f + ((13.0f * (f32) player) - 19.5f);
51 }
52 return 6.5f + ((13.0f * (2.0f * (f32) player)) - 19.5f);
53}
54
55static inline void gmTournament_SetPlayerX(f32* x, u8 player_count, s32 player)
56{
57 if ((s32) player_count == 4) {
58 *x = (13.0f * (f32) player) + -19.5f;
59 } else if ((s32) player_count == 3) {
60 *x = 6.5f + ((13.0f * (f32) player) - 19.5f);
61 } else {
62 *x = 6.5f + ((13.0f * (2.0f * (f32) player)) - 19.5f);
63 }
64}
65
66#endif
static s32 fn_801A7FB4_inline(void)
Definition inlines.h:18
static f32 gmTournament_GetPlayerX(u8 player_count, s32 player)
Definition inlines.h:44
static void gmTournament_SetPlayerX(f32 *x, u8 player_count, s32 player)
Definition inlines.h:55
static s32 gmClampResultStat(s32 value)
Definition inlines.h:7
static s32 fn_801A7FB4_inline2(void)
Definition inlines.h:31
bool gm_801A659C(int arg0)
Definition gmregtyfall.c:87
signed int s32
Definition types.h:12
float f32
Definition types.h:18
unsigned char u8
Definition types.h:5
int x
Definition types.h:0
s32 Toy_803048C0(int arg0)
Definition toy.c:565