28 #ifndef AGS_ENGINE_GAME_VIEWPORT_H 29 #define AGS_ENGINE_GAME_VIEWPORT_H 31 #include "common/std/memory.h" 32 #include "common/std/vector.h" 33 #include "ags/shared/util/geometry.h" 34 #include "ags/shared/util/scaling.h" 52 return !weak.
owner_before(wt{}) &&!wt{} .owner_before(weak);
66 inline int GetID()
const {
72 const Rect &GetRect()
const;
74 void SetSize(
const Size sz);
76 void SetAt(
int x,
int y);
78 bool IsLocked()
const;
82 void LockAt(
int x,
int y);
87 void LinkToViewport(ViewportRef viewport);
89 void UnlinkFromViewport(
int id);
94 inline bool HasChangedPosition()
const {
95 return _hasChangedPosition;
97 inline bool HasChangedSize()
const {
98 return _hasChangedSize;
101 void ClearChangedFlags() {
102 _hasChangedPosition =
false;
103 _hasChangedSize =
false;
111 bool _locked =
false;
115 bool _hasChangedPosition =
false;
116 bool _hasChangedSize =
false;
131 inline int GetID()
const {
137 inline const Rect &GetRect()
const {
145 void SetRect(
const Rect &rc);
147 void SetSize(
const Size sz);
149 void SetAt(
int x,
int y);
152 bool IsVisible()
const {
156 void SetVisible(
bool on);
158 int GetZOrder()
const {
162 void SetZOrder(
int zorder);
165 void AdjustTransformation();
167 PCamera GetCamera()
const;
170 void LinkCamera(PCamera cam);
175 VpPoint RoomToScreen(
int roomx,
int roomy,
bool clip =
false)
const;
179 VpPoint ScreenToRoom(
int scrx,
int scry,
bool clip =
false,
bool convert_cam_to_data =
false)
const;
182 inline bool HasChangedPosition()
const {
183 return _hasChangedPosition;
185 inline bool HasChangedSize()
const {
186 return _hasChangedSize;
188 inline bool HasChangedVisible()
const {
189 return _hasChangedVisible;
191 inline void SetChangedVisible() {
192 _hasChangedVisible =
true;
195 inline void ClearChangedFlags() {
196 _hasChangedPosition =
false;
197 _hasChangedSize =
false;
198 _hasChangedVisible =
false;
203 VpPoint ScreenToRoomImpl(
int scrx,
int scry,
bool clip,
bool convert_cam_to_data);
215 bool _visible =
true;
218 bool _hasChangedPosition =
false;
219 bool _hasChangedOffscreen =
false;
220 bool _hasChangedSize =
false;
221 bool _hasChangedVisible =
false;
226 #endif // AGS_ENGINE_AC_VIEWPORT_H
bool owner_before(const WeakPtr< T2 > &other) const
Definition: ptr.h:474
Definition: viewport.h:128
Definition: viewport.h:63
Definition: scaling.h:108
Definition: geometry.h:215
Definition: geometry.h:144