GearLoader 1.1.0
Mod loader for GGXXACPR
Loading...
Searching...
No Matches
ggxxacpr::Camera Class Reference

Public Member Functions

 Camera (GGXXACPR_Camera *ref=nullptr)
GGXXACPR_CameragetRaw ()
WorldCoordinate position ()
 the camera position in world coordinates.
int left ()
 X-coordinate of the left edge of the screen.
int right ()
 X-coordinate of the right edge of the screen.
int top ()
 Y-coordinate of the top edge of the screen.
int bottom ()
 Y-coordinate of the bottom edge of the screen.
WorldCoordinate size ()
 Camera size dimensions in world coordinates.
float zoom ()
 The zoom factor of the camera.
float zoomTimer ()
 The delay timer before the camera begins to zoom in.

Constructor & Destructor Documentation

◆ Camera()

ggxxacpr::Camera::Camera ( GGXXACPR_Camera * ref = nullptr)
inline
608 : raw(ref) {};

Member Function Documentation

◆ bottom()

int ggxxacpr::Camera::bottom ( )
inline

Y-coordinate of the bottom edge of the screen.

631{ return raw->cameraYPos_actual + (raw->cameraHeight / 12); }

◆ getRaw()

GGXXACPR_Camera * ggxxacpr::Camera::getRaw ( )
inline
609{ return raw; }

◆ left()

int ggxxacpr::Camera::left ( )
inline

X-coordinate of the left edge of the screen.

625{ return raw->leftEdgePos; }

◆ position()

WorldCoordinate ggxxacpr::Camera::position ( )
inline

the camera position in world coordinates.

This position is the center point of the visible screen for the X-axis and about 1/6th from the bottom edge for the Y-axis such that it aligns with the ground.

618 {
619 return {
620 raw->cameraXPos_actual,
621 raw->cameraYPos_actual
622 };
623 }

◆ right()

int ggxxacpr::Camera::right ( )
inline

X-coordinate of the right edge of the screen.

627{ return left() + raw->cameraWidth_actual; }
int left()
X-coordinate of the left edge of the screen.
Definition ggxxacpr.hpp:625

◆ size()

WorldCoordinate ggxxacpr::Camera::size ( )
inline

Camera size dimensions in world coordinates.

635 {
636 return {
637 static_cast<int>(raw->cameraWidth_actual),
638 static_cast<int>(raw->cameraHeight)
639 };
640 }

◆ top()

int ggxxacpr::Camera::top ( )
inline

Y-coordinate of the top edge of the screen.

629{ return bottom() - raw->cameraHeight; }
int bottom()
Y-coordinate of the bottom edge of the screen.
Definition ggxxacpr.hpp:631

◆ zoom()

float ggxxacpr::Camera::zoom ( )
inline

The zoom factor of the camera.

camera size = base size / zoom

646 {
647 return raw->zoom;
648 }

◆ zoomTimer()

float ggxxacpr::Camera::zoomTimer ( )
inline

The delay timer before the camera begins to zoom in.

650 {
651 return raw->zoomTimer;
652 }

The documentation for this class was generated from the following file: