mm icon indicating copy to clipboard operation
mm copied to clipboard

More header cleanup

Open AngheloAlf opened this issue 1 year ago • 5 comments

  • Move many function declarations (and some variables) into new or existing headers.
    • z64kanfont.h is a notable one since it also moves Font and a few defines from z64message.h
    • z64path.h moves Path from z64scene.h
    • Move gPlayerFormObjectIds to z64player.h: It originally belongs to object_table.c, but I feel it makes more sense in the player header.
  • Move the actor and object segment declaration out of segment_symbols.h and only use them in the places they are used.
    • This introduces a z64actor_dlftbls.h header, putting the related declarations there.
  • ~~Introduce ObjectOverlay for gObjectTable.~~
    • ~~I don't think it is correct to use RomFile here even if it is the same struct, since they represent different data (objects vs rooms)~~

AngheloAlf avatar Feb 08 '24 23:02 AngheloAlf

I don't think it is correct to use RomFile here even if it is the same struct, since they represent different data (objects vs rooms)

Are you confusing Rom and Room?

fig02 avatar Feb 08 '24 23:02 fig02

OoT has this in z64dma cause it represents a generic file that gets dma'd from ROM, its not only for rooms

fig02 avatar Feb 08 '24 23:02 fig02

No. I do think it is better for those two struct to be different, even if they look the same. It is used in only two places, as a list of rooms in a scene and in the object table, and I couldn't find any code that needs them to be the same

AngheloAlf avatar Feb 08 '24 23:02 AngheloAlf

Its just a generic struct that has a rom start and end. What the contents of the file is doesnt really matter. I dont agree it needs to be different. Also, it gets used in kankyo too for skybox files.

Also, objects are not overlays. So even if it did use a different struct, it would need a different name. But I dont think it needs a new struct

fig02 avatar Feb 08 '24 23:02 fig02

(resolved in discord)

fig02 avatar Feb 08 '24 23:02 fig02