Commit Graph

9 Commits

Author SHA1 Message Date
Ólafur Waage 55fbb53591 Refactoring Game and GameState. Moving game state update logic into that class. Game is now only event loop. 2021-09-07 16:00:19 +02:00
Ólafur Waage fe32b18d0c Isolating SFML to the Canvas class. 2021-09-06 15:38:40 +02:00
Patricia Aas e5e46a0e65 Create GameState 2021-07-08 16:57:18 +02:00
Corentin Jabot cbd19df739 Implement scaling.
We render pack man at twice the size that we want on screen,
which is the native resolution of the asset file.
The maze is upscaled.
We then project everything onto a view which is applies
the scale factor.

This patches also dectect the appropriate scale on OSX.
This required a bit of objective C (scaling.mm),
but students should not look at this file and there
is a comment in that direction.
Scalling.cpp provides the default implementation
for other platforms.
2021-07-07 21:32:22 +02:00
Patricia Aas 705ea717e1 Introduce a scale function and clean up 2021-07-07 11:25:13 +02:00
Patricia Aas ce7dd70332 Very rough stab at scaling 2021-07-07 11:25:13 +02:00
Patricia Aas 30f69464dd Move over to size_t 2021-07-06 12:35:23 +02:00
Corentin Jabot 60095363f4 Put the code in a namespace 2021-07-05 14:10:01 +02:00
Corentin Jabot 727a2c5e76 Create an include 2021-07-05 12:02:36 +02:00
Renamed from lib/Canvas.hpp (Browse further)