CGDoom/src-sdl2/platform.h

67 lines
1.4 KiB
C
Raw Normal View History

/* <platform.h> file for Linux/SDL2 */
#ifndef PLATFORM_H
#define PLATFORM_H
2021-08-14 11:55:20 +02:00
#include <stdio.h>
#include <stdlib.h>
2021-08-14 11:55:20 +02:00
#include <string.h>
#include <stdint.h>
2015-04-15 02:16:51 +02:00
#include "keyboard.hpp"
2021-08-14 11:55:20 +02:00
//---
// Memory layout
//---
extern char _PRAM0[160*1024];
#define PRAM0_START ((void *)_PRAM0)
#define PRAM0_END ((void *)_PRAM0 + sizeof _PRAM0)
2021-10-01 20:52:05 +02:00
#define CGDOOM_SCREENS_BASE (void *)SecondaryVRAM
//---
// fx-CG-specific functions not defined on emulator
//---
#define CreateFileMapping(...) 0
#define FindInFlash(...) 0
#define FindZeroedMemory(...) 0
2021-08-14 11:55:20 +02:00
/* On the emulator all lumps are allocated with malloc(), so there are not
pointers-to-flash to account for when freeing. */
#define PTR_TO_FLASH(p) 0
//---
// Rendering system emulation
//---
2021-08-14 11:55:20 +02:00
void Bdisp_PutDisp_DD(void);
void Bdisp_AllClr_VRAM(void);
uint16_t *GetVRAMAddress(void);
uint16_t *GetSecondaryVRAMAddress(void);
2021-08-14 11:55:20 +02:00
int Bdisp_FrameAndColor(int, int);
#define EnableColor(...)
#define EnableStatusArea(...)
2021-08-14 11:55:20 +02:00
//---
// Filesystem API emulation
//---
2021-08-14 11:55:20 +02:00
#include "../../../include/fxcg/file.h"
2021-08-14 11:55:20 +02:00
//---
// Other functions
//---
2021-08-14 11:55:20 +02:00
int PRGM_GetKey(void);
void GetKey(int *key);
2021-08-14 11:55:20 +02:00
int RTC_GetTicks(void);
2021-08-14 11:55:20 +02:00
void assert(int iLine,const char *pszFilename,const char *pszAassert);
#define ASSERT(x) if(!(x)){assert(__LINE__,__FILE__,#x);}
#define GetOSVersion() ("03.60.0000")
2021-08-14 11:55:20 +02:00
#endif /* PLATFORM_H */