2007-01-15 12:09:25 -08:00
|
|
|
/*
|
|
|
|
This file is part of Warzone 2100.
|
|
|
|
Copyright (C) 1999-2004 Eidos Interactive
|
|
|
|
Copyright (C) 2005-2007 Warzone Resurrection Project
|
|
|
|
|
|
|
|
Warzone 2100 is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Warzone 2100 is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Warzone 2100; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2007-06-28 10:47:08 -07:00
|
|
|
/*
|
|
|
|
* Screen.h
|
|
|
|
*
|
2007-03-28 08:08:57 -07:00
|
|
|
* Interface to the OpenGL double buffered display.
|
2007-06-28 10:47:08 -07:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifndef _screen_h
|
|
|
|
#define _screen_h
|
|
|
|
|
|
|
|
/* Check the header files have been included from frame.h if they
|
|
|
|
* are used outside of the framework library.
|
|
|
|
*/
|
|
|
|
#if !defined(_frame_h) && !defined(FRAME_LIB_INCLUDE)
|
|
|
|
#error Framework header files MUST be included from Frame.h ONLY.
|
|
|
|
#endif
|
|
|
|
|
2006-05-27 09:37:17 -07:00
|
|
|
#include "lib/framework/types.h"
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2006-08-08 13:58:32 -07:00
|
|
|
/* ------------------------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/* Legacy stuff
|
|
|
|
* - only used in the sequence video code we have not yet decided whether to port or to junk */
|
|
|
|
|
2006-08-10 09:05:52 -07:00
|
|
|
void *screenGetSurface(void); /* Return a pointer to the back buffer surface */
|
2006-08-08 13:58:32 -07:00
|
|
|
|
|
|
|
/* Set the colour for text */
|
|
|
|
void screenSetTextColour(UBYTE red, UBYTE green, UBYTE blue);
|
|
|
|
|
2007-06-28 10:47:08 -07:00
|
|
|
/* Image structure */
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
unsigned int width;
|
|
|
|
unsigned int height;
|
|
|
|
unsigned int channels;
|
|
|
|
unsigned char* data;
|
|
|
|
} pie_image;
|
|
|
|
|
2006-02-28 22:12:28 -08:00
|
|
|
BOOL image_init(pie_image* image);
|
|
|
|
BOOL image_create(pie_image* image,
|
|
|
|
unsigned int width,
|
|
|
|
unsigned int height,
|
|
|
|
unsigned int channels);
|
|
|
|
BOOL image_delete(pie_image* image);
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
/* backDrop */
|
|
|
|
extern void screen_SetBackDrop(UWORD* newBackDropBmp, UDWORD width, UDWORD height);
|
2007-04-16 12:22:01 -07:00
|
|
|
extern void screen_SetBackDropFromFile(const char* filename);
|
2007-06-28 10:47:08 -07:00
|
|
|
extern void screen_StopBackDrop(void);
|
|
|
|
extern void screen_RestartBackDrop(void);
|
|
|
|
extern BOOL screen_GetBackDrop(void);
|
2007-04-16 12:22:01 -07:00
|
|
|
extern void screen_Upload(const char *newBackDropBmp);
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
/* screendump */
|
2007-04-16 12:22:01 -07:00
|
|
|
void screenDumpToDisk(const char* path);
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
/* Toggle the display between full screen or windowed */
|
|
|
|
extern void screenToggleMode(void);
|
|
|
|
|
2007-03-28 08:08:57 -07:00
|
|
|
extern int wz_texture_compression;
|
|
|
|
|
|
|
|
/* defined in piedraw.c */
|
|
|
|
BOOL check_extension(const char* extension_name);
|
|
|
|
|
2007-06-28 10:47:08 -07:00
|
|
|
#endif
|