Main change is switching the camera to use a rectangle. There is no rect
change in renderer for grouping size and position together. Due to
noticing the use case of rendering- where it's convenient to be able to
offset the rectangle from the position value when passed into the
function explicitly without having to re-create offset Rectangle structs
to pass in.
Begin switching over to using Rect instead of V4s for rectangle operations
for added semantics of pos and size, instead of 2 coordinate points. There
are more meaningful rectangle operations based on its position and
size. By providing that upfront it's more intuitive and convenient
than deducing size from subtracting two vector elements.
An attack spec will be used to hold the stats of both the attacker and
defender, grouping the data necessary to determine how much damage the
defender takes and other statuses caused by the attack.
Use event queue to decouple audio playback from the battle system. Switch
back to using begin and end attack within the entity update loop for
conciseness.
Until engine architecture can clearly be separated from the game, i.e.
notion of entity storage belonging to game and concept of entity belonging
to engine, worlds/scenes belonging to game or engine- the project will
only refer to Dengine.
On intermittent stop of OpenAL playback deleting the buffers without
unqueuing the current buffers is an invalid operation, causing invalid
audio states on alGetSource().
Audio can be played with 1 call, audio_beginVorbisStream which
encapsulates the initialisation of the renderer and release on finish.
OpenAL is quoted to have a limitation of around 32 sources. Audio
renderers hence acquire a source slot on playback and immediately release
on finish. This ensures that sources are held optimally and minimises the
possibility of saturating the available sources.
Renderers hold an index to the source list, which the index reveals the
source ID for their use.
Remove the use of beginAttack and endAttack in the entity update loop and
delegate all changes to entity through state switching. This
consolidates the flow of data in the loop more consistently by going
through one master function. This also minimises the number of
entry-points to functions that will update an entity states- for ease of
comprehension.
Notion of pivot point now for rotating, i.e. the anchor point at which
rotations are applied. Rotating the reticule is done by using inverse
trigonometry, namely atan2f.