Omnimaga
Calculator Community => Casio Calculators => Topic started by: helder7 on April 01, 2012, 06:21:17 pm
-
Hello, i tried convert sprites with cemetech sourcecoder, for use in an application developed with miniSDK
to show images, i used the routine CopySprite by Kerm:
void CopySprite(const void* datar, int x, int y, int width, int height) {
color_t*data = (color_t*) datar;
color_t* VRAM = (color_t*)0xA8000000;
VRAM += LCD_WIDTH_PX*y + x;
for(int j=y; j<y+height; j++) {
for(int i=x; i<x+width; i++) {
*(VRAM++) = *(data++);
}
VRAM += LCD_WIDTH_PX-width;
}
}
I called the image with the following function
void xxx() {
Bdisp_EnableColor(1);
CopySprite(spritename, 0, 0, 40, 40);
Bdisp_PutDisp_DD();
}
but, when i compile the source, the sdk gives me the following errors:
Execute: C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT.INI
"C:\Users\HELDER\Documents\CASIO\MiniSDK\BIN\SHCPP.EXE" -SUB=TEMP.TXT INSIGHT 000E12F2
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(29) : C5020 (E) Identifier "color_t" is undefined
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(29) : C5020 (E) Identifier "data" is undefined
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(29) : C5029 (E) Expected an expression
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(29) : C5065 (E) Expected a ";"
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(30) : C5020 (E) Identifier "VRAM" is undefined
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(30) : C5029 (E) Expected an expression
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(30) : C5065 (E) Expected a ";"
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(31) : C5020 (E) Identifier "LCD_WIDTH_PX" is undefined
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(269) : C5192 (W) Unrecognized character escape sequence
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(365) : C5020 (E) Identifier "Bdisp_EnableColor" is undefined
C:\Users\HELDER\Documents\CASIO\MiniSDK\projects\INSIGHT\INSIGHT.CPP(393) : C5020 (E) Identifier "Bdisp_EnableColor" is undefined
Dependency: "C:\Users\HELDER\Documents\CASIO\MiniSDK\objects\INSIGHT.obj" does not exist!
Dependency: "C:\Users\HELDER\Documents\CASIO\MiniSDK\objects\INSIGHT.obj" does not exist!
Ready
someone can help me?
-
You're missing an include file which defines some of these things. I'm thinking it's one (or more) of these three: display_syscalls.h, display.h, and/or disp_tools.hpp.
-
You're missing an include file which defines some of these things. I'm thinking it's one (or more) of these three: display_syscalls.h, display.h, and/or disp_tools.hpp.
I have all these files
(http://i.imgur.com/1NtVQ.jpg)
-
color_t seems to be unsigned short
LCD_WIDTH_PX should be 0x180
Bdisp_EnableColor is EnableColor with the miniSDK.
-
Color= insigned short
-
when I call the image, it is always is behind the G3A_main
(http://i.imgur.com/E03S9.gif)
function to call the image:
void image() {
Bdisp_AllClr_VRAM();
EnableColor(1);
CopySprite(prizma, 0, 0, 319, 186);
Bdisp_PutDisp_DD();
}
POST EDITED: bug fixed
void image() {
int key;
Bdisp_AllClr_VRAM();
EnableColor(1);
CopySprite(prizma, 0, 0, 319, 186);
Bdisp_PutDisp_DD();
GetKey( &key );
}
now i need a way to clear the Status Area, does anyone know?
-
You will find some information in fx_calculators_SuperH_based_10.chm.
see fx-CG20 - Syscalls, display
F. i. syscall: 0x02B7, 0x02B8, 0x02B9, 0x02BA, 0x02BB, 0x1D7B, 0x1D81, 0x1D86.
As for application examples investigate INSIGHT.CPP.