Commit Graph

89 Commits

Author SHA1 Message Date
gymnast86 2d8a60aa75 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-09 19:03:01 -07:00
gymnast86 dd773bc261 properly set RANDOMIZER_ONLY 2026-04-09 19:02:55 -07:00
Luke Street d88662a849 Support shared libjpeg-turbo 2026-04-09 19:37:42 -06:00
qwertyquerty 3366c22e99 CI/CD, CMake improvements, more targets, fix gcc (#258)
* CI attempt

* syntax

* fix cmake for linux

* fix include directories and merge main

* fix PDB fighting

* fix gcc compiling

* fix SSCACHE for windows

* try and fix gcc

* more CI presets

* remove the android target for now

* bump cmake minimum to fix debug information format

* yet another attempt at fixing gcc

* yet another attempt at fixing gcc

* better CI matrixing

* yet another attempt at fixing GCC

* fix arm

* fix CI

* placeholder icons

* compile dawn from source for windows arm64

* fix icons and linker warnings

* fix cmake

* fetch libjpegturbo

---------

Co-authored-by: Luke Street <luke@street.dev>
2026-04-09 19:22:53 -06:00
gymnast86 535c2f53c1 Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer 2026-04-09 16:31:51 -07:00
PJB3005 3bcd46dc30 Add Tracy stuff 2026-04-09 18:47:34 +02:00
gymnast86 0ebab8bad3 change how randomizer is included 2026-04-09 00:29:16 -07:00
gymnast86 72bed7a1ba initial rando generator hookup 2026-04-08 00:35:02 -07: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
madeline 530aa48a8f update include directories 2026-04-06 20:37:40 -07:00
madeline c7caf8a5ad walk that one on back 2026-04-06 20:37:39 -07:00
madeline 28cb1be2f5 remove includes 2026-04-06 20:37:39 -07:00
MelonSpeedruns c0024b28b1 Merge remote-tracking branch 'origin/main' into feature/dynamic-aspect-ratio 2026-04-06 13:16:38 -04:00
PJB3005 6c6b2c3567 Merge branch 'main' into 26-04-04-config 2026-04-05 23:08:03 +02:00
PJB3005 6e6f55f1e4 Fix compile by giving WIDESCREEN_SUPPORT a value 2026-04-05 17:03:24 -04:00
MelonSpeedruns 3414cec13c initial commit with working 3D view at all times 2026-04-05 16:55:48 -04:00
Max Roncace bfbf524be2 Build "game" as a static library (#236)
* Build "game" as a static library

This effectively renames the "game" lib to game_base, builds it and
game_debug as object libraries, and links both into a single static
library. There is also some refactoring done to remove the game_base's
dependencies on game_debug's compile-time parameters which have now
been moved into shared buildscript variables.

* Fix build

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2026-04-05 22:48:44 +02:00
Max Roncace 2aad522298 Revert "Get rid of separate game dylib"
This reverts commit 9b44afa5b2.
2026-04-05 14:21:14 -04:00
PJB3005 9b44afa5b2 Get rid of separate game dylib
Just link that shit into the exe. Means we can turn off CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS and save file size.
2026-04-05 19:32:04 +02:00
PJB3005 b82a623810 DUSK_SELECTED_OPT applies to freeverb
Fixes audio stuttering on debug builds
2026-04-05 19:09:33 +02:00
PJB3005 98b5166413 Merge remote-tracking branch 'origin/main' into 26-04-04-config 2026-04-05 15:13:04 +02:00
madeline 6857c54695 fix .clangd on vscode 2026-04-04 22:22:18 -07:00
PJB3005 0bb9ff5ef3 Merge remote-tracking branch 'origin/main' into 26-04-04-config 2026-04-05 00:12:17 +02:00
PJB3005 824263fa6e Config system v1
Roughly inspired by what I've learned from my work on Space Station 14, without some of the unnecessary cruft and complexity.

Implementation is relatively simple once I figured out all the template order shenanigans.
2026-04-04 22:47:48 +02:00
madeline f5ce58ca7f reverb proof of concept 2026-04-04 01:38:28 -07:00
Luke Street b8f53c55a5 Copy more imgui stuff from Metaforce 2026-04-03 17:04:22 -06:00
Luke Street cdcb352084 Update aurora & use new frame buffer API 2026-04-02 23:08:00 -06:00
PJB3005 cb77b629e6 Fix bad merge in #139 2026-04-01 23:43:26 +02:00
Pieter-Jan Briers 6730d0c952 Merge branch 'main' into 26-03-28-movie-player 2026-04-01 15:15:08 +02:00
PJB3005 9e298f9228 Expand heap debug ImGui
Now allows seeing all blocks in ExpHeaps and running heap integrity checks.
2026-03-31 21:18:25 +02:00
PJB3005 b6577ffa2c Move 2026-03-29 13:35:26 +02:00
PJB3005 3a8a288ae7 Use PCH to massively speed up compile time
A change to a common header goes from 90s to 20s on my system. Crazy.
2026-03-29 13:24:59 +02:00
PJB3005 e18e8cc5dd Forgot to remove this 2026-03-29 03:31:36 +02:00
PJB3005 e827f19554 Give up on fetching libjpeg-turbo ourselves, rely on find_package and user providing it at build time 2026-03-29 03:29:51 +02:00
PJB3005 b09da82912 Allow movie support to be compiled out
(and therefore remove the libjpeg-turbo dependency)
2026-03-29 03:07:03 +02:00
PJB3005 bb92f955c8 Make the movie player work somewhat.
THPs are *almost* just a bunch of JPEGs so the TL;DR is BE fixes and replacing the decoding with libjpeg-turbo.

Needs changes to thp.h which should be removed from Aurora, will do that later.

Also audio not implemented yet.
2026-03-28 18:29:58 +01:00
PJB3005 f6f2f14a60 Remove SDL mixer
Didn't end up using it.
2026-03-27 15:10:31 +01:00
PJB3005 0fbb62d7dc Stop compiling some DSP-related files.
Replace it all with stubs.
2026-03-20 18:05:17 +01:00
PJB3005 0bd5ec4da5 Audio debug imgui 2026-03-14 17:35:09 +01:00
PJB3005 9e5202787b ADPCM4 decode impl 2026-03-14 14:02:15 +01:00
PJB3005 9dbade65d4 Basic audio system start 2026-03-14 14:02:13 +01:00
PJB3005 4382f86c4f Add SDL-mixer dependency 2026-03-14 14:02:10 +01: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
Pieter-Jan Briers 15732e241c Pjb dev 3 (#48)
* Undo array allocation changes from #43

Doesn't work

* Expand dmeter heap sizes, give names

* Fix manual operator delete call in resource.cpp

* Disable map rendering for now

Aurora can't handle lines

* Re-enable assert heap on DVD thread

Should be fine?

* Some basic debug groups with the new Aurora API

* Allow Aurora backend to be set via CLI

* Give materials debug groups

* More debug groups

* JKRHeap separation: array edition

Pain
2026-03-11 13:40:21 -07:00
Luke Street c42a435b73 Update aurora for prebuilt packages (#44) 2026-03-09 20:40:55 -07:00
Luke Street 746d01e44c Aurora DVD support (#43)
* Aurora DVD support

* Remove commented code

* Restore STUB_LOG
2026-03-09 00:33:04 -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
Jeffrey Crowell 50970df645 Fix build on main for mac/linux (#40)
* fix builds, removing COMPOUND_LITERAL around GXColor

use aurora's aurora_get_stats

add aurora::gd to libraries linked to

fixup linkage/symbol hiding on mac/linux

squashed

* aurora stat changes

* fix

---------

Co-authored-by: Jasper St. Pierre <jstpierre@mecheye.net>
Co-authored-by: TakaRikka <takarikka@outlook.com>
2026-03-06 22:22:28 -08:00
madeline dbd5bb53b1 cherry pick platform variants 2026-03-02 10:53:09 -08:00
PJB3005 b397c886e7 Move some OS functionality to rely on Aurora 2026-03-02 14:27:20 +01:00