2020'' #define EMPTY_STRING => EMPTY_STRING_
2121'' #define SYSTEM_NONE => SYSTEM_NONE_
2222'' #define MOUSEDRV_NONE => MOUSEDRV_NONE_
23- '' #define DRAW_SPRITE_H_FLIP => DRAW_SPRITE_H_FLIP_
2423'' #define DRAW_SPRITE_V_FLIP => DRAW_SPRITE_V_FLIP_
24+ '' #define DRAW_SPRITE_H_FLIP => DRAW_SPRITE_H_FLIP_
2525'' #define DRAW_SPRITE_VH_FLIP => DRAW_SPRITE_VH_FLIP_
2626'' #define MIDI_DIGMID => MIDI_DIGMID_
2727'' #define EOF => EOF_
@@ -81,13 +81,13 @@ type GFX_VTABLE as GFX_VTABLE_
8181type GFX_MODE as GFX_MODE_
8282type RLE_SPRITE as RLE_SPRITE_
8383type FONT_GLYPH as FONT_GLYPH_
84- type FONT as FONT_
8584type FONT_VTABLE as FONT_VTABLE_
85+ type FONT as FONT_
8686type DIALOG as DIALOG_
8787type PACKFILE as PACKFILE_
88+ type PACKFILE_VTABLE as PACKFILE_VTABLE_
8889type LZSS_PACK_DATA as LZSS_PACK_DATA_
8990type LZSS_UNPACK_DATA as LZSS_UNPACK_DATA_
90- type PACKFILE_VTABLE as PACKFILE_VTABLE_
9191
9292#define ALLEGRO_H
9393#define ALLEGRO_BASE_H
@@ -257,12 +257,15 @@ type PACKFILE_VTABLE as PACKFILE_VTABLE_
257257 #define _farnspeekl(addr) (*cptr(ulong ptr, (addr)))
258258# endif
259259
260- #define READ3BYTES(p) (((*cptr(ubyte ptr, (p))) or ((*cptr(ubyte ptr, (p) + 1 )) shl 8 )) or ((*cptr(ubyte ptr, (p) + 2 )) shl 16 ))
260+ #define READ3BYTES(p) _
261+ ( cptr(ubyte ptr, (p)) [0 ] or _
262+ (cptr(ubyte ptr, (p)) [1 ] shl 8 ) or _
263+ (cptr(ubyte ptr, (p)) [2 ] shl 16 ) )
261264#macro WRITE3BYTES(p, c)
262265 scope
263- * cptr(ubyte ptr, (p)) = (c)
264- * cptr(ubyte ptr, (p) + 1 ) = (c) shr 8
265- * cptr(ubyte ptr, (p) + 2 ) = (c) shr 16
266+ cptr(ubyte ptr, (p)) [ 0 ] = (c)
267+ cptr(ubyte ptr, (p)) [ 1 ] = (c) shr 8
268+ cptr(ubyte ptr, (p)) [ 2 ] = (c) shr 16
266269 end scope
267270#endmacro
268271
@@ -336,13 +339,13 @@ declare function uwidth_max(byval type_ as long) as long
336339#define EMPTY_STRING_ ! "\0\0\0"
337340
338341extern _AL_DLL empty_string as zstring * 4
339- extern ugetc as function ( byval s as const zstring ptr) as long
340- extern ugetx as function ( byval s as zstring ptr ptr) as long
341- extern ugetxc as function ( byval s as const zstring ptr ptr) as long
342- extern usetc as function ( byval s as zstring ptr, byval c as long ) as long
343- extern uwidth as function ( byval s as const zstring ptr) as long
344- extern ucwidth as function ( byval c as long ) as long
345- extern uisok as function ( byval c as long ) as long
342+ extern _AL_DLL ugetc as function ( byval s as const zstring ptr) as long
343+ extern _AL_DLL ugetx as function ( byval s as zstring ptr ptr) as long
344+ extern _AL_DLL ugetxc as function ( byval s as const zstring ptr ptr) as long
345+ extern _AL_DLL usetc as function ( byval s as zstring ptr, byval c as long ) as long
346+ extern _AL_DLL uwidth as function ( byval s as const zstring ptr) as long
347+ extern _AL_DLL ucwidth as function ( byval c as long ) as long
348+ extern _AL_DLL uisok as function ( byval c as long ) as long
346349
347350declare function uoffset( byval s as const zstring ptr, byval idx as long ) as long
348351declare function ugetat( byval s as const zstring ptr, byval idx as long ) as long
@@ -662,7 +665,7 @@ extern _AL_DLL freeze_mouse_flag as long
662665#define MOUSE_FLAG_MOVE_Z 128
663666#define MOUSE_FLAG_MOVE_W 256
664667
665- extern mouse_callback as sub ( byval flags as long )
668+ extern _AL_DLL mouse_callback as sub ( byval flags as long )
666669
667670declare sub show_mouse( byval bmp as BITMAP ptr)
668671declare sub scare_mouse()
@@ -683,8 +686,8 @@ declare function mouse_on_screen() as long
683686
684687#define ALLEGRO_TIMER_H
685688#define TIMERS_PER_SECOND cast(clong, 1193181 )
686- #define SECS_TO_TIMER(x) cast(clong, (x) * TIMERS_PER_SECOND)
687- #define MSEC_TO_TIMER(x) cast(clong, (x) * (TIMERS_PER_SECOND / 1000 ))
689+ #define SECS_TO_TIMER(x) ( cast(clong, (x) ) * TIMERS_PER_SECOND)
690+ #define MSEC_TO_TIMER(x) ( cast(clong, (x) ) * (TIMERS_PER_SECOND / 1000 ))
688691#define BPS_TO_TIMER(x) (TIMERS_PER_SECOND / cast(clong, (x)))
689692#define BPM_TO_TIMER(x) (( 60 * TIMERS_PER_SECOND) / cast(clong, (x)))
690693
@@ -750,9 +753,9 @@ declare sub remove_keyboard()
750753declare function poll_keyboard() as long
751754declare function keyboard_needs_poll() as long
752755
753- extern keyboard_callback as function ( byval key as long ) as long
754- extern keyboard_ucallback as function ( byval key as long , byval scancode as long ptr) as long
755- extern keyboard_lowlevel_callback as sub ( byval scancode as long )
756+ extern _AL_DLL keyboard_callback as function ( byval key as long ) as long
757+ extern _AL_DLL keyboard_ucallback as function ( byval key as long , byval scancode as long ptr) as long
758+ extern _AL_DLL keyboard_lowlevel_callback as sub ( byval scancode as long )
756759
757760declare sub install_keyboard_hooks( byval keypressed as function () as long , byval readkey as function () as long )
758761
@@ -2058,22 +2061,19 @@ extern _AL_DLL gui_button_proc as DIALOG_PROC
20582061extern _AL_DLL gui_edit_proc as DIALOG_PROC
20592062extern _AL_DLL gui_list_proc as DIALOG_PROC
20602063extern _AL_DLL gui_text_list_proc as DIALOG_PROC
2061-
2062- extern gui_menu_draw_menu as sub ( byval x as long , byval y as long , byval w as long , byval h as long )
2063- extern gui_menu_draw_menu_item as sub ( byval m as MENU ptr, byval x as long , byval y as long , byval w as long , byval h as long , byval bar as long , byval sel as long )
2064-
2064+ extern _AL_DLL gui_menu_draw_menu as sub ( byval x as long , byval y as long , byval w as long , byval h as long )
2065+ extern _AL_DLL gui_menu_draw_menu_item as sub ( byval m as MENU ptr, byval x as long , byval y as long , byval w as long , byval h as long , byval bar as long , byval sel as long )
20652066extern _AL_DLL active_dialog as DIALOG ptr
20662067extern _AL_DLL active_menu as MENU ptr
20672068extern _AL_DLL gui_mouse_focus as long
20682069extern _AL_DLL gui_fg_color as long
20692070extern _AL_DLL gui_mg_color as long
20702071extern _AL_DLL gui_bg_color as long
20712072extern _AL_DLL gui_font_baseline as long
2072-
2073- extern gui_mouse_x as function () as long
2074- extern gui_mouse_y as function () as long
2075- extern gui_mouse_z as function () as long
2076- extern gui_mouse_b as function () as long
2073+ extern _AL_DLL gui_mouse_x as function () as long
2074+ extern _AL_DLL gui_mouse_y as function () as long
2075+ extern _AL_DLL gui_mouse_z as function () as long
2076+ extern _AL_DLL gui_mouse_b as function () as long
20772077
20782078declare sub gui_set_screen( byval bmp as BITMAP ptr)
20792079declare function gui_get_screen() as BITMAP ptr
@@ -2241,7 +2241,7 @@ declare function start_sound_input(byval rate as long, byval bits as long, byval
22412241declare sub stop_sound_input()
22422242declare function read_sound_input( byval buffer as any ptr) as long
22432243
2244- extern digi_recorder as sub ()
2244+ extern _AL_DLL digi_recorder as sub ()
22452245
22462246declare sub lock_sample( byval spl as SAMPLE ptr)
22472247declare sub register_sample_file_type( byval ext as const zstring ptr, byval load as function ( byval filename as const zstring ptr) as SAMPLE ptr, byval save as function ( byval filename as const zstring ptr, byval spl as SAMPLE ptr) as long )
@@ -2267,14 +2267,14 @@ declare sub free_audio_stream_buffer(byval stream as AUDIOSTREAM ptr)
22672267#define MIDI_VOICES 64
22682268#define MIDI_TRACKS 32
22692269
2270- type __dummyid_5_extracted_allegro_4_4_2_include_allegro_midi
2270+ type __MIDI_track
22712271 data as ubyte ptr
22722272 len as long
22732273end type
22742274
22752275type MIDI
22762276 divisions as long
2277- track( 0 to 31 ) as __dummyid_5_extracted_allegro_4_4_2_include_allegro_midi
2277+ track( 0 to 31 ) as __MIDI_track
22782278end type
22792279
22802280#define MIDI_AUTODETECT (- 1 )
@@ -2338,10 +2338,10 @@ declare function get_midi_length(byval midi as MIDI ptr) as long
23382338declare sub midi_out( byval data_ as ubyte ptr, byval length as long )
23392339declare function load_midi_patches() as long
23402340
2341- extern midi_msg_callback as sub ( byval msg as long , byval byte1 as long , byval byte2 as long )
2342- extern midi_meta_callback as sub ( byval type_ as long , byval data_ as const ubyte ptr, byval length as long )
2343- extern midi_sysex_callback as sub ( byval data_ as const ubyte ptr, byval length as long )
2344- extern midi_recorder as sub ( byval data_ as ubyte)
2341+ extern _AL_DLL midi_msg_callback as sub ( byval msg as long , byval byte1 as long , byval byte2 as long )
2342+ extern _AL_DLL midi_meta_callback as sub ( byval type_ as long , byval data_ as const ubyte ptr, byval length as long )
2343+ extern _AL_DLL midi_sysex_callback as sub ( byval data_ as const ubyte ptr, byval length as long )
2344+ extern _AL_DLL midi_recorder as sub ( byval data_ as ubyte)
23452345
23462346declare sub lock_midi( byval midi as MIDI ptr)
23472347declare sub reserve_voices( byval digi_voices_ as long , byval midi_voices_ as long )
@@ -2769,7 +2769,7 @@ declare sub set_window_close_hook(byval proc as sub())
27692769declare sub set_clip( byval bitmap as BITMAP ptr, byval x1 as long , byval y_1 as long , byval x2 as long , byval y2 as long )
27702770declare sub yield_timeslice()
27712771
2772- extern retrace_proc as sub ()
2772+ extern _AL_DLL retrace_proc as sub ()
27732773
27742774declare sub set_file_encoding( byval encoding_ as long )
27752775declare function get_file_encoding() as long
0 commit comments