mirror of
https://github.com/pmret/papermario.git
synced 2026-04-09 08:00:09 -04:00
* fixing segment * redoing subtree * git subrepo clone https://github.com/ethteck/splat.git tools/splat subrepo: subdir: "tools/splat" merged: "99cf514297" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "99cf514297" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * fix symbol_addrs * sweet victory * reformat collision_main_lateral.s * Lots of matches, fixed diff.py issue, improved coverage.py * some more * update symbol_addrs * git subrepo pull tools/splat subrepo: subdir: "tools/splat" merged: "c46026725a" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "c46026725a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * update symbol_addrs * fix disasm * 2 mo * Jenkinsfile * PR comments * check_input_status_menu, removing some macros * a few funcs * assist updates * UnkAlphaFunc * UnkPartnerPosFuncs * Deleting stuff * oopz * dead_syms.txt, UnkNpcAIFunc14 * update symbol_addrs * cleanup * symbol_addrs * cleanup
61 lines
1.7 KiB
C
61 lines
1.7 KiB
C
#include "common.h"
|
|
|
|
INCLUDE_ASM(s32, "code_fe0b0_len_5a0", SetSpriteShading);
|
|
|
|
ApiStatus EnableSpriteShading(ScriptInstance* script, s32 isInitialCall) {
|
|
if (get_variable(script, *script->ptrReadPos) != 0) {
|
|
*D_80151328 |= 1;
|
|
} else {
|
|
*D_80151328 &= ~1;
|
|
}
|
|
return ApiStatus_DONE2;
|
|
}
|
|
|
|
s32 GetDemoState(ScriptInstance* script) {
|
|
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->demoState);
|
|
return ApiStatus_DONE2;
|
|
}
|
|
|
|
ApiStatus DemoPressButton(ScriptInstance* script, s32 isInitialCall) {
|
|
(*gGameStatusPtr)->demoButtonInput |= get_variable(script, *script->ptrReadPos);
|
|
return ApiStatus_DONE2;
|
|
}
|
|
|
|
ApiStatus DemoReleaseButton(ScriptInstance* script, s32 isInitialCall) {
|
|
(*gGameStatusPtr)->demoButtonInput &= ~get_variable(script, *script->ptrReadPos);
|
|
return ApiStatus_DONE2;
|
|
}
|
|
|
|
ApiStatus DemoSetButtons(ScriptInstance* script, s32 isInitialCall) {
|
|
(*gGameStatusPtr)->demoButtonInput = get_variable(script, *script->ptrReadPos);
|
|
return ApiStatus_DONE2;
|
|
}
|
|
|
|
ApiStatus DemoJoystickRadial(ScriptInstance* script, s32 isInitialCall) {
|
|
f32 a;
|
|
f32 b;
|
|
s32* thisPos = script->ptrReadPos;
|
|
|
|
a = get_float_variable(script, *thisPos++);
|
|
b = get_float_variable(script, *thisPos++);
|
|
|
|
(*gGameStatusPtr)->demoStickX = a * sin_deg(b);
|
|
(*gGameStatusPtr)->demoStickY = a * cos_deg(b);
|
|
|
|
return ApiStatus_DONE2;
|
|
}
|
|
|
|
ApiStatus DemoJoystickXY(ScriptInstance* script, s32 isInitialCall) {
|
|
f32 x;
|
|
f32 y;
|
|
s32* thisPos = script->ptrReadPos;
|
|
|
|
x = get_float_variable(script, *thisPos++);
|
|
y = get_float_variable(script, *thisPos++);
|
|
|
|
(*gGameStatusPtr)->demoStickX = x;
|
|
(*gGameStatusPtr)->demoStickY = y;
|
|
|
|
return ApiStatus_DONE2;
|
|
}
|