- reduce backend's dependency on game state by using callbacks.
This commit is contained in:
parent
721b857e5e
commit
56f2b2ac56
29 changed files with 289 additions and 276 deletions
3
src/common/engine/i_interface.cpp
Normal file
3
src/common/engine/i_interface.cpp
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#include "i_interface.h"
|
||||
|
||||
SystemCallbacks *sysCallbacks;
|
||||
13
src/common/engine/i_interface.h
Normal file
13
src/common/engine/i_interface.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
struct SystemCallbacks
|
||||
{
|
||||
bool (*WantGuiCapture)();
|
||||
bool (*WantLeftButton)();
|
||||
bool (*NetGame)();
|
||||
bool (*WantNativeMouse)();
|
||||
bool (*CaptureModeInGame)();
|
||||
};
|
||||
|
||||
extern SystemCallbacks *sysCallbacks;
|
||||
|
|
@ -71,6 +71,7 @@ void PaletteContainer::SetPalette(const uint8_t* colors, int transparent_index)
|
|||
Remap[i] = i;
|
||||
}
|
||||
|
||||
|
||||
uniqueRemaps[0]->MakeIdentity(); // update the identity remap.
|
||||
|
||||
if (transparent_index >= 0 && transparent_index <= 255)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue