fallout2-ce/src/svga.h

70 lines
2.3 KiB
C
Raw Normal View History

2022-10-05 00:35:05 -07:00
#ifndef FALLOUT_SVGA_H_
#define FALLOUT_SVGA_H_
2022-05-19 01:51:26 -07:00
2022-09-15 02:38:23 -07:00
#include <SDL.h>
2022-05-19 01:51:26 -07:00
#include "db.h"
#include "geometry.h"
#include "window.h"
2022-09-23 05:43:44 -07:00
namespace fallout {
2022-05-19 01:51:26 -07:00
extern void (*_update_palette_func)();
extern bool gMmxEnabled;
extern bool gMmxProbed;
extern unsigned short gSixteenBppPalette[256];
extern Rect _scr_size;
extern int gRedMask;
extern int gGreenMask;
extern int gBlueMask;
extern int gBlueShift;
extern int gRedShift;
extern int gGreenShift;
extern void (*_scr_blit)(unsigned char* src, int src_pitch, int a3, int src_x, int src_y, int src_width, int src_height, int dest_x, int dest_y);
extern void (*_zero_mem)();
extern bool gMmxSupported;
extern unsigned char gLastVideoModePalette[268];
2022-05-24 13:19:36 -07:00
extern SDL_Window* gSdlWindow;
extern SDL_Surface* gSdlSurface;
2022-07-12 00:10:23 -07:00
extern SDL_Renderer* gSdlRenderer;
extern SDL_Texture* gSdlTexture;
extern SDL_Surface* gSdlTextureSurface;
2022-05-24 13:19:36 -07:00
2022-05-19 01:51:26 -07:00
void mmxSetEnabled(bool a1);
int _init_mode_320_200();
int _init_mode_320_400();
int _init_mode_640_480_16();
int _init_mode_640_480();
int _init_mode_640_400();
int _init_mode_800_600();
int _init_mode_1024_768();
int _init_mode_1280_1024();
void _get_start_mode_();
void _zero_vid_mem();
int _GNW95_init_mode_ex(int width, int height, int bpp);
int _init_vesa_mode(int width, int height);
2022-05-19 04:01:17 -07:00
int _GNW95_init_window(int width, int height, bool fullscreen);
2022-05-19 01:51:26 -07:00
int getShiftForBitMask(int mask);
int directDrawInit(int width, int height, int bpp);
void directDrawFree();
void directDrawSetPaletteInRange(unsigned char* a1, int a2, int a3);
void directDrawSetPalette(unsigned char* palette);
unsigned char* directDrawGetPalette();
void _GNW95_ShowRect(unsigned char* src, int src_pitch, int a3, int src_x, int src_y, int src_width, int src_height, int dest_x, int dest_y);
void _GNW95_MouseShowRect16(unsigned char* src, int srcPitch, int a3, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY);
void _GNW95_ShowRect16(unsigned char* src, int srcPitch, int a3, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY);
void _GNW95_MouseShowTransRect16(unsigned char* src, int srcPitch, int a3, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, unsigned char keyColor);
void _GNW95_zero_vid_mem();
2022-05-20 15:50:14 -07:00
int screenGetWidth();
int screenGetHeight();
int screenGetVisibleHeight();
2022-10-04 23:23:27 -07:00
void handleWindowSizeChanged();
2022-10-06 09:10:01 -07:00
void renderPresent();
2022-05-20 15:50:14 -07:00
2022-09-23 05:43:44 -07:00
} // namespace fallout
2022-10-05 00:35:05 -07:00
#endif /* FALLOUT_SVGA_H_ */