-
Notifications
You must be signed in to change notification settings - Fork 0
Engine
The Engine object is the main object that does all the initializing and deinitializing stuff. There may be only one instance of it at once.
You should create a Engine object in your game startup code and remember to delete it at the end (tip: avoid using new/delete with Engine, so it can be destroyed automatically at the end of your game).
Creates a game window.
Parameters:
title: the title of the window
width and height: the size of the window
resizable: determines if the window can be resized and maximized
Returns: a Window pointer. This object is handled automatically by the library, so you should not call delete on it
Returns: the number of ticks since the start of the game
Plays a sound in the specified sound channel.
Parameters:
sound: a pointer to a Sound object
channel: the number of the channel to play the sound. The allowed range is from 0 to NUM_SOUND_CHANNELS - 1
Parameters:
channel: index of the channel (the allowed range is from 0 to NUM_SOUND_CHANNELS - 1)
Returns: the pointer to a SoundChannel object