-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document poffin.c and poffin case struct #339
base: main
Are you sure you want to change the base?
Conversation
|
||
#include "poffin.h" | ||
|
||
typedef struct PoffinCase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
polish: In general, we try to zip these structures up into the owning module's header file. struct
-only headers are reserved for special cases when needed for untangling circular dependencies or sharing definitions with build-tooling.
#ifndef POKEPLATINUM_STRUCT_0202A93C_H | ||
#define POKEPLATINUM_STRUCT_0202A93C_H | ||
#ifndef POKEPLATINUM_STRUCT_POFFIN_H | ||
#define POKEPLATINUM_STRUCT_POFFIN_H | ||
|
||
typedef struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
polish: As with the above comment (and also for the struct_decls/poffin_case_decl.h
file, as well):
- Zip this definition into
include/poffin.h
- Replace all the inclusions of
struct_defs/poffin.h
withpoffin.h
- Delete this file (and
struct_decls/poffin_case_decl.h
).
@@ -26,7 +28,7 @@ BOOL sub_0202A914(Poffin *poffin) | |||
|
|||
void Poffin_clear(Poffin *poffin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void Poffin_clear(Poffin *poffin) | |
void Poffin_Clear(Poffin *poffin) |
Similarly (github will not let me do this on the associated lines):
-Poffin *Poffin_malloc(int heapID)
+Poffin *Poffin_New(int heapID)
-void Poffin_copy(Poffin *src, Poffin *dest)
+void Poffin_Copy(Poffin *src, Poffin *dest)
break; | ||
} | ||
} // skips rest of execution, reached end of poffin case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
polish: Remove this comment (unnecessary).
As per description.
Only undocumented function in
poffin.c
now issub_0202A9E4
which seems to be related in some way to the cooking minigame in which you make poffins.Renames some headers appropriately and notably includes the
poffin.h
header directly intostruct_defs/poffin_case.h
to use theMAX_POFFINS
macro as the array size.