It also auto calculates the sizes for you now too

Moderator: Benj
Code: Select all
//AddHeader Added Content
const char Image0[8] = {1,2,3,4,5,6,7,8};
const char Image1[4] = {1,2,3,4};
//AddHeader Added Content End
Code: Select all
switch (FCL_IMAGEINDEX)
{
case 1:
{
#if (1) // 2 > 1
FCV_RETURN = Image1[FCL_DATAPOINTER];
// #else
//Code has been optimised out by the pre-processor
#endif
break;
}
case 2:
{
#if (0) // 2 > 2
//Code has been optimised out by the pre-processor
// #else
#endif
break;
}
case 3:
{
#if (0) // 2 > 3
//Code has been optimised out by the pre-processor
// #else
#endif
break;
}
default:
{
#if (1) // 2 > 0
FCV_RETURN = Image0[FCL_DATAPOINTER];
// #else
//Code has been optimised out by the pre-processor
#endif
}
}
Code: Select all
char const unsigned Image1[]={75,165,10,153,74,169,74,173,73,165,42,153,241,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,09,161,138,193,43,234,235,209,138,189,138,185,170,197,11,226,11,222,41,161,51,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,157,43,230,170,193,138,189,11,226,108,250,108,254,76,246,0,0,0};
char const unsigned Image2[] =
{255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,239,189,157,243,90,235,83,202,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,
255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,239,189,157,243,90,235,83,202,255,127,255,127,255,127,255,127,255,127,255,127,255,127,
255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127};
char const unsigned Image3[] =
{,150,255,150,255,238,185,192,253,192,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,126,96,254,96,254,
128,254,128,254,160,254,160,254,192,254,192,254,224,254,0,127,0,0,64,125,32,253,32,253,64,253,64,253,96,253,96,253,128,253,128,253,173,169,150,255,150,255,15,190,192,253,192,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,96,254,128,254,128,254,160,254,160,254,192,254,192,254,192,254,224,254,224,126,0,0,32,125,32,253,64,253,64,253,96,253,96,253,96,253,128,253};
Code: Select all
FCV_RETURN = Image1[FCL_DATAPOINTER];
Code: Select all
FCV_RETURN = Image2[FCL_DATAPOINTER];
Code: Select all
FCV_RETURN = Image3[FCL_DATAPOINTER];
Code: Select all
Flowcode1.c:
84: char const unsigned Image1[]={75,165,10,153,74,169,74,173,73,165,42,153,241,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,09,161,138,193,43,234,235,209,138,189,138,185,170,197,11,226,11,222,41,161,51,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,157,43,230,170,193,138,189,11,226,108,250,108,254,76,246,0,0,0};
^ (1098) conflicting declarations for variable "Image1" (Flowcode1.c:68)
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]
C:\Program Files (x86)\Flowcode\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1
Code: Select all
Flowcode1.c:
72: char const unsigned Image1[]={75,165,10,153,74,169,74,173,73,165,42,153,241,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,09,161,138,193,43,234,235,209,138,189,138,185,170,197,11,226,11,222,41,161,51,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,157,43,230,170,193,138,189,11,226,108,250,108,254,76,246,0,0,0};
(223) digit out of range ^
Flowcode1.c: FCD_040e1_CGenDemo1__ShowImage()
115: FCV_RETURN = Image1[FCL_DATAPOINTER];
^ (192) undefined identifier "FCV_RETURN"
^ (192) undefined identifier "FCL_DATAPOINTER"
128: FCV_RETURN = Image2[FCL_DATAPOINTER];
^ (192) undefined identifier "FCV_RETURN"
^ (192) undefined identifier "FCL_DATAPOINTER"
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]
C:\Program Files (x86)\Flowcode\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1
FINISHED
Code: Select all
FCV_RETURN = Image1[FCL_DATAPOINTER];
Code: Select all
FCL_RETURN = Image1[FCL_DATAPOINTER];
Yes I believe I did, but there are so many macros I should have said, sorry.Benj wrote:Did you send me the right file?
The Code within switch statement is inBenj wrote:where in your project do you reference the Image1
Code: Select all
StoreBitmapData
Fantastic, Thanks Ben you're a star.Benj wrote:'ll make the changes for you just need to know where to look.
Code: Select all
Component 480 x 275 47K40 Test1.c: FCD_00fa1_FT810__StoreBitmapData()
3499: FCL_DATA = Image4[FCL_DATAPOINTER];
^ (192) undefined identifier "Image4"
(981) pointer required ^
(981) pointer required ^
Component 480 x 275 47K40 Test1.c: main()
4285: FCD_00fa1_FT810__Initialise();
^ (361) function declared implicit int (warning)
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]
C:\Program Files (x86)\Flowcode\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1