diff options
Diffstat (limited to 'sword2/driver/driver96.h')
| -rw-r--r-- | sword2/driver/driver96.h | 438 |
1 files changed, 1 insertions, 437 deletions
diff --git a/sword2/driver/driver96.h b/sword2/driver/driver96.h index df32ec50d7..17c5df0742 100644 --- a/sword2/driver/driver96.h +++ b/sword2/driver/driver96.h @@ -17,442 +17,6 @@ * $Header$ */ -//============================================================================= -// -// Filename : driver96.h -// Created : 6th August 1996 -// By : P.R.Porter -// -// Summary : This include file defines all interfaces to the Revolution -// driver96 system. All game code which requires driver -// functions should simlply include this file. -// -// Functions -// --------- -// -// --------------------------------------------------------------------------- -// ------------------------------- d_draw.c ---------------------------------- -// --------------------------------------------------------------------------- -// -// int32 InitialiseDisplay(int32 width, int32 height, int32 colourDepth, int32 windowType) -// -// Initialises the directDraw display with the sizes and colour depths passed -// in. The windowType is either RD_FULLSCREEN or RD_WINDOWED depending upon -// whether the app is to run in a window or not. If RD_WINDOWED is selected, -// the runction may returnRDERR_GOFULLSCREEN which implies that the window -// size and colour depth requested is not compatible with the current -// settings. -// If the required display cannot be set up, then an error code is -// returned, otherwise zero. -// -// --------------------------------------------------------------------------- -// -// int32 ResetDisplay(void) -// -// Closes down the directDraw sub-system and resets the display back to it's -// original size. Returns an RD code. -// -// --------------------------------------------------------------------------- -// -// int32 EraseBackBuffer(void) -// -// Fills the back buffer with palette colour zero. Returns an RD code. -// -// --------------------------------------------------------------------------- -// -// void InterpretDirectDrawError(int32 error) -// -// This function is passed the pointer to a direct draw error code, and -// translates this into a revolution driver error code. It also reports the -// error. -// -// --------------------------------------------------------------------------- -// -// int32 SetBltFx(void) -// -// Sets the edge blend and arithmetic stretching effects. -// -// --------------------------------------------------------------------------- -// -// int32 ClearBltFx(void) -// -// Clears the edge blend and arithmetic stretching effects. -// -// --------------------------------------------------------------------------- -// -// int32 RenderHard(void); -// -// Turns on the hardware renderer. Returns an error if the -// hardware is not capable of rendering. -// -// --------------------------------------------------------------------------- -// -// int32 RenderSoft(void); -// -// Turns on the software renderer. Returns an error if it -// is already on. -// -// --------------------------------------------------------------------------- -// -// int32 GetRenderType(void) -// -// Returns the type of rendering currently being used. -// 0 = H/W rendering, 1 = S/W Rendering + BltFxOFF, 2 = S/W Rendering + BltFxON -// -// --------------------------------------------------------------------------- -// -// int32 PlaySmacker(char *filename) -// -// Plays the smacker file, filename. -// -// --------------------------- rdwin.c --------------------------------------- -// --------------------------------------------------------------------------- -// -// int32 ServiceWindows(void) -// -// This function should be called at a high rate ( > 20 per second) to service -// windows and the interfaces it provides. -// -// --------------------------------------------------------------------------- -// -// int32 CloseAppWindow(void) -// -// Removes all windows hooks from the application. -// -// --------------------------------------------------------------------------- -// -// void SetWindowName(const char *windowName) -// -// Set the window name to windowName and stores this name in gameName for future -// use. -// -// --------------------------------------------------------------------------- -// --------------------------------- language.c ------------------------------ -// --------------------------------------------------------------------------- -// -// int32 GetLanguageVersion(uint8 *version) -// -// This function modifies the 'version' passed in to be the current language. -// The first time this function is called, it gets the language from the -// version.inf file distributed on the game CD. It returns an RD error code -// if this file cannot be opened, or the version cannot be obtained from it. -// -// --------------------------------------------------------------------------- -// -// int32 SetLanguageVersion(uint8 version) -// -// This function is useful for debugging. It sets the version to the one -// passed in. -// -// --------------------------------------------------------------------------- -// -// int32 GetGameName(uint8 *name); -// -// Fills the string pointed to by name with the title of the game, depending -// upon what the current language version is. -// -// -------------------------------------------------------------------------- -// ------------------------------- palette.c -------------------------------- -// -------------------------------------------------------------------------- -// -// void BS2_SetPalette(int32 startEntry, int32 noEntries, uint8 *colourTable, uint8 setNow) -// -// Sets the palette from position startEntry for noEntries, to the data -// pointed to by colourTable. To set the palette immediately pass -// RDPAL_INSTANT. If you want to fade later, pass RDPAL_FADE. -// -// -------------------------------------------------------------------------- -// -// int32 UpdatePaletteMatchTable(uint8 *data) -// -// Uses the current palCopy to create a table of palette indeces which will -// be searched later for a quick palette match - only if NULL is passed in -// as the data. If a pointer to valid data is passed in, the palette match -// table is copied from that data. -// -// -------------------------------------------------------------------------- -// -// uint8 QuickMatch(uint8 r, uint8 g, uint8 b) -// -// Returns the palette index of the closest matching colour in the palette -// to these RGB values. -// -// -------------------------------------------------------------------------- -// -// int32 FadeUp(float time) -// -// Fades the palette up from black to the current palette in time. -// -// -------------------------------------------------------------------------- -// -// int32 FadeDown(float time) -// -// Fades the palette down to black from the current palette in time. -// -// -------------------------------------------------------------------------- -// -// uint8 GetFadeStatus(void) -// -// Returns the fade status which can be one of RDFADE_UP, RDFADE_DOWN or -// RDFADE_NONE. -// -// -// -------------------------------------------------------------------------- -// -------------------------------- mouse.c --------------------------------- -// -------------------------------------------------------------------------- -// -// _mouseEvent *MouseEvent(void) -// -// If there is a mouse event in the queue, a valid pointer is returned. -// Otherwise, NULL. -// -// -------------------------------------------------------------------------- -// -// int32 SetMouseAnim(uint8 *ma, int32 size, int32 mouseFlash) -// -// A pointer to a valid mouse animation is passed in, along with the size of -// the header plus sprite data. Remember to check that the function has -// successfully completed, as memory allocation is required. When the mouse -// animation has been set, the mouse sprite does not need to be kept in the -// memory manager. -// Pass NULL in to clear the mouse sprite. -// mouseFlash should be either RDMOUSE_FLASH or RDMOUSE_NOFLASH -// defining whether to pulse the mouse or not. -// -// -------------------------------------------------------------------------- -// -// int32 SetLuggageAnim(uint8 *la, int32 size) -// -// A pointer to a valid luggage animation is passed in, along with the size of -// the header plus sprite data. Remember to check that the function has -// successfully completed, as memory allocation is required. -// Pass NULL in to clear the luggage sprite. Luggage sprites are of the same -// format as mouse sprites. -// -// -------------------------------------------------------------------------- -// -// int32 AnimateMouse(void) -// -// This function animates the current mouse pointer. If no pointer is -// currently defined, an error code is returned. -// -// -// -------------------------------------------------------------------------- -// ------------------------------ keyboard.c -------------------------------- -// -------------------------------------------------------------------------- -// -// BOOL KeyWaiting(void) -// -// This function returns TRUE if there is an unprocessed key waiting in the -// queue, FALSE otherwise. -// -// -------------------------------------------------------------------------- -// -// int32 ReadKey(_keyboardEvent *key) -// -// Sets the value of key passed in to the current waiting key. If there is -// no key waiting, an error code is returned. -// -// -// -------------------------------------------------------------------------- -// ------------------------------- sprite.c --------------------------------- -// -------------------------------------------------------------------------- -// -// int32 DrawSprite(_spriteInfo *s) -// -// Draws a sprite onto the screen of the type defined in the _spriteInfo -// structure. The _spriteInfo structure consists of the following elements: -// -// int16 x; // coords for top-left of sprite -// int16 y; -// uint16 w; // dimensions of sprite (before scaling) -// uint16 h; -// uint16 scale; // scale at which to draw, given in 256ths -// ['0' or '256' MEANS DON'T SCALE] -// uint16 scaledWidth; // new dimensions -// uint16 scaledHeight; // -// uint16 blend // blending value. -// uint16 type; // combination of the bits below -// uint8 *data; // pointer to the sprite data -// uint8 *colourTable; // pointer to 16-byte colour table - only -// applicable to 16-col compression type -// -// WARNING: Sprites will only be drawn onto the background. Sprites will not -// appear over the menubar areas. The mouse and menu drawing is treated -// as a special case. -// -// The type of the sprite can be any of the following: -// -// if (RDSPR_TRANS) -// The sprite has a transparent colour zero -// if (RDSPR_NOCOMPRESSION) -// The sprite data must not be compressed (slow to draw) -// The RDSPR_DISPLAYALIGN bit may be set to draw the sprite -// at coordinates relative to the top left corner of the -// monitor. -// else -// Compression must be set as one of the following: -// RDSPR_RLE16 -// RDSPR_RLE256 -// RDSPR_LAYERCOMPRESSION -// else -// The sprite has an opaque colour zero -// RDSPR_NOCOMPRESSION must be set! -// RDSPR_DISPLAYALIGN may be set to align the coordinates of the sprite -// to the top left corner of the monitor. -// -// --------------------------------------------------------------------------- -// -// int32 CreateSurface(_spriteInfo *s, uint32 *surface) -// -// Creates a sprite surface in video memory (if possible) and returns it's -// handle in surface. -// -// --------------------------------------------------------------------------- -// -// void DrawSurface(_spriteInfo *s, uint32 surface, ScummVM::Rect *clipRect) -// -// Draws the sprite surface created earlier. -// -// --------------------------------------------------------------------------- -// -// void DeleteSurface(uint32 surface) -// -// Deletes a surface from video memory. -// -// --------------------------------------------------------------------------- -// -// int32 OpenLightMask(_spriteInfo *s) -// -// Opens the light masking sprite for a room. -// -// --------------------------------------------------------------------------- -// -// int32 CloseLightMask(void) -// -// Closes the light masking sprite for a room. -// -// -------------------------------------------------------------------------- -// ------------------------------- render.c --------------------------------- -// -------------------------------------------------------------------------- -// -// int32 RenderParallax(_parallax *p) -// -// Draws a parallax layer at the current position determined by the scroll. -// A parallax can be either foreground, background or the main screen. -// -// --------------------------------------------------------------------------- -// -// int32 SetScrollTarget(int16 sx, int16 sy) -// -// Sets the scroll target position for the end of the game cycle. The drivers -// will then automatically scroll as many times as it can to reach this -// position in the allotted time. -// -// -------------------------------------------------------------------------- -// -// int32 InitialiseRenderCycle(void) -// -// Initialises the timers before the render loop is entered. -// -// -------------------------------------------------------------------------- -// -// int32 StartRenderCycle(void) -// -// This function should be called when the game engine is ready to start -// the render cycle. -// -// -------------------------------------------------------------------------- -// -// int32 EndRenderCycle(BOOL *end) -// -// This function should be called at the end of the render cycle. If the -// render cycle is to be terminated, the function sets *end to 1. Otherwise, -// the render cycle should continue. -// -// -------------------------------------------------------------------------- -// -// int32 SetLocationMetrics(uint16 w, uint16 h) -// -// This function tells the drivers the size of the background screen for the -// current location. -// -// -------------------------------------------------------------------------- -// -// int32 PlotPoint(uint16 x, uint16 y, uint8 colour) -// -// Plots the point x,y in relation to the top left corner of the background. -// -// -------------------------------------------------------------------------- -// -// int32 DrawLine(int16 x1, int16 y1, int16 x2, int16 y2, uint8 colour) -// -// Draws a line from the point x1,y1 to x2,y2 of the specified colour. -// -// -------------------------------------------------------------------------- -// -// int32 InitialiseBackgroundLayer(_parallax *p) -// -// This function should be called five times with either the parallax layer -// or a NULL pointer in order of background parallax to foreground parallax. -// -// -------------------------------------------------------------------------- -// -// int32 CloseBackgroundLayer(void) -// -// Should be called once after leaving a room to free up video memory. -// -// -------------------------------------------------------------------------- -// -// int32 PlotDots(int16 x, int16 y, int16 count) -// -// Plots 'count' dots at the position x,y. -// -// -------------------------------------------------------------------------- -// ---------------------------- menu.c -------------------------------------- -// -------------------------------------------------------------------------- -// -// int32 ProcessMenu(void) -// -// This function should be called regularly to process the menuber system. -// The rate at which this function is called will dictate how smooth the menu -// system is. The menu cannot be drawn at a higher rate than the system -// vbl rate. -// -// -------------------------------------------------------------------------- -// -// int32 ShowMenu(uint8 menu) -// -// This function brings the menu in to view. The choice of top or bottom menu -// is defined by the parameter menu being either RDMENU_TOP or RDMENU_BOTTOM. -// An error code is returned if the menu is already shown. -// -// -------------------------------------------------------------------------- -// -// int32 HideMenu(uint8 menu) -// -// This function hides the menu defined by the parameter menu. If the menu is -// already hidden, an error code is returned. -// -// -------------------------------------------------------------------------- -// -// int32 SetMenuIcon(uint8 menu, uint8 pocket, uint8 *icon) -// -// This function sets a menubar icon to that passed in. If icon is NULL, the -// pocket is cleared, otherwise, that icon is placed into pocket. The menu is -// either RDMENU_TOP or RDMENU_BOTTOM. Valid error codes include -// RDERR_INVALIDPOCKET if the pocket number does not exist. Initially, there -// are 15 pockets. -// -// -------------------------------------------------------------------------- -// -// uint8 GetMenuStatus(uint8 menu) -// -// This function returns the status of the menu passed in menu. Return values -// are RDMENU_OPENING, RDMENU_CLOSING, RDMENU_HIDDEN and RDMENU_SHOWN. -// -//============================================================================= - #ifndef DRIVER96_H #define DRIVER96_H @@ -745,7 +309,7 @@ typedef struct { //----------------------------------------------------------------------------- // Display functions - from d_draw.c //----------------------------------------------------------------------------- -extern int32 InitialiseDisplay(int16 width, int16 height, int16 colourDepth, int32 windowType); +extern int32 InitialiseDisplay(int16 width, int16 height); extern int32 EraseBackBuffer(void); extern void SetTransFx(void); extern void ClearTransFx(void); |
