Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_campaign_hook.c File Reference
#include "../sf_wrappers.h"
#include "../sf_ui_wrappers.h"
#include "sf_campaign_hook.h"
#include "../sf_hooks.h"
#include "sf_prepare_new_game.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <direct.h>
#include <sys/stat.h>
Include dependency graph for sf_campaign_hook.c:

Go to the source code of this file.

Macros

#define CAMPAIGN_PANEL_WIDTH   443
#define CAMPAIGN_NAME_Y   32
#define CAMPAIGN_NAME_H   48
#define CAMPAIGN_AUTHOR_Y   88
#define CAMPAIGN_AUTHOR_H   28
#define CAMPAIGN_DESC_Y   140
#define CAMPAIGN_DESC_H   360
#define CAMPAIGN_PLAY_X   108
#define CAMPAIGN_PLAY_Y   540
#define CAMPAIGN_PLAY_W   227
#define CAMPAIGN_PLAY_H   36
#define CAMPAIGN_DESC_WRAP   40
#define CAMPAIGN_ROW_X   108
#define CAMPAIGN_ROW_Y_START   40
#define CAMPAIGN_ROW_PITCH   36
#define CAMPAIGN_ROW_W   227
#define CAMPAIGN_ROW_H   30

Typedefs

typedef LPCSTR *(__cdecl * GetDataStorageLocation_ptr) (char **param_1, uint32_t type)
typedef void(__thiscall * prepareTransition_ptr) (CAppMenu *_this, uint32_t param_1, uint32_t param_2)
typedef SF_GameInfo *(__thiscall * initDefaultInfo_ptr) (SF_GameInfo *_this)
typedef void(__thiscall * AC82_Zero_ptr) (AutoClass82 *_this)
typedef void(__thiscall * some_vector_fun_ptr) (void *_this, uint32_t *size)
typedef uint32_t(__thiscall * CMnuBaseFlagGetter_ptr) (CMnuBase *_this)
typedef void(__thiscall * CUtlCallBackInit_ptr) (void *_this, void *param1, void *param2, uint32_t param3)
typedef void(__thiscall * CUiGameZero_ptr) (void *_this)
typedef void(__thiscall * CUiGame_009a1fd0_ptr) (void *_this, uint32_t param1)
typedef SF_String *(__thiscall * AC95_get_figure_name_ptr) (void *AC95, SF_String *name_buffer, uint32_t figure_id)

Functions

void initialize_campaign_hooks ()
int32_t register_campaign (const SFSF_CampaignDef *def)
int isDirectoryExists (const char *path)
void checkDirs (CAppSession *_this)
SF_String *__thiscall getSavePath (CAppSession *_this, SF_String *output, uint32_t campaign_type)
uint8_t __thiscall quickLoad_helper (SF_CUiMain *_this)
uint32_t __thiscall getHdrStringID (uint32_t camp_type)
void __thiscall loadQuickSave (CAppMenu *_this, uint32_t unknown)
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 campaign_hook_on_main_menu (CAppMenu *app_menu)
void stop_intro_video (CAppMenu *app_menu)
void campaign_launch_flow (int32_t campaign_index)
void __thiscall on_campaign_selected (CMnuSmpButton *_this)
 Left panel row callback.
void __thiscall on_campaign_play (CMnuSmpButton *_this)
 Play button callback - launches whatever the list has selected.
void close_campaign_screen_callback (CMnuSmpButton *button)
void __thiscall show_custom_campaign_screen (CMnuSmpButton *_this)
 Builds the campaign screen.

Variables

startGame_ptr s_start_game
playCampaignIntro_ptr s_play_campaign_intro
getBasePathString_ptr s_get_base_path_string
gameInfoSetAvatarType_ptr s_gameinfo_set_avatar_type
CMnuBaseFlagGetter_ptr CMnuBaseIsVisible
prepareTransition_ptr prepareTransition
initDefaultInfo_ptr initDefaultInfo
AC82_Zero_ptr AC82_Zero
CUiGameZero_ptr CUiGameZero
CUiGame_009a1fd0_ptr CUiGame_009a1fd0
AC95_get_figure_name_ptr AC95_get_figure_name
some_vector_fun_ptr some_vector_init
some_vector_fun_ptr some_vector_dispose
CUtlCallBackInit_ptr CUtlCallBackInit
checkFileExists_ptr checkFileExists
SFSF_CampaignDef g_campaigns [16]
uint32_t g_campaign_count = 0
int32_t g_active_custom_campaign = -1
CAppMenug_campaign_app_menu = NULL