| 1 | #ifndef __WSWAN_GFX_H |
| 2 | #define __WSWAN_GFX_H |
| 3 | |
| 4 | #include "../state.h" |
| 5 | #include "../video.h" |
| 6 | |
| 7 | #ifdef __cplusplus |
| 8 | extern "C" { |
| 9 | #endif |
| 10 | |
| 11 | extern uint8 wsTCache[512*64]; //tiles cache |
| 12 | extern uint8 wsTCacheFlipped[512*64]; //tiles cache (H flip) |
| 13 | extern uint8 wsTCacheUpdate[512]; //tiles cache flags |
| 14 | extern uint8 wsTCache2[512*64]; //tiles cache |
| 15 | extern uint8 wsTCacheFlipped2[512*64]; //tiles cache (H flip) |
| 16 | extern uint8 wsTCacheUpdate2[512]; //tiles cache flags |
| 17 | |
| 18 | |
| 19 | extern uint8 wsTileRow[8]; //extracted 8 pixels (tile row) |
| 20 | extern int wsVMode; //Video Mode |
| 21 | |
| 22 | void wsMakeTiles(void); |
| 23 | void wsGetTile(uint32,uint32,int,int,int); |
| 24 | void wsSetVideo(int, bool); |
| 25 | void WSWan_TCacheInvalidByAddr(uint32); |
| 26 | |
| 27 | bool wsExecuteLine(MDFN_Surface *surface, bool skip); |
| 28 | |
| 29 | void WSwan_SetMonoPalette(int depth, uint32 mono_start, uint32 mono_end); |
| 30 | |
| 31 | void WSwan_SetPixelFormat(int depth, uint32 mono_start, uint32 mono_end); |
| 32 | |
| 33 | void WSwan_GfxInit(void); |
| 34 | |
| 35 | void WSwan_GfxReset(void); |
| 36 | |
| 37 | uint8 WSwan_GfxRead(uint32 A); |
| 38 | |
| 39 | int WSwan_GfxStateAction(StateMem *sm, int load, int data_only); |
| 40 | |
| 41 | void wsScanline(uint16 *target, int depth); |
| 42 | |
| 43 | extern uint32 dx_r,dx_g,dx_b,dx_sr,dx_sg,dx_sb; |
| 44 | extern uint32 dx_bits,dx_pitch,cmov,dx_linewidth_blit,dx_buffer_line; |
| 45 | |
| 46 | void WSwan_GfxWrite(uint32 A, uint8 V); |
| 47 | void WSwan_GfxWSCPaletteRAMWrite(uint32 ws_offset, uint8 data); |
| 48 | |
| 49 | void WSwan_SetLayerEnableMask(uint64 mask); |
| 50 | |
| 51 | #ifdef __cplusplus |
| 52 | } |
| 53 | #endif |
| 54 | |
| 55 | |
| 56 | #endif |