mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 01:07:22 +00:00
M4: Remove Remaining Extraneous Extern Declarations in Headers
The remaining extern declarations are required to declare global / directly accessed variables.
This commit is contained in:
parent
e71ee44cb0
commit
d994fd8bd2
@ -28,8 +28,8 @@
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
|
||||
extern void conv_play_curr();
|
||||
extern void conv_resume_curr();
|
||||
void conv_play_curr();
|
||||
void conv_resume_curr();
|
||||
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
@ -49,12 +49,12 @@ enum {
|
||||
|
||||
#define PLAY_BREAK_END { -1, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 }
|
||||
|
||||
extern int32 series_play_with_breaks(const seriesPlayBreak list[], const char *name,
|
||||
int32 series_play_with_breaks(const seriesPlayBreak list[], const char *name,
|
||||
frac16 depth = 0, int32 trigger = NO_TRIGGER, uint32 flags = 0, int32 framerate = 6,
|
||||
int32 scale = 100, int32 x = 0, int32 y = 0);
|
||||
extern void digi_preload_play_breaks(const seriesPlayBreak list[], bool loadAll = false);
|
||||
extern void digi_unload_play_breaks(const seriesPlayBreak list[]);
|
||||
extern void handle_series_play_break(int32 slot);
|
||||
void digi_preload_play_breaks(const seriesPlayBreak list[], bool loadAll = false);
|
||||
void digi_unload_play_breaks(const seriesPlayBreak list[]);
|
||||
void handle_series_play_break(int32 slot);
|
||||
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
@ -33,9 +33,8 @@ struct ReleaseTrigger_Globals {
|
||||
uint32 _check_channels = 0, _match_value = 0;
|
||||
};
|
||||
|
||||
extern void release_trigger_on_digi_state(int32 trigger, int32 checkChannels,
|
||||
int32 matchValue = 0);
|
||||
extern void release_trigger_digi_check();
|
||||
void release_trigger_on_digi_state(int32 trigger, int32 checkChannels, int32 matchValue = 0);
|
||||
void release_trigger_digi_check();
|
||||
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
@ -52,16 +52,16 @@ struct StreamBreak_Globals {
|
||||
machine *_my_stream_viewer = nullptr;
|
||||
};
|
||||
|
||||
extern machine *series_stream_with_breaks(const seriesStreamBreak list[], const char *name, int32 framerate, frac16 depth, int32 trigger);
|
||||
extern void digi_preload_stream_breaks(const seriesStreamBreak list[]);
|
||||
extern void digi_unload_stream_breaks(const seriesStreamBreak list[]);
|
||||
extern void handle_series_stream_break();
|
||||
machine *series_stream_with_breaks(const seriesStreamBreak list[], const char *name, int32 framerate, frac16 depth, int32 trigger);
|
||||
void digi_preload_stream_breaks(const seriesStreamBreak list[]);
|
||||
void digi_unload_stream_breaks(const seriesStreamBreak list[]);
|
||||
void handle_series_stream_break();
|
||||
|
||||
/**
|
||||
* Palette_prep_for_stream is called just before series_stream() for a full screen animation.
|
||||
* It clears the palette, (debug: sets ui colors) and sets up a palette fade up from 0%
|
||||
*/
|
||||
extern void palette_prep_for_stream();
|
||||
void palette_prep_for_stream();
|
||||
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
@ -110,54 +110,53 @@ struct guiMenu {
|
||||
};
|
||||
|
||||
// GENERAL MENU FUNCTIONS
|
||||
extern bool menu_Initialize(RGB8 *myPalette);
|
||||
extern guiMenu *menu_Create(Sprite *backgroundSprite, int32 x1, int32 y1, int32 scrnFlags);
|
||||
extern void menu_Destroy(guiMenu *myMenu);
|
||||
extern void menu_Configure(guiMenu *myMenu, CALLBACK cb_return, CALLBACK cb_esc);
|
||||
extern GrBuff *menu_CopyBackground(guiMenu *myMenu, int32 x, int32 y, int32 w, int32 h);
|
||||
extern menuItem *menu_GetItem(int32 tag, guiMenu *myMenu);
|
||||
extern void menu_ItemDelete(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
extern void menu_ItemRefresh(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
bool menu_Initialize(RGB8 *myPalette);
|
||||
guiMenu *menu_Create(Sprite *backgroundSprite, int32 x1, int32 y1, int32 scrnFlags);
|
||||
void menu_Destroy(guiMenu *myMenu);
|
||||
void menu_Configure(guiMenu *myMenu, CALLBACK cb_return, CALLBACK cb_esc);
|
||||
GrBuff *menu_CopyBackground(guiMenu *myMenu, int32 x, int32 y, int32 w, int32 h);
|
||||
menuItem *menu_GetItem(int32 tag, guiMenu *myMenu);
|
||||
void menu_ItemDelete(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
void menu_ItemRefresh(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
|
||||
// SPECIFIC ITEM FUNCTIONS
|
||||
|
||||
// Messages
|
||||
extern menuItem *menu_MsgAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h,
|
||||
bool transparent = false);
|
||||
extern void menu_DisableMsg(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
extern void menu_EnableMsg(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
menuItem *menu_MsgAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h, bool transparent = false);
|
||||
void menu_DisableMsg(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
void menu_EnableMsg(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
|
||||
// Buttons
|
||||
extern bool button_Handler(void *theItem, int32 eventType, int32 event, int32 x, int32 y, void **currItem);
|
||||
extern menuItem *menu_ButtonAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h, CALLBACK callback = nullptr,
|
||||
bool button_Handler(void *theItem, int32 eventType, int32 event, int32 x, int32 y, void **currItem);
|
||||
menuItem *menu_ButtonAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h, CALLBACK callback = nullptr,
|
||||
int32 buttonType = 0, bool ghosted = false, bool transparent = false,
|
||||
char *prompt = nullptr, ItemHandlerFunction i_handler = button_Handler);
|
||||
extern void menu_DisableButton(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
extern void menu_EnableButton(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
void menu_DisableButton(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
void menu_EnableButton(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
|
||||
// Horizontal sliders
|
||||
extern menuItem *menu_HSliderAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h,
|
||||
menuItem *menu_HSliderAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h,
|
||||
int32 initPercent = 0, CALLBACK callback = nullptr, bool transparent = false);
|
||||
|
||||
// Vertical sliders
|
||||
extern menuItem *menu_VSliderAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h,
|
||||
menuItem *menu_VSliderAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h,
|
||||
int32 initPercent = 0, CALLBACK callback = nullptr, bool transparent = false);
|
||||
extern void menu_DisableVSlider(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
extern void menu_EnableVSlider(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
void menu_DisableVSlider(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
void menu_EnableVSlider(menuItem *myItem, int32 tag, guiMenu *myMenu);
|
||||
|
||||
// Textfields
|
||||
extern menuItem *menu_TextFieldAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h, int32 initFlags,
|
||||
menuItem *menu_TextFieldAdd(guiMenu *myMenu, int32 tag, int32 x, int32 y, int32 w, int32 h, int32 initFlags,
|
||||
char *prompt = nullptr, int32 specialtag = 0, CALLBACK callback = nullptr, bool transparent = false);
|
||||
|
||||
//GAME MENU FUNCTIONS
|
||||
extern void CreateGameMenu(RGB8 *myPalette);
|
||||
extern void CreateOptionsMenu(RGB8 *myPalette);
|
||||
extern void CreateF2SaveMenu(RGB8 *myPalette);
|
||||
extern void CreateF3LoadMenu(RGB8 *myPalette);
|
||||
void CreateGameMenu(RGB8 *myPalette);
|
||||
void CreateOptionsMenu(RGB8 *myPalette);
|
||||
void CreateF2SaveMenu(RGB8 *myPalette);
|
||||
void CreateF3LoadMenu(RGB8 *myPalette);
|
||||
|
||||
//routines used by the main menu
|
||||
extern void CreateLoadMenuFromMain(RGB8 *myPalette);
|
||||
extern void CreateGameMenuFromMain(RGB8 *myPalette);
|
||||
void CreateLoadMenuFromMain(RGB8 *myPalette);
|
||||
void CreateGameMenuFromMain(RGB8 *myPalette);
|
||||
|
||||
|
||||
//======================================
|
||||
@ -508,7 +507,7 @@ struct MenuGlobals {
|
||||
int32 remember_digestability; // For cancelling out of the options menu
|
||||
};
|
||||
|
||||
extern void CreateGameMenuMain(RGB8 *myPalette);
|
||||
void CreateGameMenuMain(RGB8 *myPalette);
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Burger
|
||||
|
@ -100,10 +100,10 @@ struct GizmoItem {
|
||||
GizmoItemFnEvents _fnEvents = nullptr;
|
||||
};
|
||||
|
||||
extern void gizmo_anim(RGB8 *pal);
|
||||
extern void gizmo_initialize(RGB8 *pal);
|
||||
extern void gizmo_shutdown(void *v1 = nullptr, void *v2 = nullptr);
|
||||
extern void gizmo_digi_play(const char *name, int vol, bool &done);
|
||||
void gizmo_anim(RGB8 *pal);
|
||||
void gizmo_initialize(RGB8 *pal);
|
||||
void gizmo_shutdown(void *v1 = nullptr, void *v2 = nullptr);
|
||||
void gizmo_digi_play(const char *name, int vol, bool &done);
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Burger
|
||||
|
@ -26,7 +26,7 @@
|
||||
namespace M4 {
|
||||
namespace Burger {
|
||||
|
||||
extern void other_resurrect_player();
|
||||
void other_resurrect_player();
|
||||
|
||||
} // namespace Burger
|
||||
} // namespace M4
|
||||
|
@ -123,12 +123,12 @@ public:
|
||||
void wilbur_unpoof();
|
||||
};
|
||||
|
||||
extern void enable_player();
|
||||
extern void disable_player();
|
||||
extern void wilbur_abduct(int trigger);
|
||||
extern void player_walk_to(int32 x, int32 y, int32 facing_x, int32 facing_y, int trigger = -1);
|
||||
extern void player_walk_to(int32 x, int32 y, int trigger = -1);
|
||||
extern void wilbur_speech(const char *name, int trigger = -1, int room = -1, byte flags = 0,
|
||||
void enable_player();
|
||||
void disable_player();
|
||||
void wilbur_abduct(int trigger);
|
||||
void player_walk_to(int32 x, int32 y, int32 facing_x, int32 facing_y, int trigger = -1);
|
||||
void player_walk_to(int32 x, int32 y, int trigger = -1);
|
||||
void wilbur_speech(const char *name, int trigger = -1, int room = -1, byte flags = 0,
|
||||
int vol = 256, int channel = 1);
|
||||
|
||||
} // namespace Burger
|
||||
|
@ -51,32 +51,32 @@ public:
|
||||
|
||||
#define STR_PARSE_BUFFER_SIZE 255
|
||||
|
||||
extern bool charIsIn(char ch, char *str);
|
||||
extern int16 char_IsIn(char ch, char *str); //new
|
||||
extern int dtoi(char *string);
|
||||
extern bool stringIsInt(char *str);
|
||||
extern bool stringIsFloat(char *str);
|
||||
bool charIsIn(char ch, char *str);
|
||||
int16 char_IsIn(char ch, char *str); //new
|
||||
int dtoi(char *string);
|
||||
bool stringIsInt(char *str);
|
||||
bool stringIsFloat(char *str);
|
||||
|
||||
extern int16 stringIsIn(char *str, char *strings[]);
|
||||
int16 stringIsIn(char *str, char *strings[]);
|
||||
|
||||
extern int32 cstrlen(const char *s);
|
||||
extern void cstrcpy(char *dest, const char *src);
|
||||
extern void cstrncpy(char *dest, const char *src, const int16 max_len);
|
||||
extern char *cstrupr(char *src);
|
||||
extern char *cstr_lower(char *src);
|
||||
extern int xtoi(char *string);
|
||||
extern int strpos(char *key, char *target);
|
||||
extern void strdel(char *inp, int indx, int count);
|
||||
extern void strseg(char *work, char *work2, int indx, int count);
|
||||
extern void strins(char *work, char *newStr, int indx);
|
||||
extern void str_purge_trailing_spaces(char *myline);
|
||||
extern void str_purge_all_spaces(char *text);
|
||||
extern char *str_strip_final_lf(char *mystring);
|
||||
extern void str_add_final_lf(char *mystring);
|
||||
extern void str_parse_init(char *instring, char delimiter);
|
||||
extern char *str_parse(char *out);
|
||||
int32 cstrlen(const char *s);
|
||||
void cstrcpy(char *dest, const char *src);
|
||||
void cstrncpy(char *dest, const char *src, const int16 max_len);
|
||||
char *cstrupr(char *src);
|
||||
char *cstr_lower(char *src);
|
||||
int xtoi(char *string);
|
||||
int strpos(char *key, char *target);
|
||||
void strdel(char *inp, int indx, int count);
|
||||
void strseg(char *work, char *work2, int indx, int count);
|
||||
void strins(char *work, char *newStr, int indx);
|
||||
void str_purge_trailing_spaces(char *myline);
|
||||
void str_purge_all_spaces(char *text);
|
||||
char *str_strip_final_lf(char *mystring);
|
||||
void str_add_final_lf(char *mystring);
|
||||
void str_parse_init(char *instring, char delimiter);
|
||||
char *str_parse(char *out);
|
||||
|
||||
extern bool cstr_isdigit(char c);
|
||||
bool cstr_isdigit(char c);
|
||||
|
||||
#define strrun(a,b,c) memset(a,b,c)
|
||||
|
||||
|
@ -29,9 +29,9 @@ namespace M4 {
|
||||
#define FL __FILE__,__LINE__
|
||||
#define ERROR_FILE "error.m4"
|
||||
|
||||
extern void error_show(const char *filename, uint32 line, quadchar errorcode, const char *fmt, ...);
|
||||
extern void error_show(const char *filename, uint32 line, quadchar errorcode);
|
||||
extern void error_look_up(quadchar errorcode, char *result_string);
|
||||
void error_show(const char *filename, uint32 line, quadchar errorcode, const char *fmt, ...);
|
||||
void error_show(const char *filename, uint32 line, quadchar errorcode);
|
||||
void error_look_up(quadchar errorcode, char *result_string);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -37,9 +37,9 @@ struct MouseDriverInfo {
|
||||
byte MouseIRQ = 0;
|
||||
};
|
||||
|
||||
extern int mouse_init();
|
||||
extern void mouse_uninstall();
|
||||
extern byte *GetMousePicture();
|
||||
int mouse_init();
|
||||
void mouse_uninstall();
|
||||
byte *GetMousePicture();
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -29,17 +29,17 @@ namespace M4 {
|
||||
/**
|
||||
* Initialize params handler
|
||||
*/
|
||||
extern void param_init();
|
||||
void param_init();
|
||||
|
||||
/**
|
||||
* Shutdown params handler
|
||||
*/
|
||||
extern void param_shutdown();
|
||||
void param_shutdown();
|
||||
|
||||
/**
|
||||
* Parses any flags
|
||||
*/
|
||||
extern void parse_all_flags();
|
||||
void parse_all_flags();
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -60,14 +60,14 @@ struct strmRequest {
|
||||
bool wrapStream;
|
||||
};
|
||||
|
||||
extern bool f_stream_Init();
|
||||
extern void f_stream_Shutdown();
|
||||
bool f_stream_Init();
|
||||
void f_stream_Shutdown();
|
||||
|
||||
extern strmRequest *f_stream_Open(SysFile *srcFile, int32 fileOffset, int32 strmMinBuffSize, int32 strmBuffSize,
|
||||
strmRequest *f_stream_Open(SysFile *srcFile, int32 fileOffset, int32 strmMinBuffSize, int32 strmBuffSize,
|
||||
int32 numBlocksToRead, int32 *blockSizeArray, int32 initialRead, bool wrapStream);
|
||||
extern int32 f_stream_Read(strmRequest *myStream, uint8 **dest, int32 numBytes);
|
||||
extern void f_stream_Close(strmRequest *myStream);
|
||||
extern void f_stream_Process(int32 numToProcess);
|
||||
int32 f_stream_Read(strmRequest *myStream, uint8 **dest, int32 numBytes);
|
||||
void f_stream_Close(strmRequest *myStream);
|
||||
void f_stream_Process(int32 numToProcess);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -29,12 +29,12 @@ namespace M4 {
|
||||
/**
|
||||
* Returns true if a given file exists
|
||||
*/
|
||||
extern bool f_info_exists(const Common::Path &filename);
|
||||
bool f_info_exists(const Common::Path &filename);
|
||||
|
||||
/**
|
||||
* Returns the size of a given file
|
||||
*/
|
||||
extern size_t f_info_get_file_size(const Common::Path &filename);
|
||||
size_t f_info_get_file_size(const Common::Path &filename);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -129,8 +129,8 @@ public:
|
||||
void close();
|
||||
};
|
||||
|
||||
extern void sysfile_init(bool in_hag_mode);
|
||||
extern void sysfile_shutdown();
|
||||
void sysfile_init(bool in_hag_mode);
|
||||
void sysfile_shutdown();
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -58,10 +58,10 @@ public:
|
||||
void refresh_video(int32 scrnX, int32 scrnY, int32 x1, int32 y1, int32 x2, int32 y2);
|
||||
};
|
||||
|
||||
extern int32 gr_buffer_free(Buffer *buf);
|
||||
extern byte *gr_buffer_pointer(Buffer *buf, int32 x, int32 y);
|
||||
extern const byte *gr_buffer_pointer(const Buffer *buf, int32 x, int32 y);
|
||||
extern int32 gr_buffer_init(Buffer *buf, const char *name, int32 w, int32 h);
|
||||
int32 gr_buffer_free(Buffer *buf);
|
||||
byte *gr_buffer_pointer(Buffer *buf, int32 x, int32 y);
|
||||
const byte *gr_buffer_pointer(const Buffer *buf, int32 x, int32 y);
|
||||
int32 gr_buffer_init(Buffer *buf, const char *name, int32 w, int32 h);
|
||||
|
||||
/**
|
||||
* Copies a "rectangular" buffer area from "from" to "unto". Size
|
||||
@ -72,7 +72,7 @@ extern int32 gr_buffer_init(Buffer *buf, const char *name, int32 w, int32 h);
|
||||
* buffers, buf_rect_copy() can be used instead).
|
||||
* @returns Returns true if successful.
|
||||
*/
|
||||
extern bool gr_buffer_rect_copy_2(const Buffer *from, Buffer *to, int32 sx, int32 sy,
|
||||
bool gr_buffer_rect_copy_2(const Buffer *from, Buffer *to, int32 sx, int32 sy,
|
||||
int32 dx, int32 dy, int32 w, int32 h);
|
||||
|
||||
/**
|
||||
@ -83,7 +83,7 @@ extern bool gr_buffer_rect_copy_2(const Buffer *from, Buffer *to, int32 sx, int3
|
||||
* buf_rect_copy_2 ().
|
||||
* @returns Returns true if successful.
|
||||
*/
|
||||
extern bool gr_buffer_rect_copy(Buffer *from, Buffer *to, int32 x, int32 y, int32 w, int32 h);
|
||||
bool gr_buffer_rect_copy(Buffer *from, Buffer *to, int32 x, int32 y, int32 w, int32 h);
|
||||
|
||||
/**
|
||||
* Fills a rectangular buffer area with the specified byte value.
|
||||
@ -91,9 +91,9 @@ extern bool gr_buffer_rect_copy(Buffer *from, Buffer *to, int32 x, int32 y, int3
|
||||
* determined by "size_x, size_y."
|
||||
* @returns Returns true if successful; false if buffer invalid.
|
||||
*/
|
||||
extern int32 gr_buffer_rect_fill(Buffer *target, int32 x1, int32 y1, int32 w, int32 h);
|
||||
int32 gr_buffer_rect_fill(Buffer *target, int32 x1, int32 y1, int32 w, int32 h);
|
||||
|
||||
extern void GrBuff_Show(void *s, void *r, void *b, int32 destX, int32 destY);
|
||||
void GrBuff_Show(void *s, void *r, void *b, int32 destX, int32 destY);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -29,28 +29,28 @@ namespace M4 {
|
||||
/**
|
||||
* Given X, Y sets the value of the pixel at that position
|
||||
*/
|
||||
extern void buffer_put_pixel(Buffer *buf, int32 x, int32 y, byte c);
|
||||
void buffer_put_pixel(Buffer *buf, int32 x, int32 y, byte c);
|
||||
|
||||
/**
|
||||
* Given X, Y returns value of pixel at that address on the screen
|
||||
*/
|
||||
extern byte buffer_get_pixel(Buffer *buf, int32 x, int32 y);
|
||||
byte buffer_get_pixel(Buffer *buf, int32 x, int32 y);
|
||||
|
||||
/**
|
||||
* Draws outside edge of retangle given home and size along both axis
|
||||
*/
|
||||
extern void buffer_draw_box(Buffer *buf, int32 x1, int32 y1, int32 x2, int32 y2, byte color);
|
||||
void buffer_draw_box(Buffer *buf, int32 x1, int32 y1, int32 x2, int32 y2, byte color);
|
||||
|
||||
/**
|
||||
* Draws a rectangle using xor
|
||||
*/
|
||||
extern void buffer_draw_box_xor(Buffer *buf, int32 x1, int32 y1, int32 x2, int32 y2);
|
||||
void buffer_draw_box_xor(Buffer *buf, int32 x1, int32 y1, int32 x2, int32 y2);
|
||||
|
||||
/**
|
||||
* Fills an entire buffer with a single byte value.
|
||||
* @returns Returns True if successful, FALSE if buffer invalid.
|
||||
*/
|
||||
extern int32 buffer_fill(Buffer *target, byte value);
|
||||
int32 buffer_fill(Buffer *target, byte value);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -54,7 +54,7 @@ int32 gr_font_string_width(const Common::String &str, int32 auto_spacing = 1);
|
||||
//Font *gr_font_file_read(const char *fontName);
|
||||
Font *gr_font_load(const char *fontName);
|
||||
|
||||
extern void font_set_colors(uint8 alt1, uint8 alt2, uint8 foreground);
|
||||
void font_set_colors(uint8 alt1, uint8 alt2, uint8 foreground);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -30,16 +30,16 @@ namespace M4 {
|
||||
* Given starting and ending points on the Y axis, and the constant
|
||||
* X value, draws a line in the set color in the specified buffer
|
||||
*/
|
||||
extern void gr_hline(Buffer *buf, int32 x1, int32 x2, int32 y);
|
||||
void gr_hline(Buffer *buf, int32 x1, int32 x2, int32 y);
|
||||
|
||||
/**
|
||||
* Given starting and ending points on the Y axis, and the constant
|
||||
* X value, draws a line in the given color on the live MCGA screen.
|
||||
*/
|
||||
extern void gr_vline(Buffer *buf, int32 x, int32 y1, int32 y2);
|
||||
extern void gr_hline_xor(Buffer *buf, int32 x1, int32 x2, int32 y);
|
||||
extern void gr_vline_xor(Buffer *buf, int32 x, int32 y1, int32 y2);
|
||||
extern void gr_line(int32 x1, int32 y1, int32 x2, int32 y2, int32 color, Buffer *screen);
|
||||
void gr_vline(Buffer *buf, int32 x, int32 y1, int32 y2);
|
||||
void gr_hline_xor(Buffer *buf, int32 x1, int32 x2, int32 y);
|
||||
void gr_vline_xor(Buffer *buf, int32 x, int32 y1, int32 y2);
|
||||
void gr_line(int32 x1, int32 y1, int32 x2, int32 y2, int32 color, Buffer *screen);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -46,28 +46,28 @@ constexpr int MAX_PAL_ENTRY = 255;
|
||||
#define __YELLOW (gr_pal_get_ega_color(14))
|
||||
#define __WHITE (gr_pal_get_ega_color(15))
|
||||
|
||||
extern uint8 gr_pal_get_ega_color(uint8 myColor);
|
||||
uint8 gr_pal_get_ega_color(uint8 myColor);
|
||||
|
||||
extern void gr_color_create_ipl5(uint8 *inverseColorTable, char *fname, int room_num);
|
||||
extern uint8 *gr_color_load_ipl5(const char *filename, uint8 *inverseColors);
|
||||
extern void gr_color_set(int32 c);
|
||||
extern byte gr_color_get_current();
|
||||
void gr_color_create_ipl5(uint8 *inverseColorTable, char *fname, int room_num);
|
||||
uint8 *gr_color_load_ipl5(const char *filename, uint8 *inverseColors);
|
||||
void gr_color_set(int32 c);
|
||||
byte gr_color_get_current();
|
||||
|
||||
extern void gr_pal_set_range(RGB8 *pal, int first_color, int num_colors);
|
||||
extern void gr_pal_set_range(int first_color, int num_colors);
|
||||
extern void gr_pal_set(RGB8 *pal);
|
||||
extern void gr_pal_set_RGB8(RGB8 *entry, int r, int g, int b);
|
||||
extern void gr_pal_set_entry(int32 index, RGB8 *entry);
|
||||
extern void gr_pal_clear(RGB8 *palette);
|
||||
extern void gr_pal_clear_range(RGB8 *palette, int first_color, int last_color);
|
||||
extern uint8 gr_pal_find_best_match(RGB8 *pal, uint8 r, uint8 g, uint8 b);
|
||||
extern void gr_pal_interface(RGB8 *fixpal);
|
||||
extern void gr_pal_reset_ega_colors(RGB8 *pal);
|
||||
extern void gr_backup_palette();
|
||||
extern void gr_restore_palette();
|
||||
void gr_pal_set_range(RGB8 *pal, int first_color, int num_colors);
|
||||
void gr_pal_set_range(int first_color, int num_colors);
|
||||
void gr_pal_set(RGB8 *pal);
|
||||
void gr_pal_set_RGB8(RGB8 *entry, int r, int g, int b);
|
||||
void gr_pal_set_entry(int32 index, RGB8 *entry);
|
||||
void gr_pal_clear(RGB8 *palette);
|
||||
void gr_pal_clear_range(RGB8 *palette, int first_color, int last_color);
|
||||
uint8 gr_pal_find_best_match(RGB8 *pal, uint8 r, uint8 g, uint8 b);
|
||||
void gr_pal_interface(RGB8 *fixpal);
|
||||
void gr_pal_reset_ega_colors(RGB8 *pal);
|
||||
void gr_backup_palette();
|
||||
void gr_restore_palette();
|
||||
|
||||
extern void pal_mirror_colours(int first_color, int last_color, RGB8 *pal);
|
||||
extern void pal_mirror_colours(int first_color, int last_color);
|
||||
void pal_mirror_colours(int first_color, int last_color, RGB8 *pal);
|
||||
void pal_mirror_colours(int first_color, int last_color);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -89,32 +89,32 @@ struct Series {
|
||||
int32 x = 0, int32 y = 0);
|
||||
};
|
||||
|
||||
extern int32 series_load(const char *seriesName, int32 assetIndex = -1, RGB8 *myPal = nullptr);
|
||||
extern void series_unload(int32 assetIndex);
|
||||
extern bool series_draw_sprite(int32 spriteHash, int32 index, Buffer *destBuff, int32 x, int32 y);
|
||||
int32 series_load(const char *seriesName, int32 assetIndex = -1, RGB8 *myPal = nullptr);
|
||||
void series_unload(int32 assetIndex);
|
||||
bool series_draw_sprite(int32 spriteHash, int32 index, Buffer *destBuff, int32 x, int32 y);
|
||||
|
||||
extern bool series_show_frame(int32 spriteHash, int32 index, Buffer *destBuff, int32 x, int32 y);
|
||||
//extern machine *series_place_sprite(const char *seriesName, int32 index, int32 x, int32 y, int32 s, int32 layer); // was series_show_sprite
|
||||
//extern machine *series_show_sprite(const char *seriesName, int32 index, int32 layer); // was simple_show_sprite
|
||||
bool series_show_frame(int32 spriteHash, int32 index, Buffer *destBuff, int32 x, int32 y);
|
||||
//machine *series_place_sprite(const char *seriesName, int32 index, int32 x, int32 y, int32 s, int32 layer); // was series_show_sprite
|
||||
//machine *series_show_sprite(const char *seriesName, int32 index, int32 layer); // was simple_show_sprite
|
||||
|
||||
extern machine *series_play(const char *seriesName, frac16 layer, uint32 flags = 0,
|
||||
machine *series_play(const char *seriesName, frac16 layer, uint32 flags = 0,
|
||||
int16 triggerNum = -1, int32 frameRate = 6, int32 loopCount = 0, int32 s = 100,
|
||||
int32 x = 0, int32 y = 0, int32 firstFrame = 0, int32 lastFrame = -1);
|
||||
//extern machine *series_simple_play(char *seriesName, frac16 layer, bool stick_when_done);
|
||||
//machine *series_simple_play(char *seriesName, frac16 layer, bool stick_when_done);
|
||||
|
||||
extern machine *series_show(const char *seriesName, frac16 layer, uint32 flags = 0,
|
||||
machine *series_show(const char *seriesName, frac16 layer, uint32 flags = 0,
|
||||
int16 triggerNum = -1, int32 duration = -1, int32 index = 0, int32 s = 100,
|
||||
int32 x = 0, int32 y = 0);
|
||||
|
||||
extern machine *series_ranged_play(const char *seriesName, int32 loopCount, uint32 flags,
|
||||
machine *series_ranged_play(const char *seriesName, int32 loopCount, uint32 flags,
|
||||
int32 firstFrame, int32 lastFrame, int32 s, uint32 layer,
|
||||
int32 frameRate, int32 trigger = -1, bool stick_when_done = false);
|
||||
extern machine *series_plain_play(const char *seriesName, int32 loopCount, uint32 flags,
|
||||
machine *series_plain_play(const char *seriesName, int32 loopCount, uint32 flags,
|
||||
int32 s, int32 layer, int32 frameRate, int32 trigger = -1, bool stickWhenDone = false);
|
||||
|
||||
extern machine *series_stream(const char *seriesName, int32 frameRate, int32 layer, int32 trigger);
|
||||
extern bool series_stream_break_on_frame(machine *m, int32 frameNum, int32 trigger);
|
||||
extern void series_set_frame_rate(machine *m, int32 newFrameRate);
|
||||
machine *series_stream(const char *seriesName, int32 frameRate, int32 layer, int32 trigger);
|
||||
bool series_stream_break_on_frame(machine *m, int32 frameNum, int32 trigger);
|
||||
void series_set_frame_rate(machine *m, int32 newFrameRate);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -47,9 +47,9 @@ struct DrawRequest {
|
||||
};
|
||||
|
||||
|
||||
extern uint32 gr_sprite_RLE8_encode(Buffer *Source, Buffer *Dest);
|
||||
extern uint8 gr_sprite_draw(DrawRequest *DrawReq);
|
||||
extern void gr_sprite_draw_scaled(M4sprite *srcSprite, Buffer *destBuf, int32 destX, int32 destY, int32 scale);
|
||||
uint32 gr_sprite_RLE8_encode(Buffer *Source, Buffer *Dest);
|
||||
uint8 gr_sprite_draw(DrawRequest *DrawReq);
|
||||
void gr_sprite_draw_scaled(M4sprite *srcSprite, Buffer *destBuf, int32 destX, int32 destY, int32 scale);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -83,54 +83,54 @@ struct KernelPal_Globals {
|
||||
bool _greyVideoMode = false;
|
||||
};
|
||||
|
||||
extern void pal_fade_set_start(RGB8 *origPalette, int32 percent);
|
||||
extern void pal_fade_set_start(int32 percent);
|
||||
extern void pal_fade_init(RGB8 *origPalette, int32 firstPalEntry, int32 lastPalEntry, int32 targetPercent, int32 numTicks, int32 triggerNum);
|
||||
extern void pal_fade_init(int32 firstPalEntry, int32 lastPalEntry, int32 targetPercent, int32 numTicks, int32 triggerNum);
|
||||
void pal_fade_set_start(RGB8 *origPalette, int32 percent);
|
||||
void pal_fade_set_start(int32 percent);
|
||||
void pal_fade_init(RGB8 *origPalette, int32 firstPalEntry, int32 lastPalEntry, int32 targetPercent, int32 numTicks, int32 triggerNum);
|
||||
void pal_fade_init(int32 firstPalEntry, int32 lastPalEntry, int32 targetPercent, int32 numTicks, int32 triggerNum);
|
||||
|
||||
extern void disable_player_commands_and_fade_init(int trigger);
|
||||
extern void pal_cycle_init(int32 firstPalEntry, int32 lastPalEntry, int32 delayTicks,
|
||||
void disable_player_commands_and_fade_init(int trigger);
|
||||
void pal_cycle_init(int32 firstPalEntry, int32 lastPalEntry, int32 delayTicks,
|
||||
int32 totalTicks = -1, int32 triggerNum = -1);
|
||||
|
||||
/**
|
||||
* Returns true if color cycling is on
|
||||
*/
|
||||
extern bool pal_cycle_active();
|
||||
bool pal_cycle_active();
|
||||
|
||||
/**
|
||||
* Stops color cycling
|
||||
*/
|
||||
extern void pal_cycle_stop();
|
||||
void pal_cycle_stop();
|
||||
|
||||
/**
|
||||
* Starts color cycling
|
||||
*/
|
||||
extern void pal_cycle_resume();
|
||||
void pal_cycle_resume();
|
||||
|
||||
/**
|
||||
* Handles fading and cycling
|
||||
*/
|
||||
extern void pal_fx_update();
|
||||
void pal_fx_update();
|
||||
|
||||
/**
|
||||
* This is used to effect the screen colours (not the master palette) temporarily
|
||||
* until something else updates the DAC e.g. refresh_DAC()
|
||||
*/
|
||||
extern void DAC_tint_range(const RGB8 *tintColor, int32 percent, int32 firstPalEntry, int32 lastPalEntry, bool transparent);
|
||||
void DAC_tint_range(const RGB8 *tintColor, int32 percent, int32 firstPalEntry, int32 lastPalEntry, bool transparent);
|
||||
|
||||
extern void kernel_unexamine_inventory_object(RGB8 *pal, int steps, int delay);
|
||||
void kernel_unexamine_inventory_object(RGB8 *pal, int steps, int delay);
|
||||
|
||||
extern void remap_buffer_with_luminance_map(Buffer *src, int32 x1, int32 y1, int32 x2, int32 y2);
|
||||
extern void krn_SetGreyVideoMode(int32 grey_x1, int32 grey_y1, int32 grey_x2, int32 grey_y2, int32 color_x1, int32 color_y1, int32 color_x2, int32 color_y2);
|
||||
extern void krn_UnsetGreyVideoMode(void);
|
||||
extern bool krn_GetGreyMode(void);
|
||||
extern void krn_UpdateGreyArea(Buffer *greyOutThisBuffer, int32 scrnX, int32 scrnY,
|
||||
void remap_buffer_with_luminance_map(Buffer *src, int32 x1, int32 y1, int32 x2, int32 y2);
|
||||
void krn_SetGreyVideoMode(int32 grey_x1, int32 grey_y1, int32 grey_x2, int32 grey_y2, int32 color_x1, int32 color_y1, int32 color_x2, int32 color_y2);
|
||||
void krn_UnsetGreyVideoMode(void);
|
||||
bool krn_GetGreyMode(void);
|
||||
void krn_UpdateGreyArea(Buffer *greyOutThisBuffer, int32 scrnX, int32 scrnY,
|
||||
int32 greyX1, int32 greyY1, int32 greyX2, int32 greyY2);
|
||||
extern void krn_ChangeBufferLuminance(Buffer *target, int32 percent);
|
||||
void krn_ChangeBufferLuminance(Buffer *target, int32 percent);
|
||||
|
||||
extern void krn_pal_game_task();
|
||||
extern void krn_fade_from_grey(RGB8 *pal, int32 steps, int32 delay, int32 fadeType);
|
||||
extern void krn_fade_to_grey(RGB8 *pal, int32 steps, int32 delay);
|
||||
void krn_pal_game_task();
|
||||
void krn_fade_from_grey(RGB8 *pal, int32 steps, int32 delay, int32 fadeType);
|
||||
void krn_fade_to_grey(RGB8 *pal, int32 steps, int32 delay);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -79,8 +79,8 @@ struct Rend_Globals {
|
||||
RGBcolor *_Palette;
|
||||
};
|
||||
|
||||
extern void GetUpdateRectangle(int32 x, int32 y, int32 hot_x, int32 hot_y, int32 scale_x, int32 scale_y, int32 Width, int32 Height, M4Rect *UpdateRect);
|
||||
extern void render_sprite_to_8BBM(RendGrBuff *Destination, DrawRequestX *dr, RendCell *Frame, M4Rect *ClipRectangle, M4Rect *UpdateRect);
|
||||
void GetUpdateRectangle(int32 x, int32 y, int32 hot_x, int32 hot_y, int32 scale_x, int32 scale_y, int32 Width, int32 Height, M4Rect *UpdateRect);
|
||||
void render_sprite_to_8BBM(RendGrBuff *Destination, DrawRequestX *dr, RendCell *Frame, M4Rect *ClipRectangle, M4Rect *UpdateRect);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -29,27 +29,27 @@ namespace M4 {
|
||||
/**
|
||||
* Initialize the memory manager.
|
||||
*/
|
||||
extern void mem_stash_init(int16 num_types);
|
||||
void mem_stash_init(int16 num_types);
|
||||
|
||||
/**
|
||||
* Purges the memory manager
|
||||
*/
|
||||
extern void mem_stash_shutdown();
|
||||
void mem_stash_shutdown();
|
||||
|
||||
extern bool mem_register_stash_type(int32 *memType, int32 size, int32 numRequests, const Common::String &name);
|
||||
bool mem_register_stash_type(int32 *memType, int32 size, int32 numRequests, const Common::String &name);
|
||||
|
||||
/**
|
||||
* To free a memory block whose size has been previously registered.
|
||||
* @param myMem The pointer to be freed
|
||||
*/
|
||||
extern void mem_free_to_stash(void *myMem, int32 memType);
|
||||
void mem_free_to_stash(void *myMem, int32 memType);
|
||||
|
||||
/**
|
||||
* Deliver a memory block whose size has been previously registered.
|
||||
*/
|
||||
extern void *mem_get_from_stash(int32 memType, const Common::String &name);
|
||||
void *mem_get_from_stash(int32 memType, const Common::String &name);
|
||||
|
||||
extern char *mem_strdup(const char *str);
|
||||
char *mem_strdup(const char *str);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -39,11 +39,11 @@ inline bool MakeMem(size_t FreeBlockNeeded, const char *) {
|
||||
return true;
|
||||
}
|
||||
|
||||
extern MemHandle MakeNewHandle(size_t size, const Common::String &);
|
||||
extern bool mem_ReallocateHandle(MemHandle h, size_t size, const Common::String &name);
|
||||
extern MemHandle NewHandle(size_t size, const Common::String &);
|
||||
extern void DisposeHandle(MemHandle handle);
|
||||
extern uint32 MaxMem(Size *growBytes);
|
||||
MemHandle MakeNewHandle(size_t size, const Common::String &);
|
||||
bool mem_ReallocateHandle(MemHandle h, size_t size, const Common::String &name);
|
||||
MemHandle NewHandle(size_t size, const Common::String &);
|
||||
void DisposeHandle(MemHandle handle);
|
||||
uint32 MaxMem(Size *growBytes);
|
||||
|
||||
inline void PurgeMem() {}
|
||||
inline void CompactMem() {}
|
||||
|
@ -54,8 +54,8 @@ public:
|
||||
void rtoss(const Common::String &resourceName);
|
||||
};
|
||||
|
||||
extern MemHandle rget(const Common::String &resourceName, int32 *ResourceSize);
|
||||
extern void rtoss(const Common::String &resourceName);
|
||||
MemHandle rget(const Common::String &resourceName, int32 *ResourceSize);
|
||||
void rtoss(const Common::String &resourceName);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -29,12 +29,12 @@ namespace M4 {
|
||||
/**
|
||||
* Decode an 8BPP RLE encoded image
|
||||
*/
|
||||
extern void RLE8Decode(const uint8 *inBuff, uint8 *outBuff, uint32 pitch);
|
||||
void RLE8Decode(const uint8 *inBuff, uint8 *outBuff, uint32 pitch);
|
||||
|
||||
/**
|
||||
* Given RLE data, skips over a given number of encoded lines
|
||||
*/
|
||||
extern uint8 *SkipRLE_Lines(uint32 linesToSkip, uint8 *rleData);
|
||||
uint8 *SkipRLE_Lines(uint32 linesToSkip, uint8 *rleData);
|
||||
|
||||
/**
|
||||
* Returns the size of an RLE encoded image
|
||||
@ -42,7 +42,7 @@ extern uint8 *SkipRLE_Lines(uint32 linesToSkip, uint8 *rleData);
|
||||
* @param pitch Image pitch
|
||||
* @returns Decoded image's size in bytes
|
||||
*/
|
||||
extern size_t RLE8Decode_Size(byte *src, int pitch);
|
||||
size_t RLE8Decode_Size(byte *src, int pitch);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -133,8 +133,8 @@ public:
|
||||
|
||||
extern Events *g_events;
|
||||
|
||||
extern MouseEvent mouse_get_event();
|
||||
extern bool util_kbd_check(int32 *parm1);
|
||||
MouseEvent mouse_get_event();
|
||||
bool util_kbd_check(int32 *parm1);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -104,19 +104,19 @@ public:
|
||||
|
||||
} // namespace Sound
|
||||
|
||||
extern bool digi_preload(const Common::String &name, int roomNum = -1);
|
||||
extern void digi_unload(const Common::String &name);
|
||||
extern int32 digi_play(const char *name, uint channel, int32 vol = 255,
|
||||
bool digi_preload(const Common::String &name, int roomNum = -1);
|
||||
void digi_unload(const Common::String &name);
|
||||
int32 digi_play(const char *name, uint channel, int32 vol = 255,
|
||||
int32 trigger = -1, int32 room_num = -1);
|
||||
extern int32 digi_play_loop(const char *name, uint channel, int32 vol = 255,
|
||||
int32 digi_play_loop(const char *name, uint channel, int32 vol = 255,
|
||||
int32 trigger = -1, int32 room_num = -1);
|
||||
extern void digi_read_another_chunk();
|
||||
extern void digi_stop(int channel);
|
||||
extern bool digi_play_state(int channel);
|
||||
extern void digi_change_volume(int channel, int vol);
|
||||
extern void digi_set_overall_volume(int vol);
|
||||
extern int digi_get_overall_volume();
|
||||
extern int32 digi_ticks_to_play(const char *name, int roomNum = -1);
|
||||
void digi_read_another_chunk();
|
||||
void digi_stop(int channel);
|
||||
bool digi_play_state(int channel);
|
||||
void digi_change_volume(int channel, int vol);
|
||||
void digi_set_overall_volume(int vol);
|
||||
int digi_get_overall_volume();
|
||||
int32 digi_ticks_to_play(const char *name, int roomNum = -1);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -38,9 +38,9 @@ public:
|
||||
|
||||
} // namespace Sound
|
||||
|
||||
extern void midi_loop();
|
||||
extern void midi_stop();
|
||||
extern void midi_set_overall_volume(int vol);
|
||||
void midi_loop();
|
||||
void midi_stop();
|
||||
void midi_set_overall_volume(int vol);
|
||||
|
||||
} // namespace M4
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace M4 {
|
||||
/**
|
||||
* Gets some information about a tt file
|
||||
*/
|
||||
extern void tt_read_header(SysFile *ifp, int32 *file_x, int32 *file_y,
|
||||
void tt_read_header(SysFile *ifp, int32 *file_x, int32 *file_y,
|
||||
int32 *num_x_tiles, int32 *num_y_tiles, int32 *tile_x, int32 *tile_y, RGB8 *pal);
|
||||
|
||||
/**
|
||||
@ -39,7 +39,7 @@ extern void tt_read_header(SysFile *ifp, int32 *file_x, int32 *file_y,
|
||||
* If an error occurs, out.x contains the error number while out.y is zero,
|
||||
* and out.data is nullptr.
|
||||
*/
|
||||
extern Buffer *tt_read(SysFile *ifp, int index, int32 tile_x, int32 tile_y);
|
||||
Buffer *tt_read(SysFile *ifp, int index, int32 tile_x, int32 tile_y);
|
||||
|
||||
} // End of namespace M4
|
||||
|
||||
|
@ -27,10 +27,10 @@
|
||||
|
||||
namespace M4 {
|
||||
|
||||
extern uint32 timer_read();
|
||||
extern uint32 timer_read_dos();
|
||||
extern uint32 timer_read_600();
|
||||
extern uint32 timer_read_60();
|
||||
uint32 timer_read();
|
||||
uint32 timer_read_dos();
|
||||
uint32 timer_read_600();
|
||||
uint32 timer_read_60();
|
||||
|
||||
} // End of namespace M4
|
||||
|
||||
|
@ -46,11 +46,11 @@ public:
|
||||
static void unloadSprites();
|
||||
};
|
||||
|
||||
extern void enable_player();
|
||||
extern void disable_player();
|
||||
extern void wilbur_abduct(int trigger);
|
||||
extern void player_walk_to(int32 x, int32 y, int32 facing_x, int32 facing_y, int trigger = -1);
|
||||
extern void player_walk_to(int32 x, int32 y, int trigger = -1);
|
||||
void enable_player();
|
||||
void disable_player();
|
||||
void wilbur_abduct(int trigger);
|
||||
void player_walk_to(int32 x, int32 y, int32 facing_x, int32 facing_y, int trigger = -1);
|
||||
void player_walk_to(int32 x, int32 y, int trigger = -1);
|
||||
|
||||
} // namespace Riddle
|
||||
} // namespace M4
|
||||
|
@ -101,24 +101,24 @@ struct WSCruncher_Globals {
|
||||
int32 _pcOffsetOld = 0;
|
||||
};
|
||||
|
||||
extern int32 *ws_GetDataFormats();
|
||||
extern bool ws_InitCruncher();
|
||||
extern void ws_KillCruncher();
|
||||
int32 *ws_GetDataFormats();
|
||||
bool ws_InitCruncher();
|
||||
void ws_KillCruncher();
|
||||
|
||||
extern Anim8 *ws_AddAnim8ToCruncher(machine *m, int32 sequHash);
|
||||
Anim8 *ws_AddAnim8ToCruncher(machine *m, int32 sequHash);
|
||||
|
||||
/**
|
||||
* This procedure assumes a machine has a slot with it's own memory
|
||||
*/
|
||||
extern bool ws_ChangeAnim8Program(machine *m, int32 newSequHash);
|
||||
bool ws_ChangeAnim8Program(machine *m, int32 newSequHash);
|
||||
|
||||
/**
|
||||
* This procedure flags the anim8 slot as empty
|
||||
*/
|
||||
extern void ws_RemoveAnim8FromCruncher(Anim8 *myAnim8);
|
||||
void ws_RemoveAnim8FromCruncher(Anim8 *myAnim8);
|
||||
|
||||
extern bool ws_PauseAnim8(Anim8 *myAnim8);
|
||||
extern bool ws_ResumeAnim8(Anim8 *myAnim8);
|
||||
bool ws_PauseAnim8(Anim8 *myAnim8);
|
||||
bool ws_ResumeAnim8(Anim8 *myAnim8);
|
||||
|
||||
/**
|
||||
* Pre-processes a pcode instruction parameters.
|
||||
@ -128,12 +128,12 @@ extern bool ws_ResumeAnim8(Anim8 *myAnim8);
|
||||
* Frac16 *myArg2
|
||||
* Frac16 *myArg3
|
||||
*/
|
||||
extern int32 ws_PreProcessPcode(uint32 **PC, Anim8 *myAnim8);
|
||||
int32 ws_PreProcessPcode(uint32 **PC, Anim8 *myAnim8);
|
||||
|
||||
extern void ws_CrunchAnim8s(int16 *depth_table);
|
||||
extern void ws_CrunchEOSreqs();
|
||||
extern bool ws_OnEndSeqRequest(Anim8 *myAnim8, int32 pcOffset, int32 pcCount);
|
||||
extern void ws_CancelOnEndSeq(Anim8 *myAnim8);
|
||||
void ws_CrunchAnim8s(int16 *depth_table);
|
||||
void ws_CrunchEOSreqs();
|
||||
bool ws_OnEndSeqRequest(Anim8 *myAnim8, int32 pcOffset, int32 pcCount);
|
||||
void ws_CancelOnEndSeq(Anim8 *myAnim8);
|
||||
|
||||
} // End of namespace M4
|
||||
|
||||
|
@ -44,28 +44,28 @@ struct WSHal_Globals {
|
||||
RectList *_deadRectList = nullptr;
|
||||
};
|
||||
|
||||
extern bool ws_InitHAL();
|
||||
extern void ws_KillHAL();
|
||||
bool ws_InitHAL();
|
||||
void ws_KillHAL();
|
||||
|
||||
extern void ws_DoDisplay(Buffer *background, int16 *depth_table, Buffer *screenCodeBuff,
|
||||
void ws_DoDisplay(Buffer *background, int16 *depth_table, Buffer *screenCodeBuff,
|
||||
uint8 *myPalette, uint8 *ICT, bool updateVideo);
|
||||
extern void ws_hal_RefreshWoodscriptBuffer(cruncher *myCruncher, Buffer *background,
|
||||
void ws_hal_RefreshWoodscriptBuffer(cruncher *myCruncher, Buffer *background,
|
||||
int16 *depth_table, Buffer *screenCodes, uint8 *myPalette, uint8 *ICT);
|
||||
extern void GetBezCoeffs(frac16 *ctrlPoints, frac16 *coeffs);
|
||||
extern void GetBezPoint(frac16 *x, frac16 *y, frac16 *coeffs, frac16 tVal);
|
||||
extern bool InitCCB(CCB *myCCB);
|
||||
extern void HideCCB(CCB *myCCB);
|
||||
extern void ShowCCB(CCB *myCCB);
|
||||
//extern void SetLastCCB(CCB *myCCB);
|
||||
extern void MoveCCB(CCB *myCCB, frac16 deltaX, frac16 deltaY);
|
||||
extern void KillCCB(CCB *myCCB, bool restoreFlag);
|
||||
extern void Cel_msr(Anim8 *myAnim8);
|
||||
extern void ws_OverrideCrunchTime(machine *m);
|
||||
void GetBezCoeffs(frac16 *ctrlPoints, frac16 *coeffs);
|
||||
void GetBezPoint(frac16 *x, frac16 *y, frac16 *coeffs, frac16 tVal);
|
||||
bool InitCCB(CCB *myCCB);
|
||||
void HideCCB(CCB *myCCB);
|
||||
void ShowCCB(CCB *myCCB);
|
||||
//void SetLastCCB(CCB *myCCB);
|
||||
void MoveCCB(CCB *myCCB, frac16 deltaX, frac16 deltaY);
|
||||
void KillCCB(CCB *myCCB, bool restoreFlag);
|
||||
void Cel_msr(Anim8 *myAnim8);
|
||||
void ws_OverrideCrunchTime(machine *m);
|
||||
|
||||
extern bool CheckAddr();
|
||||
extern void ws_Error(machine *m, int32 errorType, quadchar errorCode, const char *errMsg);
|
||||
extern void ws_DumpMachine(machine *m);
|
||||
extern void ws_LogErrorMsg(const char *sourceFile, uint32 lineNum, const char *fmt, ...);
|
||||
bool CheckAddr();
|
||||
void ws_Error(machine *m, int32 errorType, quadchar errorCode, const char *errMsg);
|
||||
void ws_DumpMachine(machine *m);
|
||||
void ws_LogErrorMsg(const char *sourceFile, uint32 lineNum, const char *fmt, ...);
|
||||
|
||||
} // End of namespace M4
|
||||
|
||||
|
@ -77,36 +77,36 @@ struct WSLoad_Globals {
|
||||
int32 *_globalCELSPaloffsets = nullptr;
|
||||
};
|
||||
|
||||
extern bool InitWSAssets();
|
||||
extern bool ClearWSAssets(uint32 assetType, int32 minHash, int32 maxHash);
|
||||
extern void ShutdownWSAssets();
|
||||
bool InitWSAssets();
|
||||
bool ClearWSAssets(uint32 assetType, int32 minHash, int32 maxHash);
|
||||
void ShutdownWSAssets();
|
||||
|
||||
extern bool LoadWSAssets(const char *wsAssetName, RGB8 *myPalette);
|
||||
extern int32 AddWSAssetCELS(const char *wsAssetName, int32 hash, RGB8 *myPalette);
|
||||
extern M4sprite *GetWSAssetSprite(char *spriteName, uint32 hash, uint32 index, M4sprite *mySprite, bool *streamSeries);
|
||||
bool LoadWSAssets(const char *wsAssetName, RGB8 *myPalette);
|
||||
int32 AddWSAssetCELS(const char *wsAssetName, int32 hash, RGB8 *myPalette);
|
||||
M4sprite *GetWSAssetSprite(char *spriteName, uint32 hash, uint32 index, M4sprite *mySprite, bool *streamSeries);
|
||||
|
||||
extern CCB *GetWSAssetCEL(uint32 hash, uint32 index, CCB *myCCB);
|
||||
extern int32 GetWSAssetCELCount(uint32 hash);
|
||||
extern int32 GetWSAssetCELFrameRate(uint32 hash);
|
||||
extern int32 GetWSAssetCELPixSpeed(uint32 hash);
|
||||
extern int32 ws_get_sprite_width(uint32 hash, int32 index);
|
||||
extern int32 ws_get_sprite_height(uint32 hash, int32 index);
|
||||
extern MemHandle ws_GetSEQU(uint32 hash, int32 *numLocalVars, int32 *offset);
|
||||
extern MemHandle ws_GetMACH(uint32 hash, int32 *numStates, int32 *stateTableOffset, int32 *machInstrOffset);
|
||||
extern MemHandle ws_GetDATA(uint32 hash, uint32 index, int32 *rowOffset);
|
||||
extern int32 ws_GetDATACount(uint32 hash);
|
||||
extern int32 GetSSHeaderInfo(Common::SeekableReadStream *stream, uint32 **data, RGB8 *myPalette);
|
||||
extern bool ws_GetSSMaxWH(MemHandle ssHandle, int32 ssOffset, int32 *maxW, int32 *maxH);
|
||||
CCB *GetWSAssetCEL(uint32 hash, uint32 index, CCB *myCCB);
|
||||
int32 GetWSAssetCELCount(uint32 hash);
|
||||
int32 GetWSAssetCELFrameRate(uint32 hash);
|
||||
int32 GetWSAssetCELPixSpeed(uint32 hash);
|
||||
int32 ws_get_sprite_width(uint32 hash, int32 index);
|
||||
int32 ws_get_sprite_height(uint32 hash, int32 index);
|
||||
MemHandle ws_GetSEQU(uint32 hash, int32 *numLocalVars, int32 *offset);
|
||||
MemHandle ws_GetMACH(uint32 hash, int32 *numStates, int32 *stateTableOffset, int32 *machInstrOffset);
|
||||
MemHandle ws_GetDATA(uint32 hash, uint32 index, int32 *rowOffset);
|
||||
int32 ws_GetDATACount(uint32 hash);
|
||||
int32 GetSSHeaderInfo(Common::SeekableReadStream *stream, uint32 **data, RGB8 *myPalette);
|
||||
bool ws_GetSSMaxWH(MemHandle ssHandle, int32 ssOffset, int32 *maxW, int32 *maxH);
|
||||
|
||||
// USING SPRITES WITHOUT GOING THROUGH THE WOODSCRIPT TREE
|
||||
extern int32 LoadSpriteSeries(const char *assetName, MemHandle *seriesHandle, int32 *celsOffset, int32 *palOffset, RGB8 *myPalette);
|
||||
extern int32 LoadSpriteSeriesDirect(const char *assetName, MemHandle *seriesHandle, int32 *celsOffset, int32 *palOffset, RGB8 *myPalette);
|
||||
extern M4sprite *CreateSprite(MemHandle resourceHandle, int32 handleOffset, int32 index, M4sprite *mySprite, bool *streamSeries);
|
||||
int32 LoadSpriteSeries(const char *assetName, MemHandle *seriesHandle, int32 *celsOffset, int32 *palOffset, RGB8 *myPalette);
|
||||
int32 LoadSpriteSeriesDirect(const char *assetName, MemHandle *seriesHandle, int32 *celsOffset, int32 *palOffset, RGB8 *myPalette);
|
||||
M4sprite *CreateSprite(MemHandle resourceHandle, int32 handleOffset, int32 index, M4sprite *mySprite, bool *streamSeries);
|
||||
|
||||
// WOODSCRIPT STREAMING API
|
||||
extern bool ws_OpenSSstream(SysFile *streamFile, Anim8 *anim8);
|
||||
extern bool ws_GetNextSSstreamCel(Anim8 *anim8);
|
||||
extern void ws_CloseSSstream(CCB *myCCB);
|
||||
bool ws_OpenSSstream(SysFile *streamFile, Anim8 *anim8);
|
||||
bool ws_GetNextSSstreamCel(Anim8 *anim8);
|
||||
void ws_CloseSSstream(CCB *myCCB);
|
||||
|
||||
} // End of namespace M4
|
||||
|
||||
|
@ -177,11 +177,11 @@ struct WSMachine_Globals {
|
||||
void *_addrExists = nullptr;
|
||||
};
|
||||
|
||||
extern bool ws_Initialize(frac16 *theGlobals);
|
||||
extern void ws_Shutdown();
|
||||
extern void pauseEngines();
|
||||
extern void unpauseEngines();
|
||||
extern void addPauseTime(int32 myTime);
|
||||
bool ws_Initialize(frac16 *theGlobals);
|
||||
void ws_Shutdown();
|
||||
void pauseEngines();
|
||||
void unpauseEngines();
|
||||
void addPauseTime(int32 myTime);
|
||||
|
||||
void cycleEngines(Buffer *cleanBackground, int16 *depth_table, Buffer *screenCodes,
|
||||
uint8 *myPalette, uint8 *ICT, bool updateVideo);
|
||||
@ -200,7 +200,7 @@ machine *TriggerMachineByHash(int32 myHash, Anim8 *parentAnim8, int32 dataHash,
|
||||
/**
|
||||
* This proc is what allows a machine to send a message to another machine(s)
|
||||
*/
|
||||
extern void sendWSMessage(uint32 msgHash, frac16 msgValue, machine *recvM,
|
||||
void sendWSMessage(uint32 msgHash, frac16 msgValue, machine *recvM,
|
||||
uint32 machHash, machine *sendM, int32 msgCount);
|
||||
|
||||
#define kernel_spawn_machine(name,hash,callback) TriggerMachineByHash(hash, nullptr, -1, -1, callback, false, name)
|
||||
|
@ -32,11 +32,11 @@ struct WSTimer_Globals {
|
||||
onTimeReq *_firstTimeReq = nullptr;
|
||||
};
|
||||
|
||||
extern bool ws_InitWSTimer(void);
|
||||
extern void ws_KillTime(void);
|
||||
extern void ws_MakeOnTimeReq(int32 wakeUpTime, machine *myXM, int32 pcOffset, int32 pcCount);
|
||||
extern void ws_CancelOnTimeReqs(machine *m);
|
||||
extern void ws_CheckTimeReqs(int32 curTime);
|
||||
bool ws_InitWSTimer(void);
|
||||
void ws_KillTime(void);
|
||||
void ws_MakeOnTimeReq(int32 wakeUpTime, machine *myXM, int32 pcOffset, int32 pcCount);
|
||||
void ws_CancelOnTimeReqs(machine *m);
|
||||
void ws_CheckTimeReqs(int32 curTime);
|
||||
|
||||
} // End of namespace M4
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user