Skip to content

Real classes, constructors and member calls - #335

Merged
zeroz41 merged 106 commits into
zeroz41:masterfrom
Elias843:real-classes-and-types
Nov 21, 2026
Merged

zeroz41 merged 106 commits into
zeroz41:masterfrom
Elias843:real-classes-and-types

Conversation

@Elias843

@Elias843 Elias843 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Replaces hand-mangled calls and hand-written constructors with real C++ classes, members and types. Code and data
are unchanged: the DOL still matches and check_pr reports no regressions.

Member calls

  • Calls through meth__<n>ClsF...(void *, ...) prototypes become real member calls, static or non-static by how
    callers use them; narrow returns that callers widen are s32, with the narrowing kept in the body.
  • Mislabelled members become free functions with their real parameters, or move to the class they act on (e.g. the
    inventory walks go from TObjPlayer to TPlyItem and TItemList; area sound and 2D drawing helpers get their own
    headers).

Real constructors and vtables

  • TObjChara and its target cursor records, the NPC classes, enemies, bosses (Dragon, De Rol Le, Vol Opt, Dark
    Falz, Barba Ray, Olga Flow), containers and traps, stage objects, technique/item/sprite effects, windows and
    front-end screens get real constructors (callers use new), destructors and compiler-emitted vtables in place of
    hand vptr stores and hand vtable data.

Types

  • Shadow structs dropped in favour of class fields: TBoss2Mine, TBoss6Type2, TNpcPlayer, TObjNpcBase, the
    technique parameter tables, the gold dragon, the city shop sequences and item windows.
  • Unused hand-mangled declarations and stale vtable externs removed.

Where #334 already converted something, its names and structure were kept.

…rs, TWindowCost::set_cost, TWindowMeseta::set_value, init_shield_params
…py, Obj_80515BA0::get_dest_area, normalize_vector_safe, pso_load_texture and the area sound helpers
…nd TObjEneDD::vfunc_86 an s32 return, dropping the shadow vtable structs
…it_launch and the gold dragon's breath/effect helpers real members
@Elias843
Elias843 force-pushed the real-classes-and-types branch from 98923bc to b05988e Compare November 21, 2026 00:08
@zeroz41
zeroz41 merged commit 7f4e8cd into zeroz41:master Nov 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants