mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
Optimizations for Graphics.cpp
This commit is contained in:
parent
fd9805fd84
commit
71cc32c838
2 changed files with 8 additions and 8 deletions
|
|
@ -654,7 +654,7 @@ void Graphics::freeze(){
|
|||
p->compositeToBuffer(p->frozenScene);
|
||||
}
|
||||
|
||||
void Graphics::transition(int duration, const char *filename, int vague){
|
||||
void Graphics::transition(unsigned short duration, const char *filename, int vague){
|
||||
p->checkSyncLock();
|
||||
|
||||
if (!p->frozen)
|
||||
|
|
@ -783,14 +783,14 @@ void Graphics::setFrameRate(int value){
|
|||
p->fpsLimiter.setDesiredFPS(p->frameRate);
|
||||
}
|
||||
|
||||
void Graphics::wait(int duration){
|
||||
void Graphics::wait(unsigned int duration){
|
||||
for (int i = 0; i < duration; ++i){
|
||||
p->checkShutDownReset();
|
||||
p->redrawScreen();
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::fadeout(int duration){
|
||||
void Graphics::fadeout(unsigned int duration){
|
||||
FBO::unbind();
|
||||
|
||||
float curr = p->brightness;
|
||||
|
|
@ -816,7 +816,7 @@ void Graphics::fadeout(int duration){
|
|||
}
|
||||
}
|
||||
|
||||
void Graphics::fadein(int duration){
|
||||
void Graphics::fadein(unsigned int duration){
|
||||
FBO::unbind();
|
||||
|
||||
float curr = p->brightness;
|
||||
|
|
|
|||
|
|
@ -36,16 +36,16 @@ class Graphics{
|
|||
public:
|
||||
void update(bool limitFps = true);
|
||||
void freeze();
|
||||
void transition(int duration = 8, const char *filename = "", int vague = 40);
|
||||
void transition(unsigned short duration = 8, const char *filename = "", int vague = 40);
|
||||
void frameReset();
|
||||
|
||||
DECL_ATTR( FrameRate, int )
|
||||
DECL_ATTR( FrameCount, int )
|
||||
DECL_ATTR( Brightness, int )
|
||||
|
||||
void wait(int duration);
|
||||
void fadeout(int duration);
|
||||
void fadein(int duration);
|
||||
void wait(unsigned int duration);
|
||||
void fadeout(unsigned int duration);
|
||||
void fadein(unsigned int duration);
|
||||
|
||||
Bitmap *snapToBitmap();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue