mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2025-04-20 01:47:34 +02:00
Still trying to fix my image_t problems ...
This commit is contained in:
parent
ea66f50f44
commit
5c02111ac2
1 changed files with 9 additions and 5 deletions
|
@ -183,22 +183,26 @@ int _choices_amount, _default_choice;
|
||||||
#ifdef FXCG50
|
#ifdef FXCG50
|
||||||
#include <gint/image.h>
|
#include <gint/image.h>
|
||||||
image_t vram_part_reference;
|
image_t vram_part_reference;
|
||||||
image_t vram_part;
|
image_t *vram_part = NULL;
|
||||||
#else
|
#else
|
||||||
// Really need to code this!
|
// Really need to code this!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void store_vram_part(int x, int y, int w, int h) {
|
void store_vram_part(int x, int y, int w, int h) {
|
||||||
#ifdef FXCG50
|
#ifdef FXCG50
|
||||||
|
if(image_valid(vram_part)) image_free(vram_part);
|
||||||
image_sub(image_create_vram(), x, y, w, h, &vram_part_reference);
|
image_sub(image_create_vram(), x, y, w, h, &vram_part_reference);
|
||||||
image_copy(&vram_part_reference, &vram_part, true);
|
vram_part = image_create(w, h, IMAGE_RGB565);
|
||||||
|
if(vram_part){
|
||||||
|
image_copy(&vram_part_reference, vram_part, true);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
// Really need to code this!
|
// Really need to code this!
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void restore_vram_part(int x, int y) {
|
void restore_vram_part(int x, int y) {
|
||||||
#ifdef FXCG50
|
#ifdef FXCG50
|
||||||
dimage(x, y, &vram_part);
|
dimage(x, y, vram_part);
|
||||||
#else
|
#else
|
||||||
// Really need to code this!
|
// Really need to code this!
|
||||||
#endif
|
#endif
|
||||||
|
@ -258,7 +262,7 @@ int _choice_call_before_end(Game *game) {
|
||||||
}while(key != KEY_EXE);
|
}while(key != KEY_EXE);
|
||||||
/* Make a little animation because we looove little animations ;) */
|
/* Make a little animation because we looove little animations ;) */
|
||||||
for(i=DWIDTH/8+1;i>0;i--){
|
for(i=DWIDTH/8+1;i>0;i--){
|
||||||
restore_vram_part(0, (BOX_HEIGHT+1)*PXSIZE+40);
|
restore_vram_part(0, (BOX_HEIGHT+1)*PXSIZE);
|
||||||
drect(0, BOX_HEIGHT*PXSIZE, i*(DWIDTH/8),
|
drect(0, BOX_HEIGHT*PXSIZE, i*(DWIDTH/8),
|
||||||
(BOX_HEIGHT+CHOICE_BOX_HEIGHT)*PXSIZE, C_WHITE);
|
(BOX_HEIGHT+CHOICE_BOX_HEIGHT)*PXSIZE, C_WHITE);
|
||||||
drect(i*(DWIDTH/8), BOX_HEIGHT*PXSIZE, i*(DWIDTH/8)+PXSIZE,
|
drect(i*(DWIDTH/8), BOX_HEIGHT*PXSIZE, i*(DWIDTH/8)+PXSIZE,
|
||||||
|
@ -270,7 +274,7 @@ int _choice_call_before_end(Game *game) {
|
||||||
game->frame_duration = 0;
|
game->frame_duration = 0;
|
||||||
}
|
}
|
||||||
#ifdef FXCG50
|
#ifdef FXCG50
|
||||||
//
|
if(image_valid(vram_part)) image_free(vram_part);
|
||||||
#else
|
#else
|
||||||
// Really need to code this!
|
// Really need to code this!
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue