28 #ifndef AGS_ENGINE_AC_GAME_H 29 #define AGS_ENGINE_AC_GAME_H 31 #include "ags/engine/ac/dynobj/script_view_frame.h" 32 #include "ags/engine/main/game_file.h" 33 #include "ags/shared/util/string.h" 46 #define RAGMODE_PRESERVEGLOBALINT 1 47 #define RAGMODE_LOADNOW 0x8000000 // just to make sure it's non-zero 50 #define GP_SPRITEWIDTH 1 51 #define GP_SPRITEHEIGHT 2 53 #define GP_NUMFRAMES 4 54 #define GP_ISRUNNEXTLOOP 5 55 #define GP_FRAMESPEED 6 56 #define GP_FRAMEIMAGE 7 57 #define GP_FRAMESOUND 8 59 #define GP_NUMOBJECTS 10 60 #define GP_NUMCHARACTERS 11 61 #define GP_NUMINVITEMS 12 62 #define GP_ISFRAMEFLIPPED 13 64 enum CutsceneSkipStyle {
65 kSkipSceneUndefined = 0,
66 eSkipSceneEscOnly = 1,
69 eSkipSceneKeyMouse = 4,
70 eSkipSceneEscOrRMB = 5,
71 eSkipSceneScriptOnly = 6
77 #define VOL_CHANGEEXISTING 1678 78 #define VOL_SETFUTUREDEFAULT 1679 81 void Game_StopAudio(
int audioType);
82 int Game_IsAudioPlaying(
int audioType);
83 void Game_SetAudioTypeSpeechVolumeDrop(
int audioType,
int volumeDrop);
84 void Game_SetAudioTypeVolume(
int audioType,
int volume,
int changeType);
86 int Game_GetMODPattern();
91 int Game_GetDialogCount();
94 void SetDefaultSaveDirectory();
96 int Game_SetSaveGameDirectory(
const char *newFolder);
97 const char *Game_GetSaveSlotDescription(
int slnum);
99 const char *Game_GetGlobalStrings(
int index);
103 void AssertView(
const char *apiname,
int view);
104 void AssertViewHasLoops(
const char *apiname,
int view);
105 void AssertLoop(
const char *apiname,
int view,
int loop);
106 void AssertFrame(
const char *apiname,
int view,
int loop,
int frame);
108 int Game_GetInventoryItemCount();
109 int Game_GetFontCount();
110 int Game_GetMouseCursorCount();
111 int Game_GetCharacterCount();
112 int Game_GetGUICount();
113 int Game_GetViewCount();
114 int Game_GetUseNativeCoordinates();
115 int Game_GetSpriteWidth(
int spriteNum);
116 int Game_GetSpriteHeight(
int spriteNum);
117 int Game_GetLoopCountForView(
int viewNumber);
118 int Game_GetRunNextSettingForLoop(
int viewNumber,
int loopNumber);
119 int Game_GetFrameCountForLoop(
int viewNumber,
int loopNumber);
120 ScriptViewFrame *Game_GetViewFrame(
int viewNumber,
int loopNumber,
int frame);
121 int Game_DoOnceOnly(
const char *token);
123 int Game_GetTextReadingSpeed();
124 void Game_SetTextReadingSpeed(
int newTextSpeed);
125 int Game_GetMinimumTextDisplayTimeMs();
126 void Game_SetMinimumTextDisplayTimeMs(
int newTextMinTime);
127 int Game_GetIgnoreUserInputAfterTextTimeoutMs();
128 void Game_SetIgnoreUserInputAfterTextTimeoutMs(
int newValueMs);
129 const char *Game_GetFileName();
130 const char *Game_GetName();
131 void Game_SetName(
const char *newName);
133 int Game_GetSkippingCutscene();
134 int Game_GetInSkippableCutscene();
136 int Game_GetColorFromRGB(
int red,
int grn,
int blu);
137 const char *Game_InputBox(
const char *msg);
138 const char *Game_GetLocationName(
int x,
int y);
140 const char *Game_GetGlobalMessages(
int index);
142 int Game_GetSpeechFont();
143 int Game_GetNormalFont();
145 const char *Game_GetTranslationFilename();
146 int Game_ChangeTranslation(
const char *newFilename);
147 const char *Game_GetSpeechVoxFilename();
148 bool Game_ChangeSpeechVox(
const char *newFilename);
152 void set_debug_mode(
bool on);
154 void set_game_speed(
int new_fps);
156 float get_game_speed();
157 void setup_for_dialog();
158 void restore_after_dialog();
159 Shared::String get_save_game_directory();
160 Shared::String get_save_game_suffix();
161 void set_save_game_suffix(
const Shared::String &suffix);
163 Shared::String get_save_game_path(
int slotNum);
166 void restore_game_dialog();
168 bool do_restore_game_dialog();
171 void save_game_dialog();
173 bool do_save_game_dialog();
174 void free_do_once_tokens();
177 void save_game(
int slotn,
const char *descript);
178 bool read_savedgame_description(
const Shared::String &savedgame, Shared::String &description);
182 bool try_restore_save(
int slot);
183 bool try_restore_save(
const Shared::String &path,
int slot);
184 void serialize_bitmap(
const Shared::Bitmap *thispic, Shared::Stream *out);
186 void convert_guid_from_text_to_binary(
const char *guidText,
unsigned char *buffer);
187 Shared::Bitmap *read_serialized_bitmap(Shared::Stream *in);
188 void skip_serialized_bitmap(Shared::Stream *in);
189 long write_screen_shot_for_vista(Shared::Stream *out, Shared::Bitmap *screenshot);
191 bool is_in_cutscene();
192 CutsceneSkipStyle get_cutscene_skipstyle();
193 void start_skipping_cutscene();
194 bool check_skip_cutscene_keypress(
int kgn);
195 bool check_skip_cutscene_mclick(
int mbut);
196 void initialize_skippable_cutscene();
197 void stop_fast_forwarding();
199 int __GetLocationType(
int xxx,
int yyy,
int allowHotspot0);
202 void display_switch_out();
204 void display_switch_in();
206 void display_switch_out_suspend();
208 void display_switch_in_resume();
210 void replace_tokens(
const char *srcmes,
char *destm,
size_t maxlen);
211 const char *get_global_message(
int msnum);
212 void get_message_text(
int msnum,
char *buffer,
char giveErr = 1);
216 void game_sprite_updated(
int sprnum,
bool deleted =
false);
218 void precache_view(
int view,
int first_loop = 0,
int last_loop = INT32_MAX,
bool with_sounds =
false);
220 extern void set_loop_counter(
unsigned int new_counter);
Definition: achievements_tables.h:27