Skip to content

Commit

Permalink
Fix various issues that prevented TFS running on actual HW
Browse files Browse the repository at this point in the history
For one, flash memory was being decimated by all sprites being included by three different translation units. Specifying namespace on string usage should also fix compiler errors in some environments.
  • Loading branch information
halworsen committed Mar 25, 2021
1 parent d7e0442 commit a406086
Show file tree
Hide file tree
Showing 10 changed files with 4,895 additions and 4,876 deletions.
1 change: 1 addition & 0 deletions tfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ OBJECTS += states/playing.o
OBJECTS += states/gameover.o
OBJECTS += states/tutorial.o
OBJECTS += display/sprite.o
OBJECTS += resources/sprites.o

###############################################################################
# Boiler-plate
Expand Down
2 changes: 2 additions & 0 deletions tfs/display/sprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

extern Pokitto::Core game;

extern const uint8_t sprites[243][258];

Sprite::Sprite(
uint8_t sprite_width,
uint8_t sprite_height,
Expand Down
5 changes: 5 additions & 0 deletions tfs/game.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
#ifndef GAME_H
#define GAME_H

#define TIME_LIMIT 120000 // 2 minutes in milliseconds
#define GAME_FRAMERATE 60

#endif
Loading

0 comments on commit a406086

Please sign in to comment.