Hi, this time i'm presenting a new SDL port of a clone of the world famous classic board game: 'Mahjong solitaire'
http://en.wikipedia.org/wiki/Mahjong_solitaire.
The original game is this one initially developed for linux:
http://www.linuxmotors.com/sdllopan/ and called 'sdllopan' by Dave Ashley in 1999. See more on his Linux Zone:
http://www.linuxmotors.com/.
Btw: i've also ported some time ago the sdl 'fire demo' from the same author, which you can find here:
http://www.omnimaga.org/index.php?PHPSESSID=f0e6ee0b3f490297f0f5aba8f9f52a6e&topic=14288.msg262928#msg262928and the port to ndless was just a breeze...
Well this time around, things (the port) were quite a bit more complicated, namely because:
1. due to the small lcd screen we'll have some eye pain to clear distinguish the tiles. Here i could use some help from some artists (Hayleia maybe?) willing to contribute with better looking tiles drawings.
2. this app originally uses the mouse and in ndless/emulator we don't have it
. So we need to emulate it with keys (using 'SDL_WarpMouse' etc).
3. It creates its own font for text, but that didn't work properly in ndless either. So i had to change it to use hoffa's 'nSDL_LoadFont' + 'nSDL_DrawString'.
4. as the sdl video memory is being directly pixel-manipulated the code is written to support the 16-bit bit-depth and i do not intend to support also the non-cx models. sorry about that.
Ok, let's go straight to the 'how to use the thing':
I - First, in the calc create a folder inside 'ndless' and name it 'nMah' (or whatever). Inside 'nMah' create another folder 'Data' (this name is fixed!)
Upload to the calc:
a. the program 'nMah.tns' to the 'ndless/nMah' folder.
b. the program's data files (tiles + several backgorunds) to 'ndless/nMah/Data' folder.
II- Keys/Instructions:
---------- cut here ------------>
"Mouse- emulation"
Movement: key_left, key_right, key_up, key_down or key_4, key_6, key_8, key_2
Click: key_5 (ONLY!) dunno how to handle nspire-click key via SDL (maybe hoffa could help here?
)
key_return: shuffles the titles and restarts a new game.
key_7: changes tile-set (we only have 2 at the moment)
key_9: changes background (we have 10 available)
key_1: Undo
key_3: Redo
key_esc: Quit
<---------- cut here ------------
Have more fun,
SpiroH