mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-18 10:11:50 +00:00
a7075bc1b0
* removed old sound loading code, which was the last bit to use cacheAllocateBlock which is also gone now. * cleanup of player sound code. All game side tracking of the sound resources has been removed. does not compile yet.
79 lines
1.5 KiB
C++
79 lines
1.5 KiB
C++
#include "compat.h"
|
|
#include "osd.h"
|
|
#include "build.h"
|
|
#include "baselayer.h"
|
|
|
|
#include "renderlayer.h"
|
|
|
|
#include "a.h"
|
|
#include "polymost.h"
|
|
|
|
#include "inputstate.h"
|
|
#include "d_event.h"
|
|
#include "../../glbackend/glbackend.h"
|
|
|
|
// video
|
|
#ifdef _WIN32
|
|
extern "C"
|
|
{
|
|
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 0x00000001;
|
|
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
|
}
|
|
#endif // _WIN32
|
|
|
|
int32_t g_borderless=2;
|
|
int GUICapture = false;
|
|
|
|
// input
|
|
char inputdevices = 0;
|
|
|
|
|
|
bool g_mouseEnabled;
|
|
bool g_mouseGrabbed;
|
|
bool g_mouseInsideWindow = 1;
|
|
bool g_mouseLockedToWindow = 1;
|
|
|
|
controllerinput_t joystick;
|
|
|
|
void joySetCallback(void (*callback)(int32_t, int32_t)) { joystick.pCallback = callback; }
|
|
void joyReadButtons(int32_t *pResult) { *pResult = appactive ? joystick.bits : 0; }
|
|
|
|
// Calculate ylookup[] and call setvlinebpl()
|
|
void calc_ylookup(int32_t bpl, int32_t lastyidx)
|
|
{
|
|
int32_t i, j=0;
|
|
static int32_t ylookupsiz;
|
|
|
|
Bassert(lastyidx <= MAXYDIM);
|
|
|
|
lastyidx++;
|
|
|
|
if (lastyidx > ylookupsiz)
|
|
{
|
|
Xaligned_free(ylookup);
|
|
|
|
ylookup = (intptr_t *)Xaligned_alloc(16, lastyidx * sizeof(intptr_t));
|
|
ylookupsiz = lastyidx;
|
|
}
|
|
|
|
for (i=0; i<=lastyidx-4; i+=4)
|
|
{
|
|
ylookup[i] = j;
|
|
ylookup[i + 1] = j + bpl;
|
|
ylookup[i + 2] = j + (bpl << 1);
|
|
ylookup[i + 3] = j + (bpl * 3);
|
|
j += (bpl << 2);
|
|
}
|
|
|
|
for (; i<lastyidx; i++)
|
|
{
|
|
ylookup[i] = j;
|
|
j += bpl;
|
|
}
|
|
|
|
setvlinebpl(bpl);
|
|
}
|
|
|
|
|
|
int32_t g_logFlushWindow = 1;
|
|
|