Added Luigi to courtyard and BoB, fixed some crashing issues

This commit is contained in:
MysterD 2020-08-03 17:59:44 -07:00
parent 7d0c8ec11d
commit 6878b47833
8 changed files with 16 additions and 3 deletions

View File

@ -1 +1 @@
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'run' -ex 'quit'
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break debug_breakpoint_here' -ex 'run' -ex 'quit'

View File

@ -1 +1 @@
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break render_pause_courses_and_castle'
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1 && winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break debug_breakpoint_here'

View File

@ -66,6 +66,7 @@ const LevelScript level_bob_entry[] = {
LOAD_RAW( /*seg*/ 0x0F, _common0_geoSegmentRomStart, _common0_geoSegmentRomEnd),
ALLOC_LEVEL_POOL(),
MARIO(/*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario),
LUIGI(/*model*/ MODEL_LUIGI, /*behParam*/ 0x00000002, /*beh*/ bhvLuigi),
JUMP_LINK(script_func_global_1),
JUMP_LINK(script_func_global_4),
JUMP_LINK(script_func_global_15),

View File

@ -40,6 +40,7 @@ const LevelScript level_castle_courtyard_entry[] = {
LOAD_RAW( /*seg*/ 0x0F, _common0_geoSegmentRomStart, _common0_geoSegmentRomEnd),
ALLOC_LEVEL_POOL(),
MARIO(/*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario),
LUIGI(/*model*/ MODEL_LUIGI, /*behParam*/ 0x00000002, /*beh*/ bhvLuigi),
JUMP_LINK(script_func_global_1),
JUMP_LINK(script_func_global_10),
LOAD_MODEL_FROM_GEO(MODEL_COURTYARD_SPIKY_TREE, spiky_tree_geo),

View File

@ -2,4 +2,4 @@ set -e
make BETTERCAMERA=1 NODRAWINGDISTANCE=1 DEBUG=1 IMMEDIATELOAD=1
./build/us_pc/sm64.us.f3dex2e.exe --server --configfile sm64config_server.txt &
#./build/us_pc/sm64.us.f3dex2e.exe --client --configfile sm64config_client.txt &
winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'run --client --configfile sm64config_client.txt' -ex 'quit'
winpty cgdb ./build/us_pc/sm64.us.f3dex2e.exe -ex 'break debug_breakpoint_here' -ex 'run --client --configfile sm64config_client.txt' -ex 'quit'

View File

@ -794,6 +794,7 @@ s16 geo_update_animation_frame(struct GraphNodeObject_sub *obj, s32 *accelAssist
struct Animation *anim;
anim = obj->curAnim;
if (anim == NULL) { return obj->animFrame; }
if (obj->animTimer == gAreaUpdateCounter || anim->flags & ANIM_FLAG_2) {
if (accelAssist != NULL) {

View File

@ -221,6 +221,8 @@ void draw_skybox_tile_grid(Gfx **dlist, s8 background, s8 player, s8 colorIndex)
for (row = 0; row < 3; row++) {
for (col = 0; col < 3; col++) {
s32 tileIndex = sSkyBoxInfo[player].upperLeftTile + row * SKYBOX_COLS + col;
// UGLY HACK: if the camera moves weird after a level transition this can go too high
if (tileIndex > 79) { tileIndex = 79; }
const u8 *const texture =
(*(SkyboxTexture *) segmented_to_virtual(sSkyboxTextures[background]))[tileIndex];
Vtx *vertices = make_skybox_rect(tileIndex, colorIndex);

View File

@ -85,7 +85,15 @@ static void keyboard_init(void) {
#endif
}
static void debug_breakpoint_here(void) {
// create easy breakpoint position for debugging
}
static void keyboard_read(OSContPad *pad) {
// create easy breakpoint position for debugging
if (keyboard_buttons_down & L_TRIG) {
debug_breakpoint_here();
}
pad->button |= keyboard_buttons_down;
const u32 xstick = keyboard_buttons_down & STICK_XMASK;
const u32 ystick = keyboard_buttons_down & STICK_YMASK;