Age of CEmpires I
-
critorAdmin
Niveau 19: CU (Créateur Universel)- Messages: 41496
- Images: 14632
- Inscription: 25 Oct 2008, 00:00
- Localisation: Montpellier
- Genre:
- Calculatrice(s):→ MyCalcs profile
- YouTube: critor3000
- Twitter/X: critor2000
- GitHub: critor
Re: Age of CEmpires I
instead of "call cursorimage" at line 29, you could put the entire sub-routine right there , thus no more sp to save because of call's
-
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)- Messages: 770
- Images: 75
- Inscription: 14 Sep 2011, 12:29
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: Age of CEmpires I
critor a écrit::D
This is definitely a quality post but thanks!
grosged a écrit:instead of "call cursorimage" at line 29, you could put the entire sub-routine right there , thus no more sp to save because of call's
Thanks, saved 10K cycles
https://github.com/PeterTillema/Age-Of-CEmpires-I
Age of CEmpires I - In progress!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: Age of CEmpires I
Well, I've been studying it a bit more...Here's my suggestion :
By the way, I guess that line containing " ld hl, _tile_test \.r2 " won't remain unchanged ?
- Code: Tout sélectionner
DrawField:
scf
sbc hl, hl
ld (hl), 2
DrawFieldStart:
ld (TempSP2), sp
ld sp,320
exx
ld bc,15 ; that way, the 2 higher bytes of bc'=0
ld iy,(currDrawingBuffer)
add iy,bc
exx
ld a,10 ; a=10
ex af,af
ld a,9 ; a' =9
ld de, 2256 ; = 8*320-10x32+16 = 8x320-9x32-16
ld b, 29
DisplayEachRowLoop:
ex af,af ; alternatively a=10 or 9
ld c,a ; save a into c , in order to restore a from c when loop finished
exx
DisplayRowOfTilesLoop:
ld hl, _tile_test \.r2
AoCEDisplayIsoTile:
; Thanks a lot to TheMachine02 and grosged for help and optimizations!
; Input:
; IY = pointer to output
; HL = pointer to iso sprite
;
lea ix,iy
lea de,ix
ld c,2
ldir
add ix, sp
lea de, ix-2
ld c, 6
ldir
add ix, sp
lea de, ix-4
ld c, 10
ldir
add ix, sp
lea de, ix-6
ld c, 14
ldir
add ix, sp
lea de, ix-8
ld c, 18
ldir
add ix, sp
lea de, ix-10
ld c, 22
ldir
add ix, sp
lea de, ix-12
ld c, 26
ldir
add ix, sp
lea de, ix-14
ld c, 30
ldir
add ix, sp
lea de, ix-15
ld c, 32
ldir
add ix, sp
lea de, ix-14
ld c, 30
ldir
add ix, sp
lea de, ix-12
ld c, 26
ldir
add ix, sp
lea de, ix-10
ld c, 22
ldir
add ix, sp
lea de, ix-8
ld c, 18
ldir
add ix, sp
lea de, ix-6
ld c, 14
ldir
add ix, sp
lea de, ix-4
ld c, 10
ldir
add ix, sp
lea de, ix-2
ld c, 6
ldir
add ix, sp
lea de, ix
ld c,2
ldir ; same speed but better choice than ldi\ldi which would put $fffffe value in bc' (then higher bytes of bc' no more =0)
lea iy, iy+32
dec a
jr nz, DisplayRowOfTilesLoop
exx
ld a,c
add iy, de
djnz DisplayEachRowLoop
TempSP2 = $+1
ld sp, 0
ret
DrawFieldEnd:
.echo DrawFieldEnd-DrawFieldStart
By the way, I guess that line containing " ld hl, _tile_test \.r2 " won't remain unchanged ?
-
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)- Messages: 770
- Images: 75
- Inscription: 14 Sep 2011, 12:29
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: Age of CEmpires I
Edges work!!!!!!
Now the optimizing part begin, it's currently 908839 cycles
Now the optimizing part begin, it's currently 908839 cycles
Age of CEmpires I - In progress!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: Age of CEmpires I
Hey ! already very nice rendering ! Good job, PT_ !
-
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)- Messages: 770
- Images: 75
- Inscription: 14 Sep 2011, 12:29
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: Age of CEmpires I
Got something done.... it should be somehow related to placing resources and trees...
Age of CEmpires I - In progress!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: Age of CEmpires I
Alright, it was supposed to be this:
The green pixels are trees, the black pixels not The map size will be either 128 or 144, not sure yet.
The green pixels are trees, the black pixels not The map size will be either 128 or 144, not sure yet.
Age of CEmpires I - In progress!
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
-
PT_Programmeur
Niveau 13: CU (Calculateur Universel)- Messages: 259
- Inscription: 09 Fév 2016, 23:06
- Genre:
- Calculatrice(s):→ MyCalcs profile
Retourner vers Langages alternatifs
Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 24 invités