summaryrefslogtreecommitdiff
path: root/src/code/z_scene.c
AgeCommit message (Collapse)Author
2022-02-20Camera Preparation (#644)engineer124
* Copy progress from z_camera * cleanup functions.h * Oops * Revert `SUB16` and `ADD16` back to original names * PR Suggestions * PR Suggestions * Fix merge with master
2022-02-05code_8012EC80.c OK and Documented + parameter_static extraction (#534)engineer124
* Match remaining functions of code_8012EC80.c * parameter_static extracted and OK * Small Progress * Documentation all over the place * Finish Documenting * Cleanup * Name more textures * Update knowledge on deku playground player name * All textures from parameter_static known now * Finish documenting and validating parameter_static * More up-to-date SaveContext docs * More docs * More cleanup * Sun -> Star * Minor touchup * More cleanup * pictograph -> pictoBox * Remove the "unused" part * More accurate name: hour lines * It's gsDPLoadTextureBlock, not gsDPSetTextureImage * Fix parameter_static and merge issues * More docs from new PRs and Parameter WIP * Missed a name * Move parameter_static to interface assets * Clean up code_8012EC80.c data * Fix comment * Add comments to parameter_static * Oops * fix merge * Missed a PR review suggestion * Fix merge
2021-11-23z_bgcheck.c (#357)mzxrules
* first few functions * two more almost matching functions * Rebase to NBS, get it to compile * BgCheck_RaycastFloorStaticList OK, fix-up some functions * BgCheck_SphVsStaticWall OK! and a few others * more z_bgcheck NON_MATCHINGS * OK more functions, reorganize external reference #defines * More functions OK, more struct fixes * More OKs * Decomp all the way to the end of bgcheck * All functions attempted * Rename functions * formatting, data migration * Give names to unk structs, rename some structs, fix some non-equivalent functions * WaterBox_GetSurfaceImpl OK * BgCheck_ResetPolyCheckTbl OK, improve WaterBox_GetSurface2 codegen, eliminate warnings and clean up source. * BcCheck3_BgActorInit ->BgCheck3_BgActorInit, fix warnings * pr change requests * fix crc maybe * implement more changes * implement alf's changes
2021-11-20Audio BGM Macros (#460)engineer124
* Introduce bgms * Fill in bgm enums * Rename bgm to clearer names * Fix spacing * Fix "No_Music" define * remove comment * Improve bgm names, found another seqId function * Another seqId function * Another name change * Woods of Mystery -> Sarias Song * add saria's song bgm to pierre * Another bgm function found! * Add bgm's to `gSaveContext.seqIndex`
2021-11-11Improve/Add Enums for Player, Items, and Quest (#275)engineer124
* Create enums (non-matching monkaBSS) * Add effect enum * Almost fix bss reordering (1 different word) * Fix capacity * Fully fix bss * Add PlayerBoots * PR Feedback & add missing playerForm enums * Clean-Up * Script to check global bss ordering * Bit of cleanup * Format * Remove global_bss_check PR * Fix bss * Add enums to new PRs & previously missed ones * Remove Effect Enums * Missed one * Format * Remove old prevent_bss_reordering.h comments * Use a better macro * A few more uses of enums found * Add enums to recent PRs * Improve GI enums * Add enums from new PRs * PR Suggestions * format * Fix bss * Fix mistake in GI * No actually, part of it was correct before Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
2021-10-29Decompile graph.c (#274)Tharo
* Decompiled, 1 non-matching, add some bss reordering helpers * Document stuff * Review suggestions * graphutil.c -> graphalloc.c * Try to fix fault callback warnings * Remove extra comments in GfxMasterList * char pad -> u32 pad Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Fix gameState Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Other suggestions Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2021-10-24Animation system updated, some more boot files decompiled (+6%), ↵Lucas Shaw
z_fcurve_data_skelanime decompiled (1 non-matching), some asm files split, etc (#89) * Progress on various files * gfxprint stuff * split some rodata, add iconv for rodata string parsing * z_std_dma rodata * 2 nonmatchings in gfxprint * mtxuty-cvt ok * more * match a function in idle.c * progress * Cleanup * Rename BgPolygon to CollisionPoly * progress * some effect stuff * more effect progress * updates * made suggested changes * z_effect_soft_sprite_old_init mostly ok * remove old effects enum * gamealloc.c OK * added more files * motor.c almost done * motor.c OK * updates * migration of two files * listalloc.c oK * z_fcurve_data_skelanime split * z_fcurve_data_skelanime.c decompiled * more files split * z_malloc.c OK * contpfs.c OK * fault.c rodata migrated * migrated fault_drawer rodata * update * update preprocess.py * renamed functions in z_skelanime * started z_skelanime cleanup * like halfway through fixing z_skelanime * animation system updated to meet oot standards * remove unused animation structs * rename matrix structs to fit oot * Add -woff 712 * fix diff_settings.py because i accidentally broke it before * fixed merge conflict, doesn't match though * It matches now * Updates * Fixed warnings...added gcc code syntax checking * Remove gcc check, added in Tharo's PR * warnings fixed (i think) * fixed all warnings i think * ok * not sure what to do * Fix all warnings i think (z_en_a_keep needs some file cleanup thouguh) * it matches if i do this * remove comment * accidentally put osPfsFreeBlocks in epilinkhandle.c * memcmp -> bcmp * change u32 size to size_t size, delete string.h because it caused unnecessary confusion with defining size_t twice * format.sh * MTXMODE_NEW and MTXMODE_APPLY to matrix functions * Made suggested changes * pragma sFaultDrawerFont instead of including in repo * add some functions to functions.h * Bss reordering fixed in z_collision_check...added hack to disasm.py * Updated z_en_a_keep.c * Missed suggestion in EnAObj_Destroy * . * update z_fcurve_Data_skelanime and z_skelanime with suggestions * devmgr.c ok * minor changes * Addressed comments * remove redundant file * gfxp -> dlist in game.c * updated actorfixer.py * fixed warnings in z_malloc * Change void* back to Actor* * format * Add the soft_sprit comments back * Rename SV->Flex * remove .common * run format * Update src/code/z_skelanime.c * u32 channel Co-authored-by: Lucas Shaw <lucas.shaw1123@gmail.com> Co-authored-by: angie <angheloalf95@gmail.com> Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
2021-09-22`ovl_daytelop` OK (#277)Anghelo Carvajal
* eeeee * nonequivalents * draw * Import data * Match Daytelop_LoadGraphics * draw kinda better * extract daytelops and gameover * SEGMENT_ROM macros * Use extracted symbols for daytelop * match Daytelop_Draw * Fix bss * draw cleanup * Daytelop_Update from non equivalent to non matching * Some renames and spec * Run formatter * enum * sfx * Use SEGMENT_ROM_START macros everywhere * more macros * run formatter * Add description * update variables.txt * Remove extra stuff in gbi.h * Would this fix it? * and again * whoops * Apply suggestions from code review Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Tharo's suggestions * match Daytelop_Update * run formatter * fix merge issues Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2021-08-03Overhaul the build system (#234)Tharo
* wip * fix * add disassembler * Disasm builds OK * Variable addends * More wip * Rodata migration implemented * Cleanup old tools * Try fix submodule -> subrepo merge * git subrepo pull --force --remote=https://github.com/zeldaret/ZAPD.git tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "602e609" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "602e609" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * Builds again but assets are totally broken * git subrepo pull --force tools/asm-processor subrepo: subdir: "tools/asm-processor" merged: "1ffdb08a" upstream: origin: "https://github.com/simonlindholm/asm-processor.git" branch: "master" commit: "1ffdb08a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * More cleanup, move functions.txt and variables.txt to tools/disasm and rm tables * rm z64compress in preparation for subrepo * git subrepo clone (merge) https://github.com/z64me/z64compress.git tools/z64compress subrepo: subdir: "tools/z64compress" merged: "eb11085c" upstream: origin: "https://github.com/z64me/z64compress.git" branch: "main" commit: "eb11085c" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * Fix asset extraction * Fix diff-init make rule * Split code bss * Split assumed linker bug padding from assembly files * add filelists for mm.us.rev1 * Maybe working, but I'm not sure * add overlays to spec * Add rodata to actos * Everything compiles * Make a lot of C files for code * Add almost every file in code to spec * whoops * 3 code files left * add scenes to spec * More progress on progress.py * Fix skelanime in spec * audio files! * Fix merge issues * Fix some C files in code * Fix remaining code files * Use existing O1 C files in spec * reorder boot order in spec * update spec * fault.c * Convert relocs on completed actors, fixbaserom uses current rom name * more boot files * Add VT macros and script * finish already existing boot files * most of libultra * fix 64bits libultra files * Use C files for libultra, wrap some functions in NON_MATCHING * Remove duplicate of OS_CLOCK_RATE from fault.c * C files for fbdemos * delete dumb files * bootstrap C files, still need to add them to the spec * update fixbaserom * boot OK? * I forgot to commit the spec * C for gamestates * C for kaleido * Change all includes to "" * copy actor sizes script from oot * I forgot to delete those files * Basic C files for effects * Add effects initvars names * Remove mislabelled boot functions from header/txt * Begin porting bootstrap_fx, some sizes * Fix <> * Fix enum * Fix diff.py * fix libultra stuff * update regconvert * update setup warnings * add some missing ; * Fix some makefile stuff and other fixes on some non_matching functions * add executable flag in extract_baserom and fixbaserom * fix relative path * copy assist from oot * fix map path * another assist path fix * Delete C files for handwritten files * add code_801A51F0 to spec * add gfxbuffers to spec * Move rodata to top of each file when possible * UNK_TYPEs for func_801A51F0 * Remove kaleido rodata from spec * Update spec and undefined_syms for recent merge * GCC warnings and fix errors in nonmatchings, * round percentage numbers * progress script: format changes * progress: error on non-existing files * fix warning in z_scene_table * Match 2 nonmatchings in z_actor * Warnings in lightswitch and invadepoh * Fix warning in z_actor_dlftbls * I though I fixed this one * whoops * Comment out CC_CHECK * Removed redundant ultra64.h includes * Update asm_processor, sorted boot_O1 into other folders, completed the fbdemo bootstrap, cleaned up undefined_syms * Completed gamestates bootstrap * Split kaleido_scope * Remove section.h and segment.h, move keep object externs to a common location in variables.h * Completed effects bootstrap * Segmented address externs for effects, fbdemos, gamestates and kaleido * Move actor data externs out of the if 0 * Segmented address externs for actors * Prepare actionfunc detection * fix script, how did it even work before * Fix actionfunc script again, re-introduce some more intermediate prints to the disassembler * Automated actionFunc detection in actors * Segmented addresses from player .text * rm old segment addrs script and fix build * Move sizes folder to tools * Make build.py executable * New Jenkinsfile Prayge * Remove numpy dependencies * Add warnings_disasm_current.txt * my bad * Update spec and undefined_syms * Add z_eff_ss_hahen to pametfrog * git subrepo pull (merge) --force tools/z64compress subrepo: subdir: "tools/z64compress" merged: "163ca2af" upstream: origin: "https://github.com/z64me/z64compress.git" branch: "main" commit: "163ca2af" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * Make z64compress print to stdout * sneeky commit to update warnings tooling * test * Another test * Mark fixing overlay reloc generating as a TODO * Update warnings stuff * Communicate the return code from running z64compress back to the Makefile through the wrapper * Run formatter, remove extra commented copy of function * Re-fix some includes * Convert atan to hex to conform to decided style * Some tidying up, remove c for fp and the other two handwritten code files * BSS in z_collision_check & z_scene_proc * add static back in * Fix timerintr bss, add file to spec, some cleanup * Remove externs * Newline * Readd enums * Typo * Colours * Comments for hitmark enum values Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Improvements and suggestions * Organize and remove unused imports and use env for python3 scripts, delete unused overlay.py Co-authored-by: angie <angheloalf95@gmail.com> Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: engineer124 <engineer124engineer124@gmail.com> Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
2021-07-13`ovl_En_Ma4` matched and mostly documented (#199)Anghelo Carvajal
* First pass * limbdraw * another one * lots of stuff * stuff * big one * func_80ABEB6C * The NON_MATCHING that matches in reality * "Fix" some cases * Fix merge issues * fix func_80ABF254 * match a pair * func_80ABF7C8 * func_80ABE1C4 * func_80ABF354 * func_80ABF534 * Import data * Limb fixes * Minor renames * Fix merge issues * A few renames * Rename half the functions * More renames * More renaming * documentation finished * Format * fix typo * whoops * Fix merge issues * Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.h Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> * Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.h Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> * Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.h Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> * Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.c Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> * Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.c Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> * Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.c Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> * Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.c Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com> * Update variables names Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
2021-07-05Document most of global context (#198)Zelllll
* doesn't build for some reason..? * some formatting fixes * windows calculator is trash * fix! * fix2 * most of global context documented * interfacectx * hopefully fix interface * document restrictions * envCtx done * revert accidental change * fix * pause ctx done * fixxxxxxxxxxxxxxx * remove unintended zapd change * fix..? * format files * Update include/z64.h Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * ocarinstaff * Update include/z64.h Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Update include/z64.h Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * suggestions * fix mistake in pausectx * typo * door context * renames * all nb removed * Update include/z64.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update include/functions.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * fix kanfont, new docs * format files, merge master * fix typo in linker script * extract asm properly * door context rename * fixes in door context Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2021-06-17Add current missing functions prototypes (#181)Anghelo Carvajal
* First bash * Another batch * Another bunch * Update actorfixer * run format * Apply suggestions from code review Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Suggestion * context renaming * Update include/functions.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Fix renamings * fix Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2021-05-25partially finish `code_0x8012EC80`, document all of gSaveContext (#138)Zelllll
* not ok, why? * OK! * fix data * finish data etc * work on save context * save finished * first func done * roomInf * done for now * add missing file * add most og names for struct members * fix accidental change * Update z_en_ginko_man.c * Update z_scene.c * maybe fix stuff hopefully * proto * sasa * Update include/z64save.h Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> * Update z64save.h Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>
2021-05-09Scene Changes (#114)Zelllll
* match function * major cleanups * rename switch functions * use graph_alloc to fix fake matches * more documentation * more matches, lots of changes * lots more work * format * Update z_scene_proc.c * very hard lagrange interpolation function OK! * remove any remaining * documentation done, only two functions left * a few more things * one function left! * document another oot leftover * last function decompiled, not matched yet * scene_proc complete * start work on z_scene * done with z_scene * remove unessecary typedefs * fix some things to remove warnings * Add z_scene_table and decomp data * Delete ctx.c * add draw cfg enum * cleanup * most scene table functions done * done for now * all scene files done * Update include/z64scene.h Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> * add missing macros * fix some renames * scene texture file rename * added temporary structs so it still builds * more structs * even more old structs * fix boyo * should fix compile error * lets hope nothing broke * ub comment back Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>
2021-04-29Adds in scene support (#117)Kenix3
* 1 scene done, Z2_SOUGEN OK * All scenes OK * Makefile improvements * Use WIP ZAPD branch as submodule * Add spawn rotation flag macro * Fix bad merge * Move scenes to be in their own subfolders * Rename and restructure extracted baserom files * Progress tracking for assets * Add asset progress to csv * Use master ZAPD * Use distclean like in OOT * Fix up a few things with the makefile * Fix scenes not being dumped from ELF Co-authored-by: Rozelette <Uberpanzermensch@gmail.com>
2021-04-18DoorAna: OK (#90)Isghj
* DoorAna: OK * DoorAna: changed z_lib functionname to match new master * DoorAna: requested changes * DoorAna: requested changes * DoorAna: Renamed nextEntranceIndex * DoorAna: some changes requested Co-authored-by: isghj8 <isghj8@gmail.com>
2021-04-07z_lib fully matched (#85)Rozelette
* z_lib OK * Documentation * Added stdbool and stdint * Fixup for new names * Fixup bad merge * Feedback * Use u/s32 for intptr_t
2021-03-27Some OOT transfers, some renaming, etc (#75)Lucas Shaw
* Progress on various files * gfxprint stuff * split some rodata, add iconv for rodata string parsing * z_std_dma rodata * 2 nonmatchings in gfxprint * mtxuty-cvt ok * more * match a function in idle.c * progress * Cleanup * Rename BgPolygon to CollisionPoly * progress * some effect stuff * more effect progress * updates * made suggested changes * z_effect_soft_sprite_old_init mostly ok Co-authored-by: Lucas Shaw <lucas.shaw1123@gmail.com> Co-authored-by: Rozelette <Rozelette@users.noreply.github.com>
2021-03-27z_lights fully matched (#80)Rozelette
* z_lights OK * Documentation * Fixup for z_collision_check * Improve function types of bind functions * Fixup for types
2021-03-27TwoHeadArena and TwoHeadGfxArena OK (#83)kyleburnette
* TwoHeadArena and TwoHeadGfxArena OK * Changed negatives to ~ in TwoHeadArena.c * Renamed functions to match OoT * Formatted code files * Removed dispbuf
2021-03-27Door_Spiral OK (from zel) (#87)Rozelette
* Door_Spiral OK * Cleanup
2021-02-28Add OoT actor structs and enums (#55)Zelllll
* add oot structs * revert formatting * fix comment thing * fix accidental renames * slight fix * naviEnemyId -> hintId * fix headers
2020-09-27z_actor_dlftbls.c OK. Rework a bunch of segment address organization. (#29)Rozelette
2020-08-31Split headers to be more similar to OOT (#13)Rozelette
2020-08-07Add object enum (#9)Rozelette
2020-08-06Add actor and scene enums (#8)Rozelette
2020-07-24Initial code formatKenix3
2020-06-06Adds TODO comments to remove implementation defined pointer manipulation.Kenix3
2020-06-04z_lib now uses SEGMENTED_TO_VIRTUAL macroKenix3
Additionally removed some TODO comments in z_scene and defining gRspSegmentPhysAddrs array size as NUM_SEGMENTS
2020-06-04Added macros headerKenix3
Additionally, updated code to use PHYSICAL_TO_VIRTUAL and ALIGN16 macros. Additionally, retyped gRspSegmentPhysAddrs back to u32 as in OOT. These get the straight return value of PHYSICAL_TO_VIRTUAL, so they are u32.
2020-06-04Fixes known undefined behaviour from DmaMgr and Lib_Ptr taking u32 rather ↵Kenix3
than void*
2020-06-04All z_scene functions now OKKenix3
2020-04-29z_scene functions now use the same structs as OOT (#3)Kenix3
* z_scene now uses OOT structs where available Additionally commits a decompiled z_actor function. * Fixes audio_setBGM function call in Scene_HeaderCommand15 * Update structs.h Co-authored-by: rozlette <uberpanzermensch@gmail.com> Co-authored-by: Egor Ananyin <ananinegor@gmail.com>
2020-04-21Fix build issuerozlette
2020-04-08Adds in fully matching Scene_HeaderCommand00Kenix3
Additionally fixes code formatting in Scene_HeaderCommand15
2020-04-08Decompile functions in z_sceneKenix
2020-03-15Rename many functions, structs, and variables to match the oot decomp. Some ↵rozlette
things have not been renamed as their respective files have not been decompiled yet.
2020-02-20Make non-matchings consistent with ootrozlette
2020-02-19Normalize line endingsrozlette
2020-02-17Decompiling functions in z_scene (#4)Kenix3
* Decompiling functions in z_scene * Bringing decompiled functions in line with project style
2020-01-25Fix nonmatching location in z_scene stubrozlette
2020-01-23Splits out z_scene for decompilation.Kenix