Friday, September 08, 2006

SpriteEditor DS

Les choses prennent forme. Je peux éditer un sprite avec un outil 'crayon' ou 'block', et grâce au code de la "libfat" de chism & dragonminded, je peux charger et sauver mes sprites sur la carte SD.
J'ai rajouté hier une fonction "copier le sprite" en utilisant un truc venant de SCUMMVM (le moteur de jeux pointer-cliquer de Lucas Arts).

Un pression sur l'écran correspond à un clic simple, alors qu'une pression pendant que le bouton "L" est enfoncé correspond à un "clic droit". Pour la grille, celà correspond à prélever la couleur comme couleur en cours, et sur la table de sprites, à enregistrer la zone de travail.

Things starts getting in place ... i can edit the sprite (of course) using both 'pencil' and 'block' mode, and thanks to the "libfat" code from chishm and dragonminded, i can read sprite tables from the SD flash card and write them back. Yesterday, i've also been adding the "copy sprite" feature, using a trick found in SCUMMVM for DS (the maniac-mansion editor).

When you just click the screen, that's a regular click (GUI_CLICKED event in my engine), and if you click while pressing the "L" key, that's a GUI_ALT_CLICKED. So we now have a touchscreen with "left" and "right" click :P Right-clicking the grid is used to "pick" a color and right-clicking the sprite table is used to "save" the sprite edited.

Oh, and another goodie: just click "beyond" the current table to "extend" it with the newly saved sprite ...

Now the next step will be showing animations and supporting multi-layer sprites (with layer merging).

PS: avant ce post, il y avait mon skyblog. Les messages relatifs à la programmation DS ont été rassemblés dans ce post-anniversaire

No comments: