358 Commits

Author SHA1 Message Date
qwertyquerty e49be12297 RmlUi improvements (#663)
* rmlui audio

* fix menu select sound

* Fixes #662

* fix reset logic and fix popup getting stuck closed

* fix X button on menu popup

* rmlui achievements, and fix open/close bug

* presets, achievements css, and menu sounds toggle

* forgor

* fix b button causing audio when menu not visible
2026-05-04 10:25:13 -06:00
Luke Street 1c8bb1206e Unhackify mDoLib_project 2026-04-18 12:46:44 -06:00
Luke Street 5c20f527ac Widescreen rework & IR scaling 2026-04-17 23:11:43 -06:00
Luke Street 2db4040843 Make HUD viewport respect SDL_GetWindowSafeArea 2026-04-16 22:47:02 -06:00
Jasper St. Pierre a14fe187b9 bloom2 wip 2026-04-13 01:29:21 -07:00
Irastris 0e2bd104b1 Frame interp: Fix Epona's reins 2026-04-11 21:45:54 -04:00
PJB3005 9704f32411 Merge remote-tracking branch 'decomp/main' 2026-04-11 19:59:09 +02:00
Irastris fb9178cac9 Implement unlocked framerates via interpolation (#315)
* Disable waitForTick and waitBlanking

* Initial frame interpolation implementation

* Initial batch of speed fixes

* Fix Iron Boots

* Strip dead code once used for debugging

* Interpolate shadows

* Revert overzealous/redundant lookups

* Fix JUTFader

* Fix field map cursor

* Fix various particle effects

* Fix Midna when riding Wolf Link

* Fix title logo

* Title Logo 2: Electric Boogaloo

* Fixed grass and flowers

* "Unlock Framerate" config option (WIP)

* Wrap more things in TARGET_PC

* Finish wrapping things in TARGET_PC

* Missed one

* Disable dComIfGd_drawXluListInvisible when interpolating

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-04-11 01:06:25 -06:00
Max Roncace 3f8bbe7c57 Replace magic constants derived from framebuffer size (#3144) 2026-04-10 23:43:37 -07:00
PJB3005 63ade15e2c Cleanly shut down JKRDecomp thread
Properly join the thread to ensure it's shut down before we try to exit.

Fixes #268
2026-04-07 20:06:52 +02:00
MelonSpeedruns 49ad699eb3 fix reticles for good 2026-04-05 16:55:52 -04:00
MelonSpeedruns 3414cec13c initial commit with working 3D view at all times 2026-04-05 16:55:48 -04:00
Max Roncace b9e16d33df Refactor Dusk settings out to common interface used by game and UI code 2026-04-04 00:16:44 -04:00
TakaRikka 3222d18e3c add mirror mode toggle 2026-04-02 19:08:30 -07:00
TakaRikka adfa259ccb Merge https://github.com/zeldaret/tp 2026-03-30 02:21:28 -07:00
TakaRikka 76c9548e4a d_path / d_vibration debug work (#3138)
* dpath debug

* dvibration debug

* d_meter2_info debug

* gcyl/gpsh debug
2026-03-29 16:43:00 -07:00
PJB3005 3ad643f397 Don't include logging infrastructure in m_Do_graphic.h
This ends up wasting a ton of compile time because it pulls in all of Aurora's log infrastructure and fmt and all the noise into a thousand game files
2026-03-29 04:35:44 +02:00
qwertyquerty 6431dd3d19 fix reticles (#89) 2026-03-13 14:41:46 -07:00
TakaRikka 1618e9b276 Merge https://github.com/zeldaret/tp 2026-03-12 17:56:51 -07:00
qwertyquerty 767ba3bb14 Ongoing gameplay dev (#49)
* launch.json cwd

* bodge to load gci for testing

* stub card stat

* gameplay bodges

* viewport, ub fixes

* add release with debug info cmake variant

* be fixes, sound stub

* viewport h

* d_msg_flow BE

* be fopAcM_createItemFromEnemyID

* update launch configuration to use iso

* more audio stubs

* Attempt to set viewport and get messages for brightness check

* skip opening scene again, fixed JMessage::TResourceContainer::TCResource::Do_destroy

* add guards for viewport changes

* moar endian swapping to get Link sitting in PROC_OPENING_SCENE and for dialogues

* BE d_msg_class i_data

* stub bgm start

* fix div by 0 error (for now)

* TEMP_BROKEN in d_menu_ring

* REQUIRES_GX_LINES

* properly stub renderingAmap::draw with REQUIRES_GX_LINES

* better stubbing outside of stubs

* fix event data getting swapped multiple times

* evil draw vp fix

* Stub log imgui

This redirects all spammy logs to an imgui window that is cleared per frame.

This fixes the serious performance dip of the logging, and makes the regular log readable.

* Oops move those optimization changes I accidentally committed behind a flag

DUSK_SELECTED_OPT

* gx_line macro in map

* fix audio stubbing

* switch to CARD API aurora impl

* remove kabufuda from link libs

* refactor imgui stuff and add input viewer

* merge stub log with refactor

* accidentally committed a metaforce header shh

* basic map loader

* ImGuiConsole: Add missing <thread> include

* you may now play as luigi (you may now load stages with bridges)

* bloom fix

* bloom leak fix

* cloud shadow fix

* add soft reset button to imgui menu

* if it broke dont not fix it

* i swear i committed this

* BE swap indMtx in JPAResource::setPTev

* wnark ct fix

* frsqrte implementation from kinoko

* Fix Clang compile error in JAISeq::prepare_getSeqData_

* Add endian conversions to dMsgFlow_c::getInitNodeIndex

This fixes a freeze when Fado tries to stop you from leaving the
starting area.

* Add RAII GXTexObj wrapper; fix almost all leaks

* Update aurora for indirect texturing

* Update aurora for CARD fix

* Fix Clang build

* More d_msg_flow endian fixes

Fixes softlock when trying to talk to Fado and possibly other NPCs.

* no frame limiter

* get pause menu working

* proper frame limiting

* particle pointer size fix

* improve map loader a bit

---------

Co-authored-by: Jasper St. Pierre <jstpierre@mecheye.net>
Co-authored-by: TakaRikka <takarikka@outlook.com>
Co-authored-by: CraftyBoss <talibabdulmaalik@gmail.com>
Co-authored-by: Luke Street <luke@street.dev>
Co-authored-by: Lurs <2795933+Lurs@users.noreply.github.com>
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
Co-authored-by: tgsm <doodrabbit@hotmail.com>
Co-authored-by: Max Roncace <me@caseif.net>
Co-authored-by: Phillip Stephens <antidote.crk@gmail.com>
2026-03-12 04:01:03 -07:00
Max Roncace 2e75ea2444 More debug fixes for 99% TUs (#3122)
* d_a_e_hp debug code 100%

* d_a_npc_chin debug improvements

* d_a_npc_du debug code 100%

* d_a_npc_cdn3 debug code 100%

* d_a_e_rdy GCN symbol fixes

* d_a_kago debug code 100%

* d_a_e_oc debug code 100%

* d_a_e_yr debug code almost matching

* d_a_e_bg debug code 100%

* d_a_ykgr debug code 100%

* d_a_tag_hjump debug data fixes

* d_a_tag_attack_item debug data fixes

* d_a_e_df debug code 100%

* d_a_e_sh debug code 100%

* d_a_L7op_demo_dr debug code 100%

* d_a_L7low_dr debug code 100%

* d_a_e_sm2 debug code 100%

* d_a_movie_player debug code 100%

* d_a_e_st debug code 100%

* d_a_npc_aru debug code 100%

* d_a_e_yg debug code 100%

* d_a_door_spiral debug code 100%

* d_a_bg debug code 100% (still has .data issues)

* d_a_e_dn debug code 100%

* d_a_tag_attention debug code 100%

* d_a_e_bd debug code 100%

* d_a_tag_camera debug .rodata fix

* d_a_obj_movebox debug code 100% (array dtors are mismapped)

* d_a_mg_rod debug improvements

* d_a_e_rd debug symbol fixes
2026-03-11 03:07:19 -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 3623b27f37 Revert "Isolate JKRHeap operator overloads" (#39) 2026-03-06 19:49:35 -08:00
PJB3005 3ffc3266d7 Merge branch 'main' into 26-02-27-allocator-isolation 2026-03-05 00:15:09 +01:00
PJB3005 d762e1d8ec Make it build with 100% Aurora dolphin headers 2026-03-02 13:26:35 +01:00
PJB3005 8c52a386d5 Merge remote-tracking branch 'decomp/main' into 26-02-27-pjb-dev-2 2026-03-02 12:36:59 +01:00
PJB3005 883ba38bb8 Switch to Aurora headers for GX/VI
Replace GXSetArray() with GXSETARRAY() taking in size everywhere

Fix a ton of structs/enums being referred to with underscore name.
2026-03-02 12:00:53 +01:00
Jasper St. Pierre fe21abb1ec misc cleanup 2026-03-01 15:37:08 -08:00
Luke Street 4df8ccc871 Reorganize library code into libs/ (#3119)
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}

* Update configure.py and project.py for new libs structure

* Refactor `#include <dolphin/x.h>` -> `<x.h>`

* Remove `__REVOLUTION_SDK__` forwards from dolphin

* Fix dolphin/ references in revolution

* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`

* Always build TRK against dolphin headers

* Resolve revolution SDK header resolution issues
2026-03-01 14:35:36 -08: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
PJB3005 3750e7cfee Merge remote-tracking branch 'origin/main' into 26-02-27-pjb-dev-2 2026-03-01 15:08:52 +01:00
Luke Street 3b8300d0d2 Merge decomp/main into dusk
Merges 44 upstream commits from zeldaret/tp decomp/main.

Conflict resolutions:
- .github/workflows/build.yml: keep deleted (not needed for PC port)
- README.md: keep PC port README
- J3DAnimation.h: keep OFFSET_PTR macro + add upstream forward decl
- J3DModelLoader.h: keep BE(u32) mBlockNum + add field_0x1c
- d_com_inf_game.h: keep PC port inlines + add upstream declarations
- global.h: keep MULTI_CHAR macro + add FABSF macro
- JUTConsole.cpp: keep uintptr_t cast for 64-bit
- JUTDbPrint.cpp: keep PC enter_() helper + add cstring include
- JUTResFont.cpp: take upstream loop/struct improvements with BE types
- JUTCacheFont.cpp: take upstream decomp fix
- float.h: use upstream !PLATFORM_GCN guard
- d_a_npc_bouS/theB.cpp: keep MULTI_CHAR() for PC portability
- d_a_npc_henna.cpp: keep uintptr_t + use upstream var name
- d_demo.cpp: keep near_/far_ field renames for PC
- d_resorce.cpp: keep uintptr_t + fix var name to res
- d_s_room.cpp, m_Do_graphic.cpp: keep dusk includes + add cstring
- m_Do_main.cpp: keep JHIComPortManager + use JAS_GLOBAL_INSTANCE_INIT
- angle_utils.h: remove redundant types.h include
2026-02-28 13:33:16 -07:00
Luke Street 29c96f5c65 Some GCC compilation fixes (#3114)
* Fix 6-byte multichar literals

* Add `struct` to `e_ga_class::ga_s`

* Fix remaining wrong forward declares (struct/class)

* Replace `#include <string>` with `#include <cstring>`

* Guard FLT_EPSILON define to prevent redefinition

* Add missing `#include <cstring>` for direct cstring function usage
2026-02-28 12:11:00 -08:00
PJB3005 b598f856b4 Make stage loading work on LE & 64-bit 2026-02-28 13:17:05 +01:00
PJB3005 288cd84a64 Disable the audio engine for now 2026-02-27 23:54:50 +01:00
PJB3005 038ef4216f Isolate JKRHeap operator overloads
Fixes #25

This isolates the JKRHeap operator new/delete overloads. Every single new/delete site in the code has been replaced with a macro.

Sadly for new[] and delete[] we have to keep global operators. The global new[] just allocates into malloc() however, and delete[] goes into free() if it's not in a JKRHeap. So that's fine.
2026-02-27 23:11:59 +01:00
Pieter-Jan Briers af7ab981e6 Fix MORE wrong forward declares (struct/class) (#3110) 2026-02-24 14:20:45 -08:00
PJB3005 fcf1f4bed1 Fix wrong forward declares (struct/class)
Requires removing the now-matching symbols from jsystem_stubs.cpp
2026-02-24 16:58:12 +01:00
PJB3005 449900d2bf Fix compile with Dusk's mtx lib
Move Mtx33 and similar types to JMath

Rename mtx.h in decomp to _mtx.h so Aurora's header is used instead.
2026-02-24 13:15:21 +01:00
Pieter-Jan Briers a2dcb7251b Fix incorrect forward declare keywords (#3107)
Mixups of class/struct keyword in forward declares. Doesn't seem to matter on MWCC, but causes name mangling mismatching on modern platforms.
2026-02-23 11:13:00 -08:00
Lurs 8599684fae First pink screen! 2026-02-21 22:15:39 +01:00
Max Roncace ba2700248e d_cursor_mng mostly matching (#3101) 2026-02-17 22:58:52 -08:00
Max Roncace ca94ab6a92 m_Re_controller_pad mostly matching (#3099)
* Move m_Re_controller_pad to m_Re/

* m_Re_controller_pad mostly matching
2026-02-13 15:15:42 -08:00
Jcw87 c6b361575e d_jnt_col debug (#3088) 2026-02-11 00:05:16 -08:00
Jcw87 dbee7c8f1f d_com_inf_game debug (#3075)
* d_com_inf_game debug

* inline sorting
2026-01-29 18:58:59 -08:00
kipcode66 d82453292a Merge remote-tracking branch 'decomp/main' into compile 2026-01-26 18:11:18 -05: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
kipcode66 02ba53f72e Merge commit '46da46b152472c668875d67c336f59ded62d3ecc' into compile 2026-01-23 17:04:18 -05:00
Jcw87 0440061c10 m_Do debug (#3052)
* m_Do debug

* m_Do wii data
2026-01-18 17:59:57 -08: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