summaryrefslogtreecommitdiff
path: root/mm/include/functions.h
AgeCommit message (Collapse)Author
2025-09-16func_80183070 to Sys_Freeze (#1686)Ozero4
2025-09-16[headers] Move z_actor functions to z64actor.h (#1696)Dragorn421
* move * fixes * format * fix
2025-09-16Target -> Attention (System Rename) (#1716)engineer124
* attention * revert flags, too large of a diff * more revert
2025-09-16Colliders Sync Tris Quad Sphere Line (#1714)Derek Hensley
* Tris * Quad * Sphere * Line
2025-09-16Colliders Sync Cylinders (#1709)Derek Hensley
2025-09-16Colliders Sync JntSphere (#1700)Derek Hensley
* JntSphere * Format * PR review
2025-09-15Colliders Sync ColliderElement (#1698)Derek Hensley
2025-09-15Misc Clean (#1680)Derek Hensley
* vramu32 in Overlay_Relocate * Actor_SetColorFilter args * Effect Hitmark enum * Actor_WorldToActorCoords * Some fault clean up * contoller.h * macros.h no longer needs stdint.h
2025-09-15Fixup actor audio flags docs (#1682)Dragorn421
* Fixup actor audio flags docs * format
2025-09-15Update Room Documentation (#1678)mzxrules
* Implement Room Documentation * nit * Resolve Dragorn fixes (OoT) * Resolve Fig suggestions, fix comment wording (OoT) * hensldm nit
2025-09-14Add a `z64play.h` header (#1646)Anghelo Carvajal
* z64play.h * Move macros, functions and variables to header * cleanup * Reduce needed headers on z_collision_check * Change play functions to take PlayState * Move `Actor_ProcessInitChain` to `ichain.h` * format * Update src/code/z_play.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Add macros.h to sys_math3d.c * Rename SequenceContext to SceneSequences --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2025-09-14z_map decompiled (#1032)mzxrules
* First batch of functions * more ok * z_map_data OK * More OKs, MinimapList ZAPD breaking change * func_80103A58 improvements, more OK * func_80106D5C and func_801091F0 decomped * func_801031D0 decomped and some fixes * house cleaning, more OKs more decomp * Even more OKs * func_80105C40 almost OK, more OKs * func_80108AF8 OK and more * All functions attempted * func_8010534C OK * Start documentation, rename DoorCtx * More OKs, split map_data.data, more doc * incremental clean-up, more function names * more function names * func_801068FC OK * old uncommitted changes * minor tweaks * implement easy fixes * more fixes * z_map_disp OK, implement more suggestions * delete utility program * migrate data * TransiActor ->TransitionActor * Major documentation pass * first pass of changes * warning fix attempt, revert ZFile.cpp * Fix FAKE match * Easy fixes * implement gDPLoadTextureBlock_Runtime * z_demo bss patch * Extract white square texture * Implement more suggestions * rework MapIndex/DungeonIndex * revert dungeonSceneIndex -> mapIndex in some spots, implement suggestions * more suggestions * minor nits * fix #include
2025-09-14Msgevent OK (#1637)Derek Hensley
* Decompiled, some commands still unnamed * Use full weekevent reg names * Fix func_8094E69C * Fix Player_GetMask * Eventinf, mask worn, and item action argument formatting * decimal rupees * Times (day, hours, minutes) as decimal * msgEventScriptPos * Callbacks * Name final commands * Enum * Arrays * functions * Small cleanups * Clean up actors * Remove event from some variable names to make them shorter * Some more function renames * newline * Missed a few unks in commands * Update functions.txt * PlayerMask * MSGMODE_PAUSED * Script time macros * EnSob1_GetWelcome default * Whole bunch of renames * Format * Add CMD to commands * Update code_functions * structs for size * z64scripts.h * MsgEventCallback -> MsgScriptCallback * format * MsgEvent_RunScript stop * Remove cmd handler comment * cmd -> script in MsgEvent_RunScript --------- Co-authored-by: Thar0 <17233964+Thar0@users.noreply.github.com>
2025-09-14c_keyframe.c decompiled and documented (#1630)Tharo
* 2 non-matching * 1 function left Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Fully matching Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Documented, has bss reordering issues * Fixes * Apply suggestions * Format * Re-add cast oops * Remove != 0 for override and transform limb draws, format --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2025-09-13Introduce `z64pause_menu.h` header (#1505)Anghelo Carvajal
* z64pause_menu.h * move functions and variables * Move PauseMenuPage * move stuff that seems public to the new header * KALEIDO_OVL_MAX * bss * review * IS_PAUSED * format * add argument to pause macros * Update include/z64pause_menu.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * bss * More IS_PAUSED I missed * early returns * bss * empty commit to trigger GHA * bss * bss * bss * includes * bss --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2025-09-13Extract Kanji + some adjacent docs (#1536)Derek Hensley
* XML + docs * PR * newline * newline pt2 * named textures in kanji.xml * Kick Jenkins --------- Co-authored-by: emilybrooks <emilybrooksemilybrooks@gmail.com>
2025-09-13Cleanup External Audio Headers (#1520)engineer124
* high level audio headers * move externs * cleanup enums * small thing * rm sfxid * small fix
2025-09-13Split effect headers and a bit of cleanup (#1482)Anghelo Carvajal
* split * bss * z64eff_ss_dead.h * clean eff_blure * eff_shield_particle cleanup * tire?mark * and more cleanup * format * forgot to remove this * review * EffectBlureDrawMode enum * review * review * bss
2025-09-12Revert "Organize `libc64` files (#1492)"Eblo
This reverts commit e47a7050faf345ab2f220bfce58effd2590b9e5e.
2025-09-12Animation Cleanup: En_P* (#1507)engineer124
* anim P cleanup * PR Review * PR Review * Postbox Idle
2025-09-12Document Actor Category Change (#1518)engineer124
* Actor Category Change * cleanup * comments * adj comment * revert small cleanup for libc64 PR * adjust comments
2025-09-12Organize `libc64` files (#1492)Anghelo Carvajal
* Move qrand to libc64 * use an union to avoid type punning * __osMalloc * math64.c * fixed_point.h * sleep * aprintf.h * sprintf * malloc * use original names on aprintf.c and malloc.c * qrand cleanup pass * use original names of sleep.c * og names for sprintf * more cleanup * format * fixes * whoops * use ARRAY_COUNT again * comment * Use `fu` * forgot this one * review * fix * sneak a tiny cleanup
2025-09-11Yet another header cleanup (#1508)Anghelo Carvajal
* lights.c * z64skin_matrix.h * Move out some stuff from macros.h * gamealloc.h * move most transition functions to z64transition.h * z64lib.h * `include` cleanup on transition files * z_overlay cleanup * z64malloc.h * format * forgot to remove those * forgot this * fix borken includes
2025-09-11Move player-related function declarations to `z64player.h` (#1480)Anghelo Carvajal
* Move player function declarations to z64player.h * rename Actor_MountHorse to Player_MountHorse and similar functions * whoops * add missing includes * format * whoops
2025-09-11Document `Actor_TalkOfferAccepted` (#1502)engineer124
* rename * PR Review
2025-09-11Audio Voice Decompiled (#1490)engineer124
* Add Tharo's documentation comments * Voice progress * Match osVoiceControlGain * Match osVoiceStartReadData * Cleanup * Add docs from n64devkit * WIP on osVoiceGetReadData * Add comment * Match voiceinit.c * Remove CONT_ERR, already present in controller.h * Really close to matching osVoiceStopReadData * Progress on voicecheckword * Match osVoiceSetWord * Add error codes * Matched __osVoiceContRead2... Somehow... * Add small amount of docs * __osVoiceContRead36 was basically identical from __osVoiceContRead2 * docs, but maybe a little carried away * Match __osVoiceContWrite4, Write is very similar to Read * Match __osVoiceContWrite20 from __osVoiceContWrite4, ez * Some docs * Improve osVoiceGetReadData * Match osVoiceCheckWord * currentSyllable -> currSyllable * Match osVoiceMaskDictionary * Match __osVoiceSetADConverter * Meme matched osVoiceStopReadData * small cleanup * Missed macros * osVoiceGetReadData Meme Match * Small clean-up * format * Properly split voice files from code * Use proper flags for voice files * Add basic docs for func_801A5AF0 * Import Voice Data * Update matching functions in code_801A51F0 from audio WIP * Update matching functions in code_801A4EB0 from audio WIP * Match func_801A5A1C * Match func_801A5228 * Match func_801A54D0 * Doc padmgr functions used * Match func_801A5680, it's near identical to func_801A54D0 * code_801A51F0 OK * Match func_801A4EB8 * Match func_801A4FD8 (mips2c got it matching directly) * code_801A4EB0 & all of voice, OK * Import bss * Better match for func_801A5A1C * format * Cleanup * Clean up dictionary * Introduce OSVoiceDictionary * More voice docs * Fix bss * Import code_801A4EB0 data * Introduce Word Id enum * Dictionary: u8 -> u16 * Introduce bgms * Fill in bgm enums * Rename bgm to clearer names * Fix spacing * Fix "No_Music" define * remove comment * import rodata * Improve bgm names, found another seqId function * Another seqId function * Another name change * Woods of Mystery -> Sarias Song * Fix match in osVoiceControlGain * Fix bss reordering * Fix bss file split * add saria's song bgm to pierre * Another bgm function found! * Add bgm's to `gSaveContext.seqIndex` * Fix BSS * fix bss * Fix bss * cleanup * more cleanup * cow voice weekeventflag * small cleanup * some docs * cleanup var * global * more docs * PR Review --------- Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2025-09-11Document Overriding Player Input (#1489)engineer124
* Override Input * cleanup * cleanup * PR Review * PR Review, fix merge
2025-09-11Fix ultratypes types (#1454)Derek Hensley
* Fix ultratypes types * Add back size_t and NULL * Callocs * Callocs pt 2 * bool * STDC version checks
2025-04-06Cleanup includes (#1072)louist103
* Cleanup * Format * Fixes * Update macports-deps.txt * Fix mac * Update macports-deps.txt Co-authored-by: Archez <Archez@users.noreply.github.com> * Move includes around --------- Co-authored-by: Archez <Archez@users.noreply.github.com>
2025-03-02Custom Audio Support (#778)louist103
* Implement custom sequences and the audio editor. * Fix implicit function declaration `AudioEditor_GetReplacementSeq` * Fix mac again. * String and header cleanup * Oops * WIP ZIP Sound fonts * The game opens and audio seems to play correctly. Needs extensive testing. * Name sequences * Cleanup the SF importer a little. * XML Sequences good * Fix mac * Destructor * Bump submodule * Thread safe queue * Add WAV decoder * sequenceMap->mSequenceMap and a string fix * Streamed sequence importer * Add s16 sample processing. * Fix drwave define * Fix STB * Reorder the loading to enable custom sound fonts * New streamed solution * Bump exporter * Generate 1 minute long looping sequence. * Very long sample support (113 minutes or so) * MP3 Decoding * Don't byteswap the crc from XML. * WIP OGG * add windows cmake stuff (broken) and fixes to OGG * Just throw more cores at the problem * Dynamically allocate fontMap * Re-add OOB read fix from old branch * FLAC decoder, threads for the other compressed formats * Remove thread from class * timings * cleanup conflicts * update submodules * update submodules * update submodules * loop or not to loop * named audio XML * Update submodules * format * format again cause git didnt see it for some reason * move drlib to submodule * Update apt-deps.txt * Fix for new cmake * fix game interactor * Update macports-deps.txt * PR fixes and fix OTRExporter for mac * format * format * ifdef intrin header * Docs * use macro for preview * Small fixes * format * fix 2nd day clock town * Update exporter * Fix duplicate global in stubs.c * restore editor to use cvars again sadge * Format * warn if more than 255 sequences * use main seq player to avoid an overflow * fix the wrong seq playing in the editor again * 16 bit seqIds * fix shop crash * format * cleanups * Delete audio collection * Add entry to modern menu * Cleanup the audio collection * fix clock town randomization * format * format again * some fixes for custom audio (#1) * how I would sort the sequences (#2) clang one more forgot to revert Co-authored-by: mckinlee <mckinlee@ymail.com> * Adjustments to ocarina song types * stereo * format * Loop point support * Part of a PR review * Remove drlib submodule * Clarify change * Format * Add tag * switch to find_package * bump ZAPDTR * Milk bar day/night fix * x86 SIMD for aMixImpl * format * NEON * format * remove | 0x900 causing a crash * Asan fixes * add missing define for MSVC * Clock town fixes Co-authored-by: mckinlee <mckinlee@ymail.com> * format * Fix underscore logic in audio collection * Use torch sample XML format * fix font map size and format * quick fix * Update exporter * Opus * actions packages * fix it again? * Fix a few missed 16 bit masks * Remove unused stubs * Revert "Fix a few missed 16 bit masks" This reverts commit 7143c4ff92d23157a79a10b4ee62e93e35acb23e. * Opus decoding * Fixes for linux and other things * free opus data * format * Update FindOpusFile.cmake * bria's fix? * Update BenMenuBar.cpp * Update BenMenuBar.cpp * Split ocarina tabs * better error handling * Remove unused vectors * move audio editor to enhancements * Fix mac again? * Final cleanups * Format * extern C * Allow custom fanfares to be used in songs * format * WIP sf editor support * Format * Jacks fixes * Bump submodule * Archez's fixes * Format --------- Co-authored-by: mckinlee <mckinlee@ymail.com> Co-authored-by: Archez <archez39@me.com>
2025-01-02Merge branch 'develop' of ↵Garrett Cox
garrettjoecox.github.com:HarbourMasters/2ship2harkinian into develop-rando
2024-12-28WeekEventRegHorseState macro -> function (#94)balloondude2
* convert macro to function * cleanup * event log * reorder
2024-12-10Add extended culling handling for special actors (#889)Archez
* Adjust forward cullzone multiplier to apply to scale as well * option 1: apply multiplier to every check value and normalize alpha fade * option 2: hijack projZ value to avoid touching actual logic * create methods for hijacking actor proj values and handle remaining special actors * forward declare structs to not include z64 in header
2024-11-03PoC glitchless playthrough implementationGarrett Cox
2024-10-06Merge branch 'develop' of ↵Garrett Cox
garrettjoecox.github.com:HarbourMasters/2ship2harkinian into develop-rando
2024-10-02Mirror Mode (#535)Garrett Cox
* Mirror mode initial version * Update mm/src/code/z_actor.c Co-authored-by: Archez <Archez@users.noreply.github.com> * mirror mode support for minimaps and dungeon pause map * mirror mode support overworld pause map and song of soaring * mirror mode support for various remaining things * mirror mode support pause warp enhancement * Add searchable menu item --------- Co-authored-by: Archez <Archez@users.noreply.github.com> Co-authored-by: Archez <archez39@me.com>
2024-09-21Add randomizerInf and better support for stray fairiesGarrett Cox
2024-08-05[Enhancement] Pause Owl Warp (#620)mckinlee
* Add Pause Owl Warp Enhancement - **mm/2s2h/BenGui/BenMenuBar.cpp**: Updated menu to include new enhancement options. - **mm/2s2h/Enhancements/Enhancements.cpp**: Registered the new Pause Owl Warp enhancement. - **mm/2s2h/Enhancements/Enhancements.h**: Declared functions for the new enhancement. - **mm/2s2h/Enhancements/Songs/PauseOwlWarp.cpp**: Implemented the Pause Owl Warp functionality. - **mm/2s2h/Enhancements/Songs/PauseOwlWarp.h**: Header file for the Pause Owl Warp implementation. - **mm/include/functions.h**: Added function declarations related to the new enhancement. - **mm/src/overlays/kaleido_scope/ovl_kaleido_map.c**: Modified to support the new enhancement. - **mm/src/overlays/kaleido_scope/ovl_kaleido_scope_NES.c**: Modified to support the new enhancement. * ran clang-format script * Additional logic and bug fixes * Fix PauseOwlWarp cursor logic triggering on dungeon map -Added a check to ensure PauseOwlWarp's cursor logic is only triggered when not in a dungeon. * Add Song of Soaring check - To make it more in line with vanilla, you are now required to have the Song of Soaring to use this enhancement. * bug fix and ran clang-format script -My previous commit had a extra condition that wasn't needed that caused a bug where the world map points locations pointed to activated owl statues. * added more checks * Simplified complex conditional statements * possibly fix macos build issue? * index warping logic added * implement feedback from Archez * shot in the dark macos build fix? * how bout now? * revert back to previous commit * if this fixed the macos build issue it'll be thanks to cclark25... let's pray * add debugeditor check - thanks archez! * Moved debugEditor check to prevent triggering ALL pauseOwlWarp logic. wtf was I thinking earlier
2024-05-30Tweaks to autosaves and pause saves to always persist them, along with ↵Garrett Cox
preventing saves when it's too early or late in the game (#616)
2024-05-24Persistent Owl Saves & Autosaves (#458)aMannus
* Persistent Owl Saves & Autosaves * Better entrance handling * clang format happy now pls?
2024-05-22DPad Items (#228)inspectredc
* Initial Dpad * remove old hud stuff * and comment * s.. * add dpad equip macro back in * fix inputs * fix equipping (hopefully all) * finish some todos * add 2s2h asset header * check dpad macro * remove 2s2h_assets * re-add empty texture * use correct struct for default dpad equips * dpad save stuff * fix item offering, use correct equip offset values * finally figure out unk_154 and fix mask equipping * avoid ugly code * add necessary condition * correct save names for dpad items/slots * remove todos and sort out suggestions and rename cvar * func standardise renaming * Add dpad to hud presets * dpad save migration
2024-05-22Remove BenPort.h from functions.h (#309)inspectredc
* Remove BenPort.h from functions.h * use specific z64 includes * this -> thisx
2024-05-22Add Event Log and more hooks (#247)Garrett Cox
2024-05-22Add volume slider support (#201)Archez
* Add volume slider support * extern fix?
2024-05-22Audio Works (#180)Kenix3
* initial audio work * Implements caching and fixes a ton of issues with audio * Uses correct memory sizes in mixer.c * Resets mixer values * Actually correct dmem buff values in mixer.c * Remove breakpoints * Fix sequences not playing * The forbidden type. * Forbidden TYPES?! * Thanks Louis * Thanks Louis Part 2 * Fix garbled audio * Fixed ADSR bugs * Fixes ASAN crash in loading samples. This code is causing the game to attempt to read sample data beyond the actual sample data. * Comments out the sample clamping since we aren't affecting the rest of the calculations in the function. * Fixes crashing while loading audio samples. Additionally, lowers the log level for audio commands. * Textbox SFX UB Fix * Decreases priority of more debug messages * Fixed a couple uintptr_t issues * Adds context to Jack's hack of shortcutting later loading sequences. * Audio corruption fix * Few uintptr_t fixes * Fix build on linux * Fix build on mac * call audio exit * fix sfx in dialog * unstub more audio funcs --------- Co-authored-by: Random06457 <28494085+Random06457@users.noreply.github.com> Co-authored-by: Nicholas Estelami <NEstelami@users.noreply.github.com> Co-authored-by: louis <35883445+louist103@users.noreply.github.com> Co-authored-by: Adam Bird <archez39@me.com>
2024-05-22Track LUS changes for LUS refactor. (#163)louist103
* Track LUS changes. So far implemented: - Moving the big switch into unordered maps. - Dynamically switching between different ucodes. So far tested switching between f3dex2 and s2dex. * track LUS changes * LUS Bump
2024-05-22Add fast text enhancement (#150)Garrett Cox
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
2024-05-22Add cvar methods to global functions header and cleanup includes (#152)Archez
* add cvar methods to global functions header and cleanup includes * fix z_lib.c * tweak includes
2024-05-22Better GFX debugging control and fix accidental opcode overwrites (#132)Archez
* implement better gfx command debugging * revert xlu crash fix back to source
2024-05-22read proper depth values from the renderer (#124)Archez