Commit Graph

58 Commits

Author SHA1 Message Date
Pieter-Jan Briers a6376368ee String safety (#1548)
* Array size UB fixes

* Fix ShieldD

* Remove (almost) all unsafe strcpy calls

Bunch of macros. C arrays are easy enough and just need a different call. For various cases where a char* is passed around bare, I've made a TEXT_SPAN macro that can store a length too for bounds checking.

* Move crash handling in safe string operations to separate TU

* strcat safe version

* sprintf made safe too

* Fix compile
2026-05-24 10:43:00 -06:00
Pheenoh 901ce2ee4c add debug fly cam option 2026-05-03 15:23:59 -06:00
MelonSpeedruns ba58d2486e Free Camera (#542)
* freecam wip

* added manual mode

* fix freecam collision

* made freecam into its own function

* Added settings & Radius modification when camer is higher up

---------

Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
2026-04-25 21:35:43 -06:00
PJB3005 3229afa0b1 More TU debug consistency
Thought this was the cause of #264. Didn't end up being the case but figure it's still best to fix it.
2026-04-07 15:44:43 +02:00
TakaRikka 820327989c fix event camera ptr param size 2026-03-12 21:15:50 -07:00
Pieter-Jan Briers b289dece80 26 02 27 pjb dev 2 (#41)
* fix kankyo UB

* Fix TEV Stage DL writing

BE issue

* BE Fixes in materials/shapes

* Move to Aurora GD impl

* JUTDataFileHeader

* j3d: load vertex and texture not through GD

* Endian swap vertex data (mostly)

* Just exit(0) when closing the game

Fix crashes :godo:

* fix fopAcM_ct_placement and remove memcpy

* J3D: track vertex arrays correctly, swap work

* fix visibility, turn off overridden new/delete when we call into aurora

* event: cut name be

* Default window improvements

Double size, allow OS to decide position

* survive TParse::parseHeader_next

* color swap fix

* swap endian/fixes oob function pointer

* Remove GXGetViewportv stub

Aurora has it now

* Set array pointers via GD again

Relies on https://github.com/encounter/aurora/pull/35

* Let Aurora decide graphics backend

* disable procbar drawing

* Fix TColor endianness conversion issues

Fixes the wrong color for the flashing logo

* cam param swap

* simplify vtx loading, mat/amb color fix

* endian swap stb/fvb data

* aurora stat changes

* fix storage buffer crash

dont unnecessarily reassign vertex buffers in a way that forces aurora to recache things

* set bgobj spec fix

* add camera debug, endian swap more stb data, d_a_bg_obj::spec_data_c swapped

* JKRExpHeap: fix bad allocator slowdown

* solid tex

* texture caching

* log level

* fix window aspect ratio, disable bloom, endian swap camera type data

camera is now actually playing opening cutscene!!!!

* add GXDestroyTexObj to a couple stack init'd GXTexObjs, remove some diag printfs

* endian swap joint weight envelope data

* move to dusk config

* verbose arg errors

* better stub logging (for now)

* less logging, more BE

* more stubbing, move logging stuff around

* move all logging to aurora logging

* fix STUB_LOG, __FUNCTION__ isn't a string literal, wasn't building as it
was.

* update aurora

* fix heap alignment mismatch and always head align for now

* prevent them from fucking up my shit

* forward jut warning to DuskLog

* remove report logging

* maybe and i must emphasize maybe fix JMessage parsing

* this was a dumb idea

* preserve negative alignment for JKRHeap

* use normal free on macos and linux

* ^

* fix JMAHermiteInterpolation c impl

* endian swap J2DScreen mColor (oops)

* swap more J3D anim data, remove weird pointer addr check in J3DMaterial getMaterialAnm

* typo fix

* Fix aligned_alloc() size issues on POSIX

aligned_alloc() requires its input size to be a multiple of alignment. This wasn't being upheld so there were allocation failures in init code that made the game fail to start outside Windows.

Also just cleaned up some of this code a bit and removed fallback cases that *shouldn't* get hit.

* _Exit instead of exit()

Seriously I don't want destructors to run. Let the OS reclaim that shit.

* Reapply "Isolate JKRHeap operator overloads" (#39)

This reverts commit 3623b27f37.

* Fix some oopsies

* Fix hardcoded pointer size in JUTCacheFont::allocArray

* More operator overload fixes

Add void template specialization for jkrDelete

Add new[] placement overload. Apparently.

* Fix delete macros on nullptr

TIL C++ allows that.

* fix delete[]

* fix new(std::nothrow) overload

* fix avoid ub

* swap remaining anim data needed for title logo

* get rid of op 7

* move aurora_end_frame to correct spot

* juttexture destroy tex

* j2d animation be

* shutdown crash

* link warp material fix

* mDoExt_3DlineMat1_c fix

* hacky keyboard controls

* endian swap J2DResReference, add kb_pad to files.cmake

* fix some missing endian swaps in J2D, remove addr alignment check

* Remove heap unsetting in aurora calls

Never worked properly and not the right solution even if it did

* Don't print in DC stubs

They're fine to never implement

* Fix alignment stuff again

* Compile GF from dolphin lib

Doesn't seem to break anything and shuts up some stub warnings

* j3dtexture tlut obj fix

* addTexMtxIndexInDL fix

* don't recreate null tex data every frame

* the actual fix i wanted to push

* its kinda fakematch city over here

* insert hte efb copy

* limited window size / viewport support

* IsDelete FIX

---------

Co-authored-by: madeline <qwertytrogi@gmail.com>
Co-authored-by: Jasper St. Pierre <jstpierre@mecheye.net>
Co-authored-by: Jeffrey Crowell <jeff@crowell.biz>
Co-authored-by: TakaRikka <takarikka@outlook.com>
Co-authored-by: CraftyBoss <talibabdulmaalik@gmail.com>
Co-authored-by: Lurs <2795933+Lurs@users.noreply.github.com>
2026-03-08 15:27:15 -07:00
TakaRikka c9a46bd65b d_s_logo / d_s_play debug work, d_a_kago cleanup, misc cleanup (#3116)
* d_a_kago cleanup

* d_s_logo wii/shield work

* d_s_logo / d_s_play debug work

* fix missing profile class sizeof's

* fix phase->id values

* build fixes

* fix dCamera_c and camera profile
2026-03-01 13:19:48 -08:00
TakaRikka c9e2a73dda general cleanup, d_menu_quit / d_a_obj_testcube mostly done, d_msg_scrn_explain debug (#3065)
* typedef for cPhs_Step

* make sdk includes consistent

* d_menu_quit / d_msg_scrn_explain debug

* d_a_obj_testcube mostly done

* d_debug_pad mostly done

* jstudio tool library headers

* some JStudioCameraEditor headers

* d_jcam_editor mostly done

* try fixing some shield regressions

* d_bg_parts mostly done

* fix merge errors

* debug fix
2026-01-24 23:36:23 -08:00
roeming 7c71acb6b6 match d_a_npc_tk for debug (#3046)
* match d_a_npc_tk for debug

* fix macro usage

* fix whitespace
2026-01-17 15:45:52 +02:00
TakaRikka ccdb3fbd2a d_a_alink cleanup / debug work (#3045)
* start d_a_alink debug cleanup

* d_a_alink_damage debug

* d_a_alink_guard debug

* d_a_alink_bow debug

* d_a_alink_boom debug

* d_a_alink_copyrod debug

* d_a_alink_hvyboots debug

* d_a_alink_grab debug

* d_a_alink_sumou debug

* d_a_alink_horse debug

* d_a_alink_canoe debug

* d_a_alink_crawl / d_a_alink_hang debug

* d_a_alink_swim debug

* d_a_alink_hook / d_a_alink_iceleaf debug

* d_a_alink_bottle debug

* d_a_alink_whistle / d_a_alink_kandelaar / d_a_alink_ironball debug

* d_a_alink_demo debug

* d_a_alink_effect debug

* d_a_alink_wolf debug

* d_a_alink debug / cleanup

* cleanup button status enums
2026-01-17 15:44:37 +02:00
Max Roncace 91d97cf3f4 d_camera debug almost matching (#3032) 2026-01-11 19:20:17 -08:00
Carco_21 2910d7da76 Various d_ work (#2968)
* map work

* various meter work

* d_meter_button ShieldD almost equivalent

* error fix
2025-12-20 18:06:17 -08:00
Max Roncace 4fa301a6da Clean up conditional compilation a bit (#2943) 2025-12-11 15:34:16 -08:00
TakaRikka dfa8efa97b project cleanup (#2895)
* some wii OS fixes

* remove old dol2asm comments

* remove dol2asm.h

* remove function address comments

* normalize ATTRIBUTE_ALIGN usage

* DECL_WEAK macro

* fix gcc attribute weak macro

* wrap more mwcc specific things in ifdefs

* fixes

* fix revo sdk version flags

* fixes
2025-11-30 15:23:42 -07:00
TakaRikka 691aac252b wii building OK / m_Do_graphic debug work (#2815)
* wii building OK + m_Do_graphic debug work

* d_meter_HIO debug cleanup

* wii m_Do_graphic stuff

* tag_attack_item OK, mirror_chain almost

* fix build

* mg_fshop matching
2025-11-17 20:01:03 +02:00
TakaRikka b841290afa d_debug_camera mostly done (#2695)
* d_debug_camera mostly done

* update some alink demo stuff

* some misc debug stuff
2025-09-25 18:20:46 +03:00
Max Roncace 42034fd364 More miscellaneous TU improvements (#2665) 2025-09-17 15:01:59 +03:00
Max Roncace 6b1f5b95de d_camera almost matching (equivalent) (#2633) 2025-09-08 14:41:07 +03:00
Max Roncace 30afae62d1 d_camera improvements (part 1) (#2623)
* Rename several dCamera_c fields

* Refactor mWork to generic buffer instead of union

* d_camera match improvements

* Implement several dCamera_c functions

* Remove d_camera.h from PCH

The symbol names in d_camera indicate that this header wasn't
included in the PCH (as they're compiled directly in d_camera.cpp).
2025-09-03 10:32:02 +03:00
hatal175 e9348e07f8 d_a_obj_tobyhouse equivalent (#2546) 2025-07-20 16:57:50 -07:00
Łukasz Starzyk 69870d11bf New matches in d_camera_c (#2498)
* dCamera_c::blureCamera matching

* store progress

* camera store matching (regalloc)

* setEventRecoveryTrans matching

* matched currentEvCamera and runEventRecoveryTrans

* Fix
2025-06-24 21:51:18 +03:00
YunataSavior 7fdbc22fea d_a_npc_ks equivalent (#2481) 2025-06-10 19:19:55 +03:00
hatal175 5b8f2102e7 Sakuita rope Matching (#2470)
* Change dComIfGp_getAttention to return a pointer

* d_a_obj_sakuita_rope Matching
2025-06-01 20:36:19 -07:00
YunataSavior b26f9b8389 Continued cleanup of d_ev_camera functions (#2458) 2025-05-27 02:50:32 -07:00
YunataSavior 0178c4d576 Debug and various d_ev_camera fixes (#2448) 2025-05-19 18:40:57 +03:00
Carco_21 34f4bf0c0f More d_ev_camera work (#2422)
* Work on fixedFrameEvCamera

* Work on stokerEvCamera

* Small work

* Cleanup and started on transEvCamera

* Work on watchActorEvCamera

* Work on gameOverEvCamera and other cleanup

* Implemented mWork pointer logic where needed

* Small work on useItem0EvCamera

* Work on bSplineEvCamera

* work on twoActor0EvCamera function and cleanup

* Work on transEvCamera

* Cleanup

* Work on possessedEvCamera

* Work on fixedFramesEvCamera & started on digHoleEvCamera

* All functions have been at least somewhat worked on

* Further general work and cleanup
2025-05-06 17:30:19 -07:00
YunataSavior fb9fd4229a Fix debug build for fixedFrameEvCamera while also getting some overall matching (#2415) 2025-05-02 00:37:15 +03:00
Carco_21 1aba90e76c d_ev_camera work (#2412)
* Work on fixedFrameEvCamera

* Work on stokerEvCamera

* Small work

* Cleanup and started on transEvCamera

* Work on watchActorEvCamera

* Work on gameOverEvCamera and other cleanup

* Implemented mWork pointer logic where needed

* Small work on useItem0EvCamera

* Work on bSplineEvCamera

* work on twoActor0EvCamera function and cleanup

* Work on transEvCamera

* Cleanup
2025-04-30 15:46:15 -07:00
Caroline Madsen 03fafe3e15 d_camera work (#2369)
* bumpCheck matching

* checkGroundInfo matching

* chaseCamera matching

* lockonCamera attempted

* talktoCamera matching

* subjectCamera, magneCamera matching

* colosseumCamera close, plus various fixes

* towerCamera attempted

* hookshotCamera matching
2025-04-01 19:05:30 -07:00
LagoLunatic 0ff06d2974 Debug version now builds OK and all_source compiles (#2343)
* Fix missing arg to JUT_ASSERT

* Fix some MWCC version diff errors

* Compile m_Do_ext, d_demo, actor_mng

* Add VSCode task to quickly switch between versions

* Unlink magLift for debug

* Update the hash of the debug dol

The old cbea5fa... hash here was for the dol generated by the alf2dol.py script, which produces incorrect alignment.

The dol with the new hash can be obtained by using `dtk elf2dol` to convert the debug .alf file to a dol.

The DOL now builds OK.

* Fix all debug REL dtor splits

All RELs now also build OK, meaning `ninja build/ShieldD/ok` now succeeds.

* Add genMessage declarations to all HIO subclasses

* Fixing more compilation errors

* m_Do_mtx 100% on debug

Cannot be linked due to weak function name mangling?

* Improve various matches

* Fix all remaining compilation errors

* Fix new compilation errors from main

* Fix retail regression

* Link f_pc_profile_lst
2025-03-22 18:00:51 -07:00
TakaRikka f06311cd09 tag_allmato almost, swhit0 treesh swball done, misc cleanup (#2312)
* d_a_tag_allmato almost done

* d_a_swhit0 done

* some SSystem cleanup

* treesh done

* swball done, some other rel cleanup
2025-03-01 14:48:49 +02:00
Caroline Madsen f628e2e6ff d_a_e_dt, d_a_e_ot equivalent (#2305) 2025-02-20 22:44:54 -08:00
TakaRikka e7b0ad79e0 tbox/camera/d_bg_w_kcol work and cleanup (#2262)
* some camera/tbox cleanup

* d_bg_w_kcol work

* make item name enum better
2024-12-10 18:46:19 +02:00
Caroline Madsen f4b2f9c8f2 d_camera work (#2226) 2024-10-26 21:35:25 -07:00
TakaRikka bed1416897 d_a_alink work / lv4digsand done / e_s1 matched (#2224)
* d_a_alink work / d_a_obj_lv4digsand done

* d_a_e_s1 matched, not linked

* d_a_e_s1 documentation
2024-10-25 06:47:02 +03:00
Caroline Madsen 434f63ccb8 d_a_b_yo and d_a_b_yo_ice mostly OK (#2219) 2024-10-19 11:54:40 +03:00
TakaRikka 5935a0f308 d_a_alink work / bump dtk version (#2205) 2024-10-12 15:11:17 -07:00
TakaRikka 178194ccb2 switch to dtk setup (#2203)
* switch to dtk setup

* some cleanup / fixes

* cleanup d_a_alink literals

* Restore doxygen, update CI & README.md (#1)

* Fix build image ref (#2)

---------

Co-authored-by: Luke Street <luke@street.dev>
2024-10-10 08:29:58 -06:00
TakaRikka 15beac5c48 firewood/tornado/tag_camera done, obj_drop almost (#2190)
* firewood done, obj_drop mostly done

* obj_tornado done, cleanup obj_tornado2

* tag_camera done

* remove asm

* tag_msg done
2024-08-12 21:34:01 +03:00
TakaRikka 2f689ced90 work on d_camera / d_ev_camera (#2170) 2024-06-25 08:34:59 -06:00
Pheenoh 7154ac08e1 d_a_e_fz work, doxygen revamp (#2127)
* initial freezard actor struct + setActionMode OK

* daE_FZ_Draw

* setReflectAngle

* mBoundSoundset

* daE_FZ_Execute & execute

* demoDelete

* daE_FZ_Delete & _delete

* CreateHeap

* useHeapInit

* cc_set

* mtx_set

* action WIP

* way_gake_check

* executeRollMove

* executeMove

* draw WIP

* executeDamage

* checkpoint

* create

* checkpoint

* daE_FZ_c::executeWait

* checkpoint

* daE_FZ_c::damage_check almost done

* rm asm

* rm headers

* setup_profile WIP + doxygen update

* fix merge issues

* docs fix?

* fix2

* doxygen updates

* setup g_profile_E_FZ, profile setup script WIP

* update github actions

* update progress.md
2024-04-12 00:10:30 -06:00
TakaRikka d14757be50 d_a_e_yd_leaf and d_a_e_ph done (#2070)
* d_a_e_yd_leaf done

* d_a_e_ph OK

* remove asm

* some e_ph doc

* match dBgS_Acch, fix f_op_actor_mng weak funcs

* dBgS_Acch done

* cleanup dBgS Chk TUs

* d_a_obj done
2024-02-13 11:21:57 -07:00
TakaRikka 75139dbe2d d_meter2_draw done (#2028)
* d_meter2_draw done

* some meter_draw doc

* remove asm

* d_file_sel_info fixed
2024-01-09 16:10:40 +02:00
TakaRikka bbacd1a0e8 most of d_a_alink_wolf done / some misc (#1993)
* wip on alink_wolf

* setup procvar unions

* most of d_a_alink_wolf done + some misc
2023-11-27 13:14:06 +02:00
TakaRikka 6dc30875b3 d_envse mostly OK. more work on kankyo_rain (#1969)
* d_envse OK, work on kankyo_rain

* remove asm
2023-10-25 23:16:56 +03:00
TakaRikka 6601c9d5e1 d_a_andsw2 OK, d_a_player / d_a_alink cleanup, d_a_alink_hook mostly done (#1957)
* d_a_andsw2 OK

* d_a_player cleanup, d_a_alink cleanup and work on d_a_alink_hook

* remove asm

* d_kankyo_wether almost done

* some work on d_kankyo_rain
2023-10-11 01:12:08 -07:00
Pheenoh f9380b3e05 d_a_obj_carry work, SETUP_ACTOR macro, header cleanup (#1885)
* d_a_obj_carry work, SETUP_ACTOR macro

* rm headers, add script

* progress

* macro rename, consistent spacing
2023-08-16 12:07:52 -07:00
Jcw87 4346df764b Remove #includes from headers (#334)
* add "global.h" to files that use it

* add MSL_C includes to files that use them

* remove dolphin includes from headers that don't need them

* remove JSupport includes from headers that don't need them

* remove JKernel includes from headers that don't need them

* remove JUtility includes from headers that don't need them

* remove J3D includes from headers that don't need them

* remove J2D includes from headers that don't need them

* remove JAudio2 includes from headers that don't need them

* remove Z2AudioLib includes from headers that don't need them

* remove JMessage includes from headers that don't need them

* remove JParticle includes from headers that don't need them

* remove SComponent includes from headers that don't need them

* remove dol includes from headers that don't need them

* sort includes
2023-05-12 12:10:14 -07:00
hatal175 424f62c02c Do some work on f_op_actor_mng (#328)
* decompctx - try without shiftjis and write utf8 as output

* Do some work on f_op_actor_mng

* Remove duplicated includes

* Add fopAcM_setEffectMtx

* Match dShopSystem_searchCameraActor

* fopAcM_setEffectMtx now matches with literals

* Remove unnecessary inline in headers
2023-05-08 15:10:22 -07:00
TakaRikka 4003339575 another d_a_alink pass (#305)
* big pass on many d_a_alink files

* remove asm

* fix d_a_tag_spring

* fix

---------

Co-authored-by: root <root@DESKTOP-BTVP2BC>
2023-03-07 11:44:25 -07:00