2022-03-10 02:01:03 +00:00
|
|
|
#ifndef DYNOS_C_H
|
|
|
|
#define DYNOS_C_H
|
|
|
|
#ifndef __cplusplus
|
|
|
|
|
|
|
|
#include "dynos.h"
|
2022-03-31 06:04:41 +00:00
|
|
|
#include "types.h"
|
2022-06-02 19:19:54 +00:00
|
|
|
#include "engine/behavior_script.h"
|
2022-04-05 20:44:05 +00:00
|
|
|
#include "src/game/moving_texture.h"
|
2022-03-10 02:01:03 +00:00
|
|
|
|
2022-04-09 02:29:16 +00:00
|
|
|
void *dynos_swap_cmd(void *cmd);
|
|
|
|
|
2022-03-31 06:04:41 +00:00
|
|
|
// -- built in -- //
|
2022-05-14 21:28:25 +00:00
|
|
|
void *dynos_update_cmd(void *cmd);
|
|
|
|
void dynos_update_gfx();
|
|
|
|
s32 dynos_tex_import(void **output, void *ptr, s32 tile, void *grapi, void **hashmap, void *pool, s32 *poolpos, s32 poolsize);
|
2022-03-10 02:01:03 +00:00
|
|
|
void dynos_gfx_swap_animations(void *ptr);
|
|
|
|
|
2022-03-31 06:04:41 +00:00
|
|
|
// -- warps -- //
|
2023-08-18 16:31:59 +00:00
|
|
|
LevelScript* dynos_get_level_script(const char* scriptEntryName);
|
2022-10-01 05:51:00 +00:00
|
|
|
bool dynos_warp_to_warpnode(s32 aLevel, s32 aArea, s32 aAct, s32 aWarpId);
|
2022-03-31 06:04:41 +00:00
|
|
|
bool dynos_warp_to_level(s32 aLevel, s32 aArea, s32 aAct);
|
|
|
|
bool dynos_warp_restart_level(void);
|
2022-08-26 00:27:05 +00:00
|
|
|
bool dynos_warp_to_start_level(void);
|
2022-03-31 06:04:41 +00:00
|
|
|
bool dynos_warp_exit_level(s32 aDelay);
|
|
|
|
bool dynos_warp_to_castle(s32 aLevel);
|
|
|
|
|
|
|
|
// -- dynos packs -- //
|
2023-11-04 23:55:34 +00:00
|
|
|
void dynos_gfx_init(void);
|
2023-04-04 02:15:52 +00:00
|
|
|
void dynos_packs_init(void);
|
2022-04-20 04:06:18 +00:00
|
|
|
int dynos_pack_get_count(void);
|
|
|
|
const char* dynos_pack_get_name(s32 index);
|
|
|
|
bool dynos_pack_get_enabled(s32 index);
|
|
|
|
void dynos_pack_set_enabled(s32 index, bool value);
|
2023-10-30 05:03:36 +00:00
|
|
|
bool dynos_pack_get_exists(s32 index);
|
2022-04-23 10:23:30 +00:00
|
|
|
void dynos_pack_init(void);
|
2022-03-31 06:04:41 +00:00
|
|
|
void dynos_generate_packs(const char* directory);
|
|
|
|
|
|
|
|
// -- geos -- //
|
2022-04-20 04:06:18 +00:00
|
|
|
void dynos_actor_override(void** aSharedChild);
|
2022-04-16 20:05:10 +00:00
|
|
|
void dynos_add_actor_custom(const char *filePath, const char* geoName);
|
2022-03-31 06:04:41 +00:00
|
|
|
const void* dynos_geolayout_get(const char *name);
|
2022-05-14 21:28:25 +00:00
|
|
|
void *dynos_geolayout_to_graphnode(const void *geoLayout, bool keepInMemory);
|
2022-03-31 06:04:41 +00:00
|
|
|
|
|
|
|
// -- collisions -- //
|
2022-04-16 20:05:10 +00:00
|
|
|
void dynos_add_collision(const char *filePath, const char* collisionName);
|
2022-03-31 06:04:41 +00:00
|
|
|
Collision* dynos_collision_get(const char* collisionName);
|
|
|
|
|
2022-05-07 05:03:12 +00:00
|
|
|
// -- textures -- //
|
|
|
|
void dynos_add_texture(const char *filePath, const char* textureName);
|
|
|
|
bool dynos_texture_get(const char* textureName, struct TextureInfo* outTextureInfo);
|
|
|
|
|
2022-04-09 08:47:20 +00:00
|
|
|
// -- movtexqcs -- //
|
|
|
|
void dynos_movtexqc_register(const char* name, s16 level, s16 area, s16 type);
|
|
|
|
struct MovtexQuadCollection* dynos_movtexqc_get_from_id(u32 id);
|
|
|
|
struct MovtexQuadCollection* dynos_movtexqc_get_from_index(s32 index);
|
|
|
|
|
2022-04-02 22:14:04 +00:00
|
|
|
// -- levels -- //
|
2022-04-16 20:05:10 +00:00
|
|
|
void dynos_add_level(s32 modIndex, const char *filePath, const char* levelName);
|
2022-04-07 15:21:19 +00:00
|
|
|
const char* dynos_level_get_token(u32 index);
|
2022-04-09 06:01:41 +00:00
|
|
|
Trajectory* dynos_level_get_trajectory(const char* name);
|
2022-04-06 05:56:03 +00:00
|
|
|
void dynos_level_load_background(void *ptr);
|
2023-01-31 12:24:56 +00:00
|
|
|
u64 dynos_level_cmd_get(void *cmd, u64 offset);
|
2023-10-27 23:42:27 +00:00
|
|
|
void dynos_level_cmd_next(void *cmd);
|
2023-01-31 12:24:56 +00:00
|
|
|
void dynos_level_parse_script(const void *script, s32 (*aPreprocessFunction)(u8, void *));
|
|
|
|
void* dynos_level_get_script(s32 level);
|
2023-04-28 23:55:29 +00:00
|
|
|
s32 dynos_level_get_mod_index(s32 level);
|
|
|
|
bool dynos_level_is_vanilla_level(s32 level);
|
2022-04-02 22:14:04 +00:00
|
|
|
|
2022-06-02 19:19:54 +00:00
|
|
|
// -- behaviors -- //
|
|
|
|
void dynos_add_behavior(s32 modIndex, const char *filePath, const char *behaviorName);
|
|
|
|
s32 dynos_behavior_get_active_mod_index(BehaviorScript *bhvScript);
|
|
|
|
const char *dynos_behavior_get_token(BehaviorScript *bhvScript, u32 index);
|
|
|
|
void dynos_behavior_hook_all_custom_behaviors(void);
|
|
|
|
|
2023-05-12 23:15:35 +00:00
|
|
|
// -- models -- //
|
2023-05-19 04:29:57 +00:00
|
|
|
struct GraphNode* dynos_model_load_geo(u32* aId, enum ModelPool aModelPool, void* aAsset, bool aDeDuplicate);
|
2023-05-16 03:45:04 +00:00
|
|
|
struct GraphNode* dynos_model_load_dl(u32* aId, enum ModelPool aModelPool, u8 aLayer, void* aAsset);
|
|
|
|
struct GraphNode* dynos_model_store_geo(u32* aId, enum ModelPool aModelPool, void* aAsset, struct GraphNode* aGraphNode);
|
|
|
|
struct GraphNode* dynos_model_get_geo(u32 aId);
|
|
|
|
void dynos_model_overwrite_slot(u32 srcSlot, u32 dstSlot);
|
2023-05-18 06:32:39 +00:00
|
|
|
u32 dynos_model_get_id_from_asset(void* aAsset);
|
|
|
|
u32 dynos_model_get_id_from_graph_node(struct GraphNode* aGraphNode);
|
2023-05-12 23:15:35 +00:00
|
|
|
void dynos_model_clear_pool(enum ModelPool aModelPool);
|
|
|
|
|
2022-05-09 14:27:47 +00:00
|
|
|
// -- other -- //
|
|
|
|
void dynos_mod_shutdown(void);
|
2022-08-26 00:46:33 +00:00
|
|
|
void dynos_add_scroll_target(u32 index, const char *name, u32 offset, u32 size);
|
2022-05-09 14:27:47 +00:00
|
|
|
|
2022-03-10 02:01:03 +00:00
|
|
|
#endif
|
|
|
|
#endif
|