mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
GRaphics module changes
This commit is contained in:
parent
7c9c892729
commit
0ef2aad0b8
2 changed files with 6 additions and 20 deletions
|
|
@ -52,14 +52,6 @@
|
||||||
|
|
||||||
#define DEF_FRAMERATE (60)
|
#define DEF_FRAMERATE (60)
|
||||||
|
|
||||||
#if defined _WIN32
|
|
||||||
#define OS_W32
|
|
||||||
#elif defined __APPLE__
|
|
||||||
#define OS_OSX
|
|
||||||
#else
|
|
||||||
#define OS_LINUX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct PingPong{
|
struct PingPong{
|
||||||
TEXFBO rt[2];
|
TEXFBO rt[2];
|
||||||
uint8_t srcInd, dstInd;
|
uint8_t srcInd, dstInd;
|
||||||
|
|
@ -438,8 +430,8 @@ struct GraphicsPrivate{
|
||||||
RGSSThreadData *threadData;
|
RGSSThreadData *threadData;
|
||||||
SDL_GLContext glCtx;
|
SDL_GLContext glCtx;
|
||||||
|
|
||||||
int frameRate;
|
unsigned int frameRate;
|
||||||
int frameCount;
|
unsigned int frameCount;
|
||||||
int brightness;
|
int brightness;
|
||||||
bool smooth;
|
bool smooth;
|
||||||
|
|
||||||
|
|
@ -738,7 +730,7 @@ void Graphics::transition(int duration, const char *filename, int vague){
|
||||||
simpleShader.setProg(prog);
|
simpleShader.setProg(prog);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef OS_LINUX
|
#ifndef __linux__ || BSD || __unix__
|
||||||
if (p->threadData->exiting) SDL_SetWindowOpacity(p->threadData->window, 1.0f - prog);
|
if (p->threadData->exiting) SDL_SetWindowOpacity(p->threadData->window, 1.0f - prog);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -906,10 +898,7 @@ void Graphics::reset(){
|
||||||
/* Dispose all live Disposables */
|
/* Dispose all live Disposables */
|
||||||
IntruListLink<Disposable> *iter;
|
IntruListLink<Disposable> *iter;
|
||||||
|
|
||||||
for (iter = p->dispList.begin();
|
for (iter = p->dispList.begin(); iter != p->dispList.end(); iter = iter->next){
|
||||||
iter != p->dispList.end();
|
|
||||||
iter = iter->next)
|
|
||||||
{
|
|
||||||
iter->data->dispose();
|
iter->data->dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,7 @@ class Graphics{
|
||||||
public:
|
public:
|
||||||
void update(bool limitFps = true);
|
void update(bool limitFps = true);
|
||||||
void freeze();
|
void freeze();
|
||||||
void transition(int duration = 8,
|
void transition(int duration = 8, const char *filename = "", int vague = 40);
|
||||||
const char *filename = "",
|
|
||||||
int vague = 40);
|
|
||||||
void frameReset();
|
void frameReset();
|
||||||
|
|
||||||
DECL_ATTR( FrameRate, int )
|
DECL_ATTR( FrameRate, int )
|
||||||
|
|
@ -68,8 +66,7 @@ public:
|
||||||
/* Repaint screen with static image until exitCond
|
/* Repaint screen with static image until exitCond
|
||||||
* is set. Observes reset flag on top of shutdown
|
* is set. Observes reset flag on top of shutdown
|
||||||
* if "checkReset" */
|
* if "checkReset" */
|
||||||
void repaintWait(const AtomicFlag &exitCond,
|
void repaintWait(const AtomicFlag &exitCond, bool checkReset = true);
|
||||||
bool checkReset = true);
|
|
||||||
|
|
||||||
const TEX::ID &obscuredTex() const;
|
const TEX::ID &obscuredTex() const;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue