Tronic
Hors ligne
Inscrit le: 20 Mai 2015 Messages: 33
Localisation: 77 Point(s): 22 Moyenne de points: 0,67
|
Posté le: Ven 28 Juil - 15:45 (2017) Sujet du message: *****Les sprites soft sur Cpc |
|
|
Salut, Vous chicanez pas on s'amuse hein... De plus, les rulez sont un peu tendancieuses (Point 3 notamment en ce qui me concerne avec cette nouvelle routine...) J'ai appliqué en quelque sorte la même chose utilisé jadis pour la "Endpart/Cuddly" (voir dsk dans précédent post) A vous de juger... : 780 nops / 64 = 12.18 RL. J'ai bon ?
Code: |
; 12 bytes/16 lines sprite test routine (version c) ; 780 nops / 64 = 12.18 RL ; Tronic/GPA
; RULEZ ; 1. La taille du sprite doit etre de 12 octets par 16 lignes = ok ; 2. Les datas du sprite doivent etre recuperes en memoire = ok ; 3. Facilite d'acces a la table des adr ecr pour pouvoir modifier Y (et pourquoi pas X aussi ?) a la volee = Trop vague & tendancieux donc routine en consequence ! ; En plus, j'ai pas vu de table a proprement parle pour les adr ecr dans la dernière routine d'ast... ; 4. La routine doit etre reutilisable pour plusieurs sprites (aka = pas de sprite autogenere) = ok
org &1000 nolist run start start di ld hl,&c9fb ld (&38),hl ;>>> From here ld (stack+1),sp ; ------------------------------------------------------------------------------------------- ; Comme le sprite autogenere est interdit mais visiblement pas l'adressage ecran (Huhuhu) ; Pour bouger le sprite en x ou en y il faut autant de fois dupliquer ce code d'affichage (Lol!) ; et on s'effondre en RAM of course mais ca marche... ; Ou faire du calcul dessus mais la bien sur on s'effondre en TM... ld sp,sprite pop hl:ld (&c000),hl:pop hl:ld (&c002),hl:pop hl:ld (&c004),hl pop hl:ld (&c006),hl:pop hl:ld (&c008),hl:pop hl:ld (&c00a),hl pop hl:ld (&c800),hl:pop hl:ld (&c802),hl:pop hl:ld (&c804),hl pop hl:ld (&c806),hl:pop hl:ld (&c808),hl:pop hl:ld (&c80a),hl pop hl:ld (&d000),hl:pop hl:ld (&d002),hl:pop hl:ld (&d004),hl pop hl:ld (&d006),hl:pop hl:ld (&d008),hl:pop hl:ld (&d00a),hl pop hl:ld (&d800),hl:pop hl:ld (&d802),hl:pop hl:ld (&d804),hl pop hl:ld (&d806),hl:pop hl:ld (&d808),hl:pop hl:ld (&d80a),hl pop hl:ld (&e000),hl:pop hl:ld (&e002),hl:pop hl:ld (&e004),hl pop hl:ld (&e006),hl:pop hl:ld (&e008),hl:pop hl:ld (&e00a),hl pop hl:ld (&e800),hl:pop hl:ld (&e802),hl:pop hl:ld (&e804),hl pop hl:ld (&e806),hl:pop hl:ld (&e808),hl:pop hl:ld (&e80a),hl pop hl:ld (&f000),hl:pop hl:ld (&f002),hl:pop hl:ld (&f004),hl pop hl:ld (&f006),hl:pop hl:ld (&f008),hl:pop hl:ld (&f00a),hl pop hl:ld (&f800),hl:pop hl:ld (&f802),hl:pop hl:ld (&f804),hl pop hl:ld (&f806),hl:pop hl:ld (&f808),hl:pop hl:ld (&f80a),hl pop hl:ld (&c050),hl:pop hl:ld (&c052),hl:pop hl:ld (&c054),hl pop hl:ld (&c056),hl:pop hl:ld (&c058),hl:pop hl:ld (&c05a),hl pop hl:ld (&c850),hl:pop hl:ld (&c852),hl:pop hl:ld (&c854),hl pop hl:ld (&c856),hl:pop hl:ld (&c858),hl:pop hl:ld (&c85a),hl pop hl:ld (&d050),hl:pop hl:ld (&d052),hl:pop hl:ld (&d054),hl pop hl:ld (&d056),hl:pop hl:ld (&d058),hl:pop hl:ld (&d05a),hl pop hl:ld (&d850),hl:pop hl:ld (&d852),hl:pop hl:ld (&d854),hl pop hl:ld (&d856),hl:pop hl:ld (&d858),hl:pop hl:ld (&d85a),hl pop hl:ld (&e050),hl:pop hl:ld (&e052),hl:pop hl:ld (&e054),hl pop hl:ld (&e056),hl:pop hl:ld (&e058),hl:pop hl:ld (&e05a),hl pop hl:ld (&e850),hl:pop hl:ld (&e852),hl:pop hl:ld (&e854),hl pop hl:ld (&e856),hl:pop hl:ld (&e858),hl:pop hl:ld (&e85a),hl pop hl:ld (&f050),hl:pop hl:ld (&f052),hl:pop hl:ld (&f054),hl pop hl:ld (&f056),hl:pop hl:ld (&f058),hl:pop hl:ld (&f05a),hl pop hl:ld (&f850),hl:pop hl:ld (&f852),hl:pop hl:ld (&f854),hl pop hl:ld (&f856),hl:pop hl:ld (&f858),hl:pop hl:ld (&f85a),hl ; ------------------------------------------------------------------------------------------- stack ld sp,0000 ;>>> To here ; 780 nops / 64 = 12.18 RL ei loop jr loop
sprite dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa dw &ffaa,&ffaa,&ffaa,&ffaa,&ffaa,&ffaa
|
|
|