Bon, ben là je rentre encore à nouveau dans une nouvelle dimension :
Quand je trace ce code :
/***************************************************
* alloc 4 planes : 2 for grays + 2 tmp
* clear them and enable grays
***************************************************/
void* PlanesHdPtr; //points to the planes handle
void* PlanesPtr; //ptr to the planes in the handle
if ((PlanesHdPtr = HeapAllocPtr(LCD_SIZE*4+8)) == NULL) //try to alloc planes to save work
{
ST_helpMsg("Not enough RAM to run GrayTool"); //else display a message,
ngetchx(); //wait for a key,
return; //and quit
}
PlanesPtr = ((void*)((long)(PlanesHdPtr + 7) & ~7)); //8x alignment for HW1
memset(PlanesPtr,0,LCD_SIZE*4); //clear planes
GribOn(PlanesPtr+LCD_SIZE,PlanesPtr); //and set up grays
/***************************************************
* Init some vars to draw
***************************************************/
Datat DrawingData = //default value.
{
{LCD_WIDTH/2,LCD_HEIGHT/2,LCD_WIDTH/2,LCD_HEIGHT/2},
A_XOR,A_XOR,A_NORMAL,A_NORMAL,A_NORMAL,A_NORMAL,
A_NORMAL,A_NORMAL,A_NORMAL,A_NORMAL,A_NORMAL,A_NORMAL,
TOOL_DOT,CURSOR_0,FLAGS_DEFAULT,CIRCLE_RADIUS,ELLIPSE_AXE_1,ELLIPSE_AXE_2,{{0,0,239,127}}
};
short OrgInitDelay = OSInitKeyInitDelay(40); //keyboard speed. AMS settings are to slow
short OrgRepeatDelay = OSInitBetweenKeyDelay(20);
L'affectation de DrawingData est purement et simplement zappée... Et dans la liste des variables (dans GDB), tous les membres de la structure sont à 0, rien n'a été initialisé.
Encore une merde de déclaration foireuse ?