mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-17 03:49:28 +00:00
Improve camera zooming behavior + camera related cleanups
- Now, the camera will now no longer be pulled towards the upper left or lower rigtht corner. - cameraPos was never used as an interpolating vector, cleaned up related code. - Core::invGlobalScale is now updated whenever Core::globalScale is changed (Not a nice solution but it does work) - Increase cull radius by 10%, should prevent tiles from disappearing when zoomed in a lot.
This commit is contained in:
parent
b501ba67e3
commit
2cec85fd05
11 changed files with 50 additions and 119 deletions
13
BBGE/Core.h
13
BBGE/Core.h
|
@ -1037,7 +1037,7 @@ public:
|
|||
void removeRenderObject(RenderObject *r, RemoveRenderObjectFlag flag = DESTROY_RENDER_OBJECT);
|
||||
|
||||
void setMouseConstraint(bool on);
|
||||
void setMouseConstraintCircle(int mouseCircle);
|
||||
void setMouseConstraintCircle(float mouseCircle);
|
||||
|
||||
void setReentryInputGrab(int on);
|
||||
|
||||
|
@ -1130,7 +1130,7 @@ public:
|
|||
|
||||
virtual void onPlayedVoice(const std::string &name){}
|
||||
|
||||
InterpolatedVector cameraPos;
|
||||
Vector cameraPos;
|
||||
|
||||
int fps;
|
||||
bool loopDone;
|
||||
|
@ -1174,13 +1174,14 @@ public:
|
|||
|
||||
bool minimized;
|
||||
std::string getEnqueuedJumpState();
|
||||
int cullRadius;
|
||||
float cullRadius;
|
||||
float cullRadiusSqr;
|
||||
Vector cullCenter;
|
||||
int screenCullX1, screenCullY1, screenCullX2, screenCullY2;
|
||||
unsigned int renderObjectCount, processedRenderObjectCount, totalRenderObjectCount;
|
||||
float invGlobalScale, invGlobalScaleSqr;
|
||||
|
||||
void globalScaleChanged();
|
||||
|
||||
void screenshot();
|
||||
|
||||
void clearRenderObjects();
|
||||
|
@ -1348,13 +1349,13 @@ protected:
|
|||
|
||||
std::string appName;
|
||||
bool mouseConstraint;
|
||||
int mouseCircle;
|
||||
float mouseCircle;
|
||||
|
||||
bool doMouseConstraint();
|
||||
|
||||
virtual void onMouseInput(){}
|
||||
bool doScreenshot;
|
||||
int baseCullRadius;
|
||||
float baseCullRadius;
|
||||
bool initSoundLibrary(const std::string &defaultDevice);
|
||||
bool initInputLibrary();
|
||||
bool initJoystickLibrary(int numSticks=1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue