Changing Sprite Arrays
Posted: Fri Dec 03, 2010 1:25 pm
I have my game set up like this:
dim shared character sprite arrays
then i set Char1Name$ = whoever i want to be the 1st character
and it will load their sprites as follows:
DEF SEG = VARSEG(Char1Right(0))
BLOAD path$ + "\Characters\" + CHAR1Name$ + "\rightTIL.til", Varprt(Char1Right(0))
DEF SEG = VARSEG(Char1RightMsk(0))
BLOAD path$ + "\Characters\" + CHAR1Name$ + "\rightMSK.msk", Varprt(Char1RightMsk(0))
the first character is the one i want walking around on the field map.
this all works fine.
when i want to switch out characters, i need to replace all the sprite arrays for char1 with different .til and .msk images so it will show someone else walking around on the map.
i thought i would be able to do this by changing Char1Name$ and then importing images again with the same def seg statements but it says "out of range" when i try and do this.
any help would be greatly appriciated.
dim shared character sprite arrays
then i set Char1Name$ = whoever i want to be the 1st character
and it will load their sprites as follows:
DEF SEG = VARSEG(Char1Right(0))
BLOAD path$ + "\Characters\" + CHAR1Name$ + "\rightTIL.til", Varprt(Char1Right(0))
DEF SEG = VARSEG(Char1RightMsk(0))
BLOAD path$ + "\Characters\" + CHAR1Name$ + "\rightMSK.msk", Varprt(Char1RightMsk(0))
the first character is the one i want walking around on the field map.
this all works fine.
when i want to switch out characters, i need to replace all the sprite arrays for char1 with different .til and .msk images so it will show someone else walking around on the map.
i thought i would be able to do this by changing Char1Name$ and then importing images again with the same def seg statements but it says "out of range" when i try and do this.
any help would be greatly appriciated.