π
<-

Age of CEmpires I

Assembleur, Axe, C/C++, ICE...

Re: Age of CEmpires I

Unread postby critor » 18 Feb 2017, 10:40

:D
Image
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 53.3%
 
Posts: 42390
Images: 17088
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

Re: Age of CEmpires I

Unread postby grosged » 18 Feb 2017, 12:15

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 ;)
User avatar
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 30.2%
 
Posts: 770
Images: 75
Joined: 14 Sep 2011, 12:29
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Age of CEmpires I

Unread postby PT_ » 18 Feb 2017, 12:48

critor wrote::D

This is definitely a quality post :troll: but thanks! ;)
grosged wrote: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!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: Age of CEmpires I

Unread postby grosged » 18 Feb 2017, 18:58

Well, I've been studying it a bit more...Here's my suggestion :
Code: Select all
     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 ?
User avatar
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 30.2%
 
Posts: 770
Images: 75
Joined: 14 Sep 2011, 12:29
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Age of CEmpires I

Unread postby PT_ » 22 Feb 2017, 16:04

Edges work!!!!!!

Image

Now the optimizing part begin, it's currently 908839 cycles :)
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: Age of CEmpires I

Unread postby grosged » 22 Feb 2017, 23:22

Hey ! already very nice rendering ! Good job, PT_ !
User avatar
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 30.2%
 
Posts: 770
Images: 75
Joined: 14 Sep 2011, 12:29
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Age of CEmpires I

Unread postby PT_ » 25 Feb 2017, 01:25

Got something done.... it should be somehow related to placing resources and trees... :P

Image
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: Age of CEmpires I

Unread postby PT_ » 25 Feb 2017, 17:25

Alright, it was supposed to be this:

Image

The green pixels are trees, the black pixels not :P The map size will be either 128 or 144, not sure yet.
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: Age of CEmpires I

Unread postby PT_ » 03 Mar 2017, 00:21

It is supposed to work correctly :P

Image
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: Age of CEmpires I

Unread postby PT_ » 03 Mar 2017, 12:35

Finally it works!! :D

Image
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

PreviousNext

Return to Langages alternatifs

Who is online

Users browsing this forum: ClaudeBot [spider] and 7 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1541 utilisateurs:
>1512 invités
>22 membres
>7 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)