mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Updated generate_ctx script
This commit is contained in:
@@ -62,4 +62,7 @@
|
||||
|
||||
#define ABSF(x) (x < 0.f ? -x : x)
|
||||
|
||||
// Used to suppress warnings in the ./generate_ctx.sh script.
|
||||
#define INCONSISTENT
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef _OBJECT_FUNCTIONS_H_
|
||||
#define _OBJECT_FUNCTIONS_H_
|
||||
|
||||
#include "macros.h"
|
||||
#include "types.h"
|
||||
#include "structs.h"
|
||||
#include "level_object_entries.h"
|
||||
@@ -428,10 +429,10 @@ void obj_loop_exit(Object *obj, s32 updateRate);
|
||||
void obj_loop_fish(Object *obj, s32 updateRate);
|
||||
void obj_loop_scenery(Object *obj, s32 updateRate);
|
||||
void obj_init_midifade(Object *obj, LevelObjectEntry_MidiFade *entry);
|
||||
void obj_init_butterfly();
|
||||
INCONSISTENT void obj_init_butterfly();
|
||||
void obj_init_trigger(Object *obj, LevelObjectEntry_Trigger *entry);
|
||||
void obj_init_animation();
|
||||
void obj_init_lensflareswitch();
|
||||
INCONSISTENT void obj_init_animation();
|
||||
INCONSISTENT void obj_init_lensflareswitch();
|
||||
void obj_init_lensflare(Object *obj, LevelObjectEntry_LensFlare *entry);
|
||||
void obj_init_weaponballoon(Object *obj, LevelObjectEntry_WeaponBalloon *entry);
|
||||
void obj_init_door(Object *obj, LevelObjectEntry_Door *entry);
|
||||
|
||||
+1
-1
@@ -343,7 +343,7 @@ Object **func_8000E988(s32 *arg0, s32 *cnt);
|
||||
s32 getObjectCount(void);
|
||||
s32 func_8000E9C0(void);
|
||||
void func_8000E9D0(Object *arg0);
|
||||
void gParticlePtrList_addObject();
|
||||
void gParticlePtrList_addObject(Object*);
|
||||
s32 func_80010018(void);
|
||||
s32 func_80010028(s32 arg0);
|
||||
void func_80011390(void);
|
||||
|
||||
@@ -118,7 +118,7 @@ void alSndPNew(audioMgrConfig *c);
|
||||
void func_80004604(u8 *arg0, u8 arg1);
|
||||
u8 func_8000461C(u8 *arg0);
|
||||
void func_80004638(ALBank *bnk, s16 sndIndx, s32 arg2);
|
||||
void func_8000488C();
|
||||
INCONSISTENT void func_8000488C();
|
||||
void func_800049D8(void);
|
||||
void func_800049F8(s32 soundMask, s16 type, u32 volume);
|
||||
u16 get_sound_channel_volume(u8 arg0);
|
||||
|
||||
@@ -86,7 +86,7 @@ def collect_func_from_regex(filename, filetext, regex, data):
|
||||
for match in defs:
|
||||
typeAndName = cleanup_string(match.group(1)).split()
|
||||
funcType = cleanup_string(' '.join(typeAndName[0:-1]))
|
||||
if funcType == 'return' or funcType == "else":
|
||||
if funcType == 'return' or funcType == "else" or funcType.startswith('INCONSISTENT'):
|
||||
continue; # Skip false matches
|
||||
funcName = cleanup_string(typeAndName[-1])
|
||||
args = get_cleaned_args(match.group(2))
|
||||
@@ -149,7 +149,7 @@ def collect_typedefs(filename, filetext, data):
|
||||
}
|
||||
|
||||
# This regex extracts the type from a member.
|
||||
structMemTypeRegex = r"^[ \t]*(?:/[*][^*]*?[*]/)?[ \t]*?((?:[A-Za-z0-9_]+[ *\t]+)+)[ \t*]*(?:(?:(?:[A-Za-z0-9_*]+)(?:[ \t*]*[\[][^]]*[\]])?[ \t]*)|(?:[^\n;]*));"
|
||||
structMemTypeRegex = r"[ \t]*(?:/[*][^*]*?[*]/)?[ \t]*?((?:[A-Za-z0-9_]+[ *\t]+(?=[^{ ]))+)[ \t*]*(?:(?:(?:[A-Za-z0-9_*]+)(?:[ \t*]*[\[][^]]*[\]])?[ \t]*)|(?:[^\n;]*));"
|
||||
# Get all the types that are in the struct
|
||||
def get_struct_types(structText):
|
||||
defs = regex_get_matches(structText, structMemTypeRegex)
|
||||
|
||||
Reference in New Issue
Block a user