mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-01 04:10:30 +00:00
Remove the screenManager global, other assorted cleanup
This commit is contained in:
parent
113f10abfe
commit
01f2b5ada0
@ -69,6 +69,17 @@ void NativeMix(short *audio, int num_samples);
|
||||
void NativeShutdownGraphics();
|
||||
void NativeShutdown();
|
||||
|
||||
// Called on app.onCreate and app.onDestroy (?). Tells the app to save/restore
|
||||
// light state. If app was fully rebooted between these calls, it's okay if some minor
|
||||
// state is lost (position in level) but the level currently playihg, or the song
|
||||
// currently being edited, or whatever, should be restored properly. In this case,
|
||||
// firstTime will be set so that appropriate action can be taken (or not taken when
|
||||
// it's not set).
|
||||
//
|
||||
// Note that NativeRestore is always called on bootup.
|
||||
void NativeRestoreState(bool firstTime); // onCreate
|
||||
void NativeSaveState(); // onDestroy
|
||||
|
||||
// Calls back into Java / SDL
|
||||
// These APIs must be implemented by every port (for example app-android.cpp, PCMain.cpp).
|
||||
// You are free to call these.
|
||||
|
@ -2,6 +2,7 @@ set(SRCS
|
||||
lin/matrix4x4.cpp
|
||||
lin/vec3.cpp
|
||||
lin/quat.cpp
|
||||
lin/aabb.cpp
|
||||
)
|
||||
|
||||
set(SRCS ${SRCS})
|
||||
|
@ -2,8 +2,6 @@
|
||||
#include "input/input_state.h"
|
||||
#include "ui/screen.h"
|
||||
|
||||
ScreenManager screenManager;
|
||||
|
||||
Screen::Screen() { }
|
||||
Screen::~Screen() { }
|
||||
|
||||
|
@ -62,6 +62,3 @@ private:
|
||||
// Used for options, in-game menus and other things you expect to be able to back out from onto something.
|
||||
std::list<Screen *> dialog_;
|
||||
};
|
||||
|
||||
// Yeah, an old school non enforced singleton. Good enough (not?)
|
||||
extern ScreenManager screenManager;
|
||||
|
15
util/CMakeLists.txt
Normal file
15
util/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
set(SRCS
|
||||
bits/bits.cpp
|
||||
bits/varint.cpp
|
||||
random/perlin.cpp
|
||||
hash/hash.cpp
|
||||
)
|
||||
|
||||
set(SRCS ${SRCS})
|
||||
|
||||
add_library(util STATIC ${SRCS})
|
||||
|
||||
if(UNIX)
|
||||
add_definitions(-fPIC)
|
||||
endif(UNIX)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace varint {
|
||||
|
||||
void Encode32(uint32 value, char **dest) {
|
||||
void Encode32(uint32_t value, char **dest) {
|
||||
// Simple varint
|
||||
char *p = *dest;
|
||||
while (value > 127) {
|
||||
@ -13,8 +13,8 @@ void Encode32(uint32 value, char **dest) {
|
||||
*dest = p;
|
||||
}
|
||||
|
||||
uint32 Decode32(const char **ptr) {
|
||||
uint32 value = 0;
|
||||
uint32_t Decode32(const char **ptr) {
|
||||
uint32_t value = 0;
|
||||
const char *p = *ptr;
|
||||
while (true) {
|
||||
uint8 b = *p++;
|
||||
|
@ -1,12 +1,12 @@
|
||||
#ifndef _UTIL_BITS_VARINT
|
||||
#define _UTIL_BITS_VARINT
|
||||
|
||||
#include "base/base.h"
|
||||
#include "base/basictypes.h"
|
||||
|
||||
namespace varint {
|
||||
|
||||
void Encode32(uint32 value, char **dest);
|
||||
uint32 Decode32(const char **ptr);
|
||||
void Encode32(uint32_t value, char **dest);
|
||||
uint32_t Decode32(const char **ptr);
|
||||
|
||||
} // namespace varint
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "base/base.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "util/hash/hash.h"
|
||||
|
||||
namespace hash {
|
||||
|
Loading…
Reference in New Issue
Block a user