Returns 1
if key of given key code has been pressed, else 0
.
Returns number of milliseconds since the SDL library initialisation as 8-byte integer.
Returns UNIX timestamp as 8-byte integer.
Returns allocation status of current layer. The status is 1
if the layer is
allocated, else 0
.
Blits rectangle copied from source layer I
to target layer selected with
GLAYER()
.
Draws circle in current colour at IX
, IY
, and of radius IR
.
Cleans up and quits SDL 1.2.
Sets current colour in RGB.
Sets colour key (transparent colour) in current layer. Not necessary for images with alpha channels that have been loaded with SDL_image.
Copies palette colour I
to current layer surface. The surface has to be
locked beforehand with GLOCK()
.
Copies pixel from given layer I
to target layer selected with GLAYER()
. The
target layer has to be locked beforehand with GLOCK()
.
Creates a new layer selected with GLAYER()
of given size. Replaces existing
layer. The default background colour is black.
Shows or hides the mouse cursor, depending on ITOGGLE
(0
or 1
).
Delays program execution for given time in msec.
Polls an SDL event. The event type is returned in IEVENT
, the status in
ISTAT
. If ISTAT
is 1
, another event is waiting.
Fills current layer in global colour.
Fills rectangle of given size in global colour.
Flips screen surface.
Grabs mouse and keyboard input if ITOGGLE
is 1
.
Draws horizontal line to layer surface. No bounds checking!
Selects layer by index. The screen layer is alway 0
. Up to 7 additional layers
can be created, either as buffer or to store images loaded from file.
Draws a line from IX1
, IY1
to IX2
, IY2
.
Loads image from file to current layer, using SDL or SDL_image (if
available). FILE
is the null-terminated path to the image file. ISTAT
is set
to 0
if the image has been loaded successfully.
Locks current layer for direct pixel manipulation.
Returns mouse button clicks (left, middle, right). On click, the button state
is set to 1
.
Returns relative mouse motion and absolute mouse position as 8-byte integer.
Opens the SDL 1.2 window. Only a single window can be opened at a time. TITLE
is the null-terminated window title. ISTAT
is set to 0
if the window was
opened successfully.
Allocates palette memory for N
colours.
Draws single pixel on layer. The surface must be locked.
Sets RGB palette colour at index I
in screen format to given RGB values.
Copies screen surface in BMP format to given file (screen shot). The file path must be null-terminated.
Unlocks layer surface.
Returns status information (hardware acceleration, window manager, video memory).
Draws vertical line to layer surface. No bounds checking!
Warps mouse to IX
, IY
.
Plays sound effect I
in chunk array on channel ICHAN
. Set the channel to
-1
to use the next free. LOOPS
sets the number of loops to play for.
Closes music file.
Stops music playback.
Loads music file (preferable, in OGG format). ISTAT
is set to 0
if the file
has been loaded successfully.
Loads WAV file to position I
in audio chunk array. Up to eight sound effects
may be loaded (from 0
to 7
). ISTAT
is set to 0
if the file has been
loaded successfully.
Pauses music playback.
Plays music file. LOOPS
sets the number of loops to play for, 0
means “play
once and stop”.