10#ifndef SF_CAMPAIGN_HOOK_H
11#define SF_CAMPAIGN_HOOK_H
16#define SFSF_MAX_CAMPAIGNS 16
17#define SFSF_CAMPAIGN_TYPE_BASE 3
20#define SFSF_AVATAR_TYPE_BASE 8
21#define SFSF_AVATAR_TYPE_MAX (SFSF_AVATAR_TYPE_BASE + SFSF_MAX_CAMPAIGNS - 1)
23typedef struct __attribute__((packed))
57 uint32_t param_2, uint32_t param_3,
58 uint32_t param_4, uint32_t coord,
97 uint8_t skill, uint8_t subskill,
98 uint32_t campaign_id,
bool is_shadowblade);
void(__thiscall * videoSequenceStop_ptr)(SF_CUiVideoSequence *_this)
SF_String *(__thiscall * getSavePath_real_ptr)(SF_String *_this, int campaign_type)
void(__thiscall * appMenuEnterCampaignFlow_ptr)(CAppMenu *_this, uint32_t param_1)
gameInfoSetAvatarType_ptr s_gameinfo_set_avatar_type
uint32_t g_campaign_count
void(__thiscall * gameInfoSetMapPathFull_ptr)(SF_GameInfo *_this, SF_String *map_path)
uint32_t(__cdecl * checkFileExists_ptr)(SF_String *name)
The engine's file existence check, resolved by initialize_campaign_hooks().
int32_t register_campaign(const SFSF_CampaignDef *def)
void(__thiscall * gameInfoSetAvatarType_ptr)(SF_GameInfo *_this, uint16_t avatar_type)
void __thiscall show_custom_campaign_screen(CMnuSmpButton *_this)
Builds the campaign screen.
void(__thiscall * avatarVectorsCopy_ptr)(void *dest_vectors, void *src_vectors)
startGame_ptr s_start_game
void initialize_preparenewgame_rewrite()
SFSF_CampaignDef g_campaigns[16]
void(__fastcall * playCampaignIntro_ptr)(CAppMenu *_this)
void __thiscall on_campaign_selected(CMnuSmpButton *_this)
Left panel row callback.
getBasePathString_ptr s_get_base_path_string
GdAvatarInternal *(__thiscall * avatarInternalCopy_ptr)(GdAvatarInternal *dest, GdAvatarInternal *src)
void __thiscall on_campaign_play(CMnuSmpButton *_this)
Play button callback - launches whatever the list has selected.
checkFileExists_ptr checkFileExists
void __thiscall initFirstMap(SF_GameInfo *_this, uint32_t skip_tutorial, uint8_t skill, uint8_t subskill, uint32_t campaign_id, bool is_shadowblade)
Proper map selection code for the future.
void initialize_campaign_hooks()
playCampaignIntro_ptr s_play_campaign_intro
#define SFSF_MAX_CAMPAIGNS
int32_t g_active_custom_campaign
void campaign_hook_on_main_menu(CAppMenu *app_menu)
void(__thiscall * startGame_ptr)(CAppMenu *_this, SF_GameInfo *game_info, uint32_t param_2, uint32_t param_3, uint32_t param_4, uint32_t coord, SF_String *param_6)
char **(__cdecl * getBasePathString_ptr)(void *out_string_obj)
CAppMenu * g_campaign_app_menu
uint16_t campaign_name_id