1

j essaie de me mettre au C (à la bonne heure)
mais j'ai quelques difficultes
voila mon prog d'essai:#define SAVE_SCREEN

#include<all.h>
int _ti89;

#define Q89_92(x,y)(x)
SCR_RECT zone = {{0,0,159,99}};

//Main program
void _main(void)
{
char plan0[BITMAP_HDR_SIZE +160*100/8];
char plan1[BITMAP_HDR_SIZE +160*100/8];
short quitter,key;
INT_HANDLER save_int_1;

GrayMode(GRAY_ON);
FontSetSys(F_4x6);
for(key=0;key<2;key++)
{
SetPlane(key);
ClrScr();
}

save_int_1 = GetIntVec(AUTO_INT_1);
SetIntVec(AUTO_INT_1,DUMMY_HANDLER);
SetPlane(0);
DrawStr(Q89_92(30,70),Q89_92(80,93),"Moi",A_NORMAL);
BitmapGet(&zone,plan0);
SetPlane(1);
BitmapGet(&zone,plan1);
ClrScr();
BitmapPut(0,0,plan1,&zone,A_REPLACE);
SetPlane(0);
BitmapPut(0,0,plan0,&zone,A_REPLACE);

quitter=0;
while(quitter!=1)
{
if(_rowread(0x23F)&0x1)
{
quitter=1;
}
}

GrayMode(GRAY_OFF);

SetIntVec(AUTO_INT_1,save_int_1);

}


la premiere fois ca marche bien , mais dès que j'le relance ca foire
peut-on me dire pourquoi ca plante??????

2

Utilises les tags pre pour indenter le code wink

3

je sais pas trop si ton pb vient de là, mais vérifie que la taille que tu réserve pour la sauvegarde avec BitmapGet est suffisante pour enregsiter ce que tu met dedans...
avatar
Tutorial C (TI-89/92+/v200) - Articles Développement Web (PHP, Javascript, ...)
« What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against? » - Larry Wall

4

>ZdRUbAl: Utilises les tags pre pour indenter le code wink
Pas besoin d'indenter. wink

Mais pour répondre à la question d'origine:
save_int_1 = GetIntVec(AUTO_INT_1);
SetIntVec(AUTO_INT_1,DUMMY_HANDLER);

devrait être devant:
GrayMode(GRAY_ON);
avatar
Mes news pour calculatrices TI: Ti-Gen
Mes projets PC pour calculatrices TI: TIGCC, CalcForge (CalcForgeLP, Emu-TIGCC)
Mes chans IRC: #tigcc et #inspired sur irc.freequest.net (UTF-8)

Liberté, Égalité, Fraternité

5

arf... ct donc pas le pb habituel sad
avatar
Tutorial C (TI-89/92+/v200) - Articles Développement Web (PHP, Javascript, ...)
« What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against? » - Larry Wall