Commit graph

11 commits

Author SHA1 Message Date
Geoffrey Frogeye a02b0b656e Addedd best-score storage and more
* Removed FXSH_Build.bat as it changes for each installation of the SDK
* Now uses file \fls0\2048.sav that is 31 bytes (all aren't used, few more bytes will be added)
* Game_terminated() is now a variable for easier access and remove mess in code ordering
* Addedd debugMsg(unsigned char* message) for easier debugging
* Addedd Storage_saveAll() to save all the data (currently bestScore and currentScore)
* Addedd Storage_restore() to restore all the data (currently bestScore)
* Addedd placeholder one-time welcome screen
* Splitted Screen_actuate()
	* Fix unneeded animation time when starting new game
* Fixed score not being correctly calculated
* Splitted initGame()
	* Now it's Game_begin(), Game_reset(), Game_start(), Game_newGame()
	* Necessary for future game restoring mechanics
2014-04-13 23:54:06 +02:00
Geoffrey Frogeye 3bd4ed2edc Can be controlled with numbers
8 : UP, 6 : RIGHT, 2 : DOWN, 4 : LEFT
Nothing too difficult
Can be useful for broken devices, or hipsters
2014-04-08 21:48:53 +02:00
Geoffrey Frogeye 2f2a02f4f8 Made animation rely on RTC_getTicks()
Makes animation smoother, constant on every device and grid heavyness.
Set at 0.25s (0.25*128=32 ticks)
2014-04-08 21:25:29 +02:00
Geoffrey Frogeye f83d3e7785 Addedd transition for both merging tiles
* Added hasMoved and isNew attributes to Tile type
* Made obsolete arbitrary content in previousPosition
* Made code more robust to creation of new tiles
* Made some changes for and against the original code
2014-04-08 20:59:47 +02:00
Geoffrey Frogeye 69e8bafec1 Made SH4 compatible
Actually not tested but doesn't break SH3
2014-04-08 18:46:29 +02:00
Geoffrey Frogeye 4d1bc3fc4e Implemented true random
Finally
2014-04-08 18:15:23 +02:00
Geoffrey Frogeye 08888717c5 Implemented scores & local best score
* Should have been aligned on the right, but had issues with the log()
function
* Best score is currently reset every time you launch the game
* Removed useless project files
2014-04-08 18:09:21 +02:00
Geoffrey Frogeye 91e395a35e Fixed some game logic
* Each tile can only merge once per move
* Game update correctly after just moving
* Slowed down animation because it looked weird out of the emulator
* Fixed a single typo
2014-04-08 17:33:30 +02:00
Geoffrey Frogeye e363b2872b Addedd animations when moving tiles
Looks weird for merging animation, it's because one of the tiles isn't refered as its origin by the merged one, so it won't appears.
* Solution 1: Make a Grid with previous tiles of which animation is based with nextPosition instead
* Solution 2: Make two previousPosition. It does what the original one does, however less stable (affects every new tile definition)
2014-04-05 19:11:02 +02:00
Geoffrey Frogeye a1301e94a0 Prettyfication
Is that even a word?
No more french, no more useless comment, no more endless switch at beginning
2014-04-05 17:03:58 +02:00
Geoffrey Frogeye 1c49459f95 Initial commit
Game already kinda working.
Also include french, errors, different naming than original, mess, code poorness and dirt
2014-04-05 16:40:56 +02:00