Commit Graph

24 Commits

Author SHA1 Message Date
Derek Hensley
f26e77ba40
More General Cleanup (#1638)
* LINKER_FILES in makefile

* COLPOLY_GET_NORMAL

* math header

* libc

* M_PI for cosf and sinf files

* MAXFLOAT

* Revert "MAXFLOAT"

This reverts commit 96b75ffaa8.

* Remove SHT_MINV

* SHRT_MAX

* Add M_PI

* Angle macros

* f suffix

* Format
2024-06-03 14:33:03 -04:00
Anghelo Carvajal
2fdcdd91b3
Split effect headers and a bit of cleanup (#1482)
* 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
2023-11-27 12:24:46 -03:00
engineer124
e810559391
Object Cleanup (#1410)
* object cleanup

* namefixer

* objectPtr

* PR Review

* PR Review

* more uses of macro

* missed another one
2023-10-05 17:37:52 -03:00
Anghelo Carvajal
efc9df3f56
ovl_player_actor: Dawn of a new PR (#1227)
* Rename Player_UpdateBottleHeld

* Match func_808497A0

* func_80852290 NON_MATCHING

* Match func_8083B3B4

* Params cleanup

* Match func_8083FBC4

* sfxId cleanups and others

* Fix declaration of functions from D_8085D990

* Change D_8085BE84 to be a 2D array

* ARRAY_COUNT_2D

* Match func_8085ADA0

* func_808426F0 nonmatching

* Match func_80852290

* Match func_808426F0

Co-authored-by: engineer124 <engineer124engineer124@gmail.com>

* Add notes to Player_SetDoAction

* Name putAwayCountdown

* rebase

* Match func_80856918

* format

* func_8084933C nonmatching
small amount of boomerang documentation

* Progress on moving data near where it is used

* finish moving data

* format

* cleanup up remaining data

* more match

* Some minor cleanups

* PlayerCsMode enum

* func_80851F18 nonmatching

* Fix unk_B10

* Purge ExchangeItemID enum

* Rename `targetActor` to `talkActor`

* Name `targetedActor`

* PLAYER_LIMB_BUF_SIZE

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>

* Change SkelAnime Player functions to take a void pointer for the corresponding buffers

* Use PlayerAnimationFrame on Player_DrawImpl

* Match func_8082F1AC

* Match func_8083D23C

* cleanup

* Match and clean up func_808373F8

* Match and document func_8083A98C

* PLAYER_PARAMS macro and PlayerInitMode enum

* Preliminary names for InitMode functions

* Match func_8083C8E8

* remove redundant externs

* Match func_8084933C

* cleanup func_8084933C

* Access D_8085BE84 directly instead of using a macro

* Match func_8084AC84

* Fix boomearng typo

* OK boomerang

* cleanup func_8083D168

* untargetedRotY

* this->unk_14E = ABS_ALT(var_v1);

* GIFIELD macros

* sort of a match

* Match func_8084C16C

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>

* Use the same trick to match func_808573A4

* Add note on Deku spinning

* Match func_8084D18C

* Match func_80850D68

* Improve func_80832660

* Match func_80854EFC

Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>

* Rename unk_B2A to getItemDrawId

* Some cleanup

* fix merge issues

* format

* minor anim docs

* Match func_808553F4

* Cleanup func_808553F4

* func_8083D860 nonmatching

* Match func_8083D860

* Defake func_80859BA8

* ()

* Add notes to PlayerAnimGroup enum

* underwaterTimer

Co-authored-by: engineer124 <engineer124engineer124@gmail.com>

* some stateFlags cleaning

* more stateFlags cleaning

* some notes and minor cleanups

* more general cleanups

* Slightly less fake func_80832CAC

* Document some melee weapon damage stuff

* Mark lunge storage

* Note PCS patch

* match

* add notes to bss

* yeet extra indentation

* add reloc as nonmatching to spec

* floorSfxOffset

* Player_GetFloorSfx

* Player_GetFloorSfxByAge

* Comments for AnimSfx dunctions

* Name some AnimSfx functions

* Name AnimSfx stuff

* Some PlayerAgeProperties notes

* use animflag defines

* Player_SpawnExplosive

* fix enum and some other minor fixes

* Bit more misc. cleanup

* Use OoT's version of func_808333CC

* Note on quickspin buffer

* Final nonmatching, func_80851F18

Co-authored-by: Synray <31429825+Synray@users.noreply.github.com>

* RIP player.c

* Name Player_StopHorizontalMovement

* misc fixes

* Actor_DeactivateLens

* fixes

* typos and tweaks

* minor stuff

* add names as comments on the animgoup array

* Correct some function names and data type

* add anim commets to ageproperties

* some notes

* De-fake func_80840F90

* Defake & clean up func_8085ADA0

* Improve func_80859BA8

* Enums in func_80852B28

* Name some secret-related things

* 3 small things

* stuff

* Player_TalkWithPlayer

* SurfaceType_GetFloorType

* SurfaceType_GetWallFlags

* and more bgcheck stuff

* more bss naming

* sPlayerControlInput

* clean up func_80836F10 a bit

* name the parameters of func_80835BF8

* door stuff

* remove NON_MATCHING

* remove D_8085D2B0 padding

* Name some Player_Cutscene_ functions

* various cleanups

* format

* remainingHopsCounter

* some cleanups on the struct

* Actor_RequestRumble

* this->exchangeItemId = PLAYER_AP_NONE;

* fix merge stuff

* format

* PlayerUnkAA5

* Name two cylinder-related functions

* BSS

* Add MagicConsume's enum, treat lensActive as bool

* Update func_808332A0 based on better info

* fix merge

* fix merge issues

* remove redundant comments

* Name Player_AddQuake

* ANIM_FLAG_UPDATE*_*Y

* Format

* AT_TYPE_ENEMY

* fix merge issues

* format

* fix uintptr_ts

* Rename

* Name leftHandMf

* fix merge issues

* format

* exchangeItemId <= PLAYER_IA_MINUS1

* getItemDrawIdPlusOne

* currentActorCsIndex

* <= PLAYER_IA_MINUS1

* fix merge issues

* format

* namefixer and bss

* fix build

* bombs parameters cleanup

* bss

* Fix building

* fix building

* Fix building

* Fix building and cleanups

* Pre-PR cleanup

* really...

* format

* review

* stateFlag Mistakes

* 268 * 0.1f

* z64door.h

* fix cutscene stuff

* bss

* Update include/z64player.h

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* Update include/z64player.h

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* reiew

* PR Review

* collision

* review

* format and a few stuff i missed

* EnBomExplosiveType

* weekeventregconvert and eventinfconvert

* more review

* review

* bss

* review

* re format sGetItemTable

* Entangle PlayerMask and PlayerItemAction

* a few extra cases i missed

* bss

* review

* EnArrow stuff

* ARROW_MAGIC_DEKU_BUBBLE

* minor format

* merge

* fix bss

* review

* !ARROW_IS_ARROW

* review

* bool cleanup

* fix merge

* review

* Player_StopCutscene

* Player_RequestQuake

* quakeIndex

* Player_RequestQuakeAndRumble

* knobDoor and slidingDoor

* bss

* fix

* review

* dog and float

---------

Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu>
Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com>
Co-authored-by: Synray <31429825+Synray@users.noreply.github.com>
2023-05-28 17:41:37 -04:00
Anghelo Carvajal
d8064bb070
Effect table (#1209)
* effect_ss_table.h

* monkaBSS

* format

* Remove InitVars extern headers

* Remove `const` from InitVars

* cleanup

* cleanup

* format

* bss

* bss

* bss
2023-03-30 13:17:55 -03:00
Derek Hensley
c917880261
Misc cleanup 13 (#1189)
* FaultAddrConv Functions

* Invisible Ruppe macros

* skybox

* Z64 header defines

* ActorId

* remove i from KaleidoManager_FaultAddrConv

* size_t and parens
2023-03-07 23:44:18 -05:00
petrie911
2006a65ba6
z_overlay and z_fbdemo_dlftbls (Transition overlay handling), clean up a lot of u32s used to store pointers (#1073)
* overlay matches

* prototypes

* fbdemo too

* virtual to physical

* names, cleanup, etc

* bss reordering

* uintptr stuff

* fixed now?

* one fix

* headers and such

* fixes'n'stuff

* XXX action

* docs of a sort

* useless error codes

* n

* format

* header? I barely know her!

Co-authored-by: petrie911 <petrie911@users.noreply.github.com>
2022-10-04 21:46:32 +01:00
Derek Hensley
fdfe2842d9
Eff Srchball OK (#1092)
* OK

* Some docs and cleanup

* flags -> params

* Remove todo

* Small cleanup

* Description and dls

* Format

* bug tag

* Update bug comment

* Update src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.c

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* Format

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
2022-10-02 18:10:31 +01:00
Derek Hensley
9a4319827b
General Cleanup 9 (#961)
* small z64animation cleanup

* z64

* actor

* bgcheck

* collisioncheck

* curve

* cutscene

* effect

* item

* light

* math

* player

* save

* save

* schedule

* skin

* transition

* Remove leading 0s from size = 0x10

* z64schedule enum

* PR

* enums
2022-08-07 19:43:58 -04:00
Derek Hensley
0346fde02b
Effect Gsplash OK (#876)
* Ok

* Save?

* undef syms
2022-07-11 21:51:56 -04:00
Tom Overton
158d1b26b0
PlayState rename (#835)
* PlayState rename

* Make this work with the latest master and run format

* Respond to hensldm's review

* Respond to Elliptic's review

* Add Effect_GetPlayState to namefixer.py

* Add missed comma
2022-06-26 11:57:37 -04:00
Derek Hensley
f4bb821b56
EffectSsSbn OK (#751)
* Ok

* Cleanup and document

* File header description

* rename scroll related regs

* undef syms

* Cleanup for PR

* Move comment

* Add todo
2022-04-17 19:07:25 +01:00
Derek Hensley
d3e4a3368f
Effect_soft_sprite_old_init and particleOverlayTable OK (#520)
* Migrated data

* Migrate particleOverlayTable

* Import data for effect_soft_sprite, add g to effect table, minor cleanup of z64effect.h

* Name data

* Comment out static variable in variables.h

* Use better macros

* PR review and other cleanup

* Update bug comment
2022-01-04 05:50:12 +00:00
Roman971
6c2f521373
Decompile and clean up some effect files (#342)
* Decompile various effect files and cleanup z_effect.c

* Decompile z_eff_tire_mark.c and cleanup structs

* Small cleanups

* Apply most review suggestions

* Apply more review suggestions

* Change eff_shield_particle vertices to be extracted as an asset

* Add relevant effect functions to actorfixer.py
2021-12-27 02:51:16 +00:00
Lucas Shaw
dcf44596d2
Animation system updated, some more boot files decompiled (+6%), 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-10-24 10:59:14 -04:00
Maide
c96d1df320
En_Dodongo (#242)
* En_Dodongo

* NBS

* PR

* PR

* PR

* PR
2021-09-01 18:53:12 -04:00
Tharo
7743e5a2c4
Overhaul the build system (#234)
* 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-08-03 23:21:31 -04:00
engineer124
059c9075ca
effect_soft_sprite matching! (#177) 2021-06-10 18:05:40 -04:00
engineer124
e9eb4d4e0a
Match z_effect.c (#176) 2021-06-10 08:13:43 -04:00
engineer124
f4687fbbe7
General Cleanup (#155)
* minor fixes

* Consolidate into globalCtx

* fix error

* Fix Warnings

Co-authored-by: engineer124 <engineer124enginer124@gmail.com>
2021-05-20 21:24:47 -04:00
Zach Banks
dea3c8fd79
Fix all warnings raised by IDO (#152)
* Fix all warnings raised by IDO, ignore trailing commas

* Set -woff=624,...; keep const in printf functions

* Remove redefined macros in irqmgr.c

* Remove DECR macro & reformat

* Address PR comments from AngheloAlf
2021-05-18 22:28:04 -04:00
Lucas Shaw
623b6d5318
Some OOT transfers, some renaming, etc (#75)
* 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-27 16:17:41 -05:00
Rozelette
fee7a49abc
z_lights fully matched (#80)
* z_lights OK

* Documentation

* Fixup for z_collision_check

* Improve function types of bind functions

* Fixup for types
2021-03-27 14:29:30 -05:00
Rozelette
0844c24773
Split headers to be more similar to OOT (#13) 2020-08-31 19:02:37 -04:00