Commit Graph

596 Commits

Author SHA1 Message Date
Luke Street 3b2c0146c7 JSUOutputStream: Overload all standard int types 2026-02-28 21:15:04 -07:00
Luke Street b4a228f9ef Replace u32/s32 with uintptr_t/intptr_t where appropriate 2026-02-28 20:23:09 -07:00
Luke Street d34b9afd6e Fix more -Wpointer-arith and -Woverflow warnings 2026-02-28 20:07:20 -07:00
Luke Street 431641608f Replace non-pointer usages of NULL with 0 2026-02-28 15:49:12 -07:00
Luke Street b5d3b8c059 Another round of GCC fixes (#3115)
* Fix remaining <string> -> <cstring> for GCC compilation (#3114 follow-up)

MWerks' <string> header transitively includes C string functions
(memcpy, strlen, strcmp, etc.), but GCC/Clang's <string> is the C++
std::string header. These files all use C string functions and should
include <cstring> instead.

* Use std::isnan instead of isnan for GCC compilation

GCC's <cmath> places isnan in the std namespace. Using the unqualified
isnan fails to compile with GCC/Clang.

* Fix cCcD_Src types: s32 -> u32 for bitmask fields

cCcD_SrcObjCommonBase::mSPrm, cCcD_SrcObjTg::mType, and
cCcD_SrcObjAt::mType are used as bitmasks (SetType/SetSPrm take u32,
MskType/MskSPrm use u32, values like 0xFFFFFFFF are common in
aggregate inits). Change from s32 to u32 to match usage.

Also fix AT_TYPE_WOLF_ATTACK/AT_TYPE_UNK to use unsigned literals,
and remove now-unnecessary (s32) casts on hex literals in collision
source data.

* Mark dummy() functions as static to avoid multiple definition errors

These decomp artifact functions have the same name and signature across
TUs, causing linker errors when building as a single binary.
2026-02-28 13:35:07 -08:00
Luke Street c900a043b8 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
Pieter-Jan Briers a096caa8de Fix broken J3DTexture assert (#3111) 2026-02-25 14:06:37 -08:00
Pieter-Jan Briers f54661f878 Fix MORE wrong forward declares (struct/class) (#3110) 2026-02-24 14:20:45 -08:00
Pieter-Jan Briers 96ffd91c9a Fix JASGlobalInstance instance definitions (#3108)
There are a few places where JASGlobalInstance have their sInstance storage implemented via template specialization. The problem is that these have no initializer, which means that they are not proper definitions (only declarations) in standards-compliant C++. MSVC and (evidently) MWCC accept this, but modern Clang and GCC do not and won't emit symbols.

I've added a macro that properly initializes these outside MWCC.

Also, JASGlobalInstance<JAUSectionHeap> was only being declared in each actor file that used it, which sounds incorrect? Not sure about this but I added it to m_Do_main too, again behind MWERKS check.
2026-02-23 11:17:37 -08:00
Pieter-Jan Briers 59fd9f387a 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
Jcw87 2113d9044b d_resorce debug (#3105) 2026-02-20 03:05:23 -08:00
Max Roncace 803bc041c7 Implement Z2AudioCS (#3103) 2026-02-20 02:53:27 -08:00
Jcw87 0b1cb89d69 d_demo debug (#3098) 2026-02-13 15:08:10 -08:00
Jcw87 68f3531c2d d_bg_parts debug (#3097) 2026-02-13 15:06:14 -08:00
Jcw87 d8a4157b9f d_jnt_col debug (#3088) 2026-02-11 00:05:16 -08:00
Jcw87 57cea18076 JParticle debug (#3090) 2026-02-07 04:43:51 -08:00
Max Roncace 050ebb4471 Add missing TUs for Wii/Shield retail (+ filename cleanup) (#3072)
* Fix GCN_mem_alloc.c filename capitalization

* Fix up TRK file names in Wii/Shield splits

* Add string_TRK

* Add cc_gdev

* Add Shield-only wstring TUs

* Implement NdevExi2A

* Add missing JSystem TUs (more are still missing from ShieldD)

* Clean up includes
2026-01-29 14:18:08 -08:00
roeming c161523338 JUtility matching for debug (#3074)
* Jut cleanup work

* data section fix

* match the last of JUtility

* added more helpful comment

* Add missed null terminator

* do while -> while loop

* replace more do whiles

* Fix wii regression

* Add suggestions

* fix null check

---------

Co-authored-by: roeming <roeming@users.noreply.github.com>
2026-01-28 19:38:20 -08:00
kipcode66 d787afaee0 Std7 (#3068)
* fix standard compiler error for d_a_tag_TWgate

* fix standard compiler errors for J3DJoint

* fix regression in ShieldD
2026-01-27 00:20:19 +02:00
hatal175 be3efedee3 Work on d_jdpreviwer (#3067) 2026-01-25 21:20:02 -08:00
TakaRikka 5867eaf68b 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
Jcw87 623ba48542 JKernel wii (#3059) 2026-01-20 16:35:11 -08:00
Max Roncace 1fba6e13e5 Use default parameter values in JORMContext calls where appropriate (#3057) 2026-01-19 18:18:30 -08:00
Jcw87 87a3705039 m_Do debug (#3052)
* m_Do debug

* m_Do wii data
2026-01-18 17:59:57 -08:00
kipcode66 235cb9a9ad fix va_list (#3042) 2026-01-13 17:51:14 +02:00