Cela ne marche pas et malheureusement je dois partir en déplacement pour 4 jours sans PC pour faire de nouvelles tentatives
Avec ma dernière tentative vite fait je pense que trop de chose entre la méthode de vince et la tienne Philippe entre en collision.
Je me re-penche sérieusement dessus à mon retour.
Voici ma dernière tentative foireuse
[source=as3]#include <stdlib.h>
#include <lynx.h>
#include <lynxlib.h>
#include "inc\c0.pal"
#define JOY_RIGHT 0x10
#define JOY_LEFT 0x20
#define JOY_DOWN 0x40
#define JOY_UP 0x80
#define BUTTON_OPTION1 0x08
#define BUTTON_OPTION2 0x04
#define BUTTON_INNER 0x02
#define BUTTON_OUTER 0x01
#define BUTTON_PAUSE 0x01
char SCREEN[8160] at (MEMTOP-16320);
char RENDER[8160] at (MEMTOP-8160);
// ------------------------------------
int score, unite, dizaine;
char compteur;
// clip du sprite chiffres: 0123456789
extern uchar c0[];
extern uchar c1[];
extern uchar c2[];
extern uchar c3[];
extern uchar c4[];
extern uchar c5[];
extern uchar c6[];
extern uchar c7[];
extern uchar c8[];
extern uchar c9[];
uchar *chtab[10] = {c0, c1, c2, c3, c4, c5, c6, c7, c8,c9};
uchar _SCB_UNITES[]; // déclaration d'un nouveau controleur de sprite
uchar _SCB_DIZAINES[]; // déclaration d'un nouveau controleur de sprite
#asm
_SCB_UNITES
dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
_SCB_DIZAINES
dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc0[];
#asm
_SCBc0 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc1[];
#asm
_SCBc1 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc2[];
#asm
_SCBc2 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc3[];
#asm
_SCBc3 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc4[];
#asm
_SCBc4 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc5[];
#asm
_SCBc5 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc6[];
#asm
_SCBc6 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc7[];
#asm
_SCBc7 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc8[];
#asm
_SCBc8 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc9[];
#asm
_SCBc9 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
// ------------------------------------
int i;
void Vsync()
{
#asm
vretrace:
lda $fd0a
bne vretrace
#endasm
}
char main()
{
InitIRQ();
CLI;
SetBuffers(SCREEN, RENDER ,0);
SetRGB(c0_pal);
SCBNEXT(_SCB_UNITES) = _SCB_DIZAINES;
SCBX(SCB_UNITES) = 81;
SCBY(SCB_UNITES) = 50;
SCBX(SCB_DIZAINES) = 74;
SCBY(SCB_DIZAINES) = 50;
compteur=99;
SCBDATA(SCBc0) = c0;
SCBDATA(SCBc1) = c1;
SCBDATA(SCBc2) = c2;
SCBDATA(SCBc3) = c3;
SCBDATA(SCBc4) = c4;
SCBDATA(SCBc5) = c5;
SCBDATA(SCBc6) = c6;
SCBDATA(SCBc7) = c7;
SCBDATA(SCBc8) = c8;
SCBDATA(SCBc9) = c9;
char compteur;
SCBX(SCB_UNITES) = 81;
SCBY(SCB_UNITES) = 50;
SCBX(SCB_DIZAINES) = 74;
SCBY(SCB_DIZAINES) = 50;
for(compteur=99;compteur>=0;compteur--){
unite = compteur% 10;
dizaine = compteur/ 10 % 10;
SCBDATA(_SCB_UNITES) = chtab[unite%10];
SCBDATA(_SCB_DIZAINES) = chtab[dizaine%10];
DrawSprite(SCB_UNITES); // un seul drawsprite jean philipe
for (char i=0;i<120;i++) vsync();//si tu veux le temps de lire ton compteur...
SwapBuffers();
}
}}[/source][source=as3]#include <stdlib.h>
#include <lynx.h>
#include <lynxlib.h>
#include "inc\c0.pal"
#define JOY_RIGHT 0x10
#define JOY_LEFT 0x20
#define JOY_DOWN 0x40
#define JOY_UP 0x80
#define BUTTON_OPTION1 0x08
#define BUTTON_OPTION2 0x04
#define BUTTON_INNER 0x02
#define BUTTON_OUTER 0x01
#define BUTTON_PAUSE 0x01
char SCREEN[8160] at (MEMTOP-16320);
char RENDER[8160] at (MEMTOP-8160);
// ------------------------------------
int score, unite, dizaine;
char compteur;
// clip du sprite chiffres: 0123456789
extern uchar c0[];
extern uchar c1[];
extern uchar c2[];
extern uchar c3[];
extern uchar c4[];
extern uchar c5[];
extern uchar c6[];
extern uchar c7[];
extern uchar c8[];
extern uchar c9[];
uchar *chtab[10] = {c0, c1, c2, c3, c4, c5, c6, c7, c8,c9};
uchar _SCB_UNITES[]; // déclaration d'un nouveau controleur de sprite
uchar _SCB_DIZAINES[]; // déclaration d'un nouveau controleur de sprite
#asm
_SCB_UNITES
dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
_SCB_DIZAINES
dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc0[];
#asm
_SCBc0 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc1[];
#asm
_SCBc1 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc2[];
#asm
_SCBc2 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc3[];
#asm
_SCBc3 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc4[];
#asm
_SCBc4 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc5[];
#asm
_SCBc5 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc6[];
#asm
_SCBc6 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc7[];
#asm
_SCBc7 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc8[];
#asm
_SCBc8 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
extern char SCBc9[];
#asm
_SCBc9 dc.b $c7,$10,$20
dc.w 0,0
dc.w 0,0,$100,$100
dc.b $01,$23,$45,$67,$89,$ab,$cd,$ef
#endasm
// ------------------------------------
int i;
void Vsync()
{
#asm
vretrace:
lda $fd0a
bne vretrace
#endasm
}
char main()
{
InitIRQ();
CLI;
SetBuffers(SCREEN, RENDER ,0);
SetRGB(c0_pal);
SCBNEXT(_SCB_UNITES) = _SCB_DIZAINES;
SCBX(SCB_UNITES) = 81;
SCBY(SCB_UNITES) = 50;
SCBX(SCB_DIZAINES) = 74;
SCBY(SCB_DIZAINES) = 50;
compteur=99;
SCBDATA(SCBc0) = c0;
SCBDATA(SCBc1) = c1;
SCBDATA(SCBc2) = c2;
SCBDATA(SCBc3) = c3;
SCBDATA(SCBc4) = c4;
SCBDATA(SCBc5) = c5;
SCBDATA(SCBc6) = c6;
SCBDATA(SCBc7) = c7;
SCBDATA(SCBc8) = c8;
SCBDATA(SCBc9) = c9;
char compteur;
SCBX(SCB_UNITES) = 81;
SCBY(SCB_UNITES) = 50;
SCBX(SCB_DIZAINES) = 74;
SCBY(SCB_DIZAINES) = 50;
for(compteur=99;compteur>=0;compteur--){
unite = compteur% 10;
dizaine = compteur/ 10 % 10;
SCBDATA(_SCB_UNITES) = chtab[unite%10];
SCBDATA(_SCB_DIZAINES) = chtab[dizaine%10];
DrawSprite(SCB_UNITES); // un seul drawsprite jean philipe
for (char i=0;i<120;i++) vsync();//si tu veux le temps de lire ton compteur...
SwapBuffers();
}
}}[/source]