This header declares a function to read information about the current screen mode, and store it in various global variables. To ensure that the variables are up to date, you should either call Screen_CacheModeInfo before you access them, or call it every time the mode changes.
A handler is provided in the Handler library (Handler_ModeChange) which you can use with the EventMsg system to call the function on every mode change.
This function reads a mode variable for the mode 'mode', or the current screen mode if 'mode' is -1. The value is returned in 'value'.
This function reads various pieces of information about the current screen mode and sets the variables defined by this file appropriately. It should be called before you try to use any of those variables.
It only needs to be called when the mode changes, so you can call it when your program starts and whenever a mode change message is received, or else immediately before you use the variables.
It checks the screenmode, and if it has not changed from the last call, then the variables are not updated. This means it will not be a big problem if you call it more often than strictly necessary (every time you redraw, for example).
This function always returns TRUE.
This gives useful names to the various mode variables you can read with Screen_ReadModeInfo.
Mode specifier
Format specifier used for sprites
RISC OS modes
This holds the current screen mode.
This holds the current screen size in OS units.
Log2(screen_delta)
This holds the size of a pixel in OS coordinates for the current mode.
This gives the bits per pixel for the current mode, ie. the colour "depth".