X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmain.h;h=44c1b6a5cfc64e67dc95269466c52b9dbbf50325;hp=020b6754691756b3ef99fc272387e210e2043fe7;hb=456f1b86b44a631e7c58e42ae72ce07970843944;hpb=c5061935e3f7b91d889d7546b06c4515c3004cb2 diff --git a/frontend/main.h b/frontend/main.h index 020b6754..44c1b6a5 100644 --- a/frontend/main.h +++ b/frontend/main.h @@ -27,16 +27,68 @@ #define PLUGINS_DIR "/.pcsx/plugins/" #define PLUGINS_CFG_DIR "/.pcsx/plugins/cfg/" #define PCSX_DOT_DIR "/.pcsx/" -#define BIOS_DIR "/.pcsx/bios/" #define STATES_DIR "/.pcsx/sstates/" #define CHEATS_DIR "/.pcsx/cheats/" #define PATCHES_DIR "/.pcsx/patches/" +#define BIOS_DIR "/bios/" extern char cfgfile_basename[MAXPATHLEN]; +extern int state_slot; + +/* emu_core_preinit - must be the very first call + * emu_core_init - to be called after platform-specific setup */ +int emu_core_preinit(void); +int emu_core_init(void); + +void emu_set_default_config(void); +void emu_on_new_cd(void); + int get_state_filename(char *buf, int size, int i); +int emu_check_state(int slot); +int emu_save_state(int slot); +int emu_load_state(int slot); + +void set_cd_image(const char *fname); extern unsigned long gpuDisp; extern int ready_to_go; +extern char hud_msg[64]; +extern int hud_new_msg; + +enum sched_action { + SACTION_NONE, + SACTION_ENTER_MENU, + SACTION_LOAD_STATE, + SACTION_SAVE_STATE, + SACTION_NEXT_SSLOT, + SACTION_PREV_SSLOT, + SACTION_TOGGLE_FSKIP, + SACTION_SWITCH_DISPMODE, + SACTION_FAST_FORWARD, + SACTION_SCREENSHOT, + SACTION_VOLUME_UP, + SACTION_VOLUME_DOWN, + SACTION_MINIMIZE, + SACTION_GUN_TRIGGER = 16, + SACTION_GUN_A, + SACTION_GUN_B, + SACTION_GUN_TRIGGER2, +}; + +#define SACTION_GUN_MASK (0x0f << SACTION_GUN_TRIGGER) + +static inline void emu_set_action(enum sched_action action_) +{ + extern enum sched_action emu_action, emu_action_old; + extern int stop; + + if (action_ == SACTION_NONE) + emu_action_old = 0; + else if (action_ != emu_action_old) + stop = 1; + emu_action = action_; +} + #endif /* __LINUX_H__ */