Jump to content


Can we retrieve the sprite color palette?

2 replies to this topic

#1 asdronin OFFLINE  


    Space Invader

  • 26 posts

Posted Thu May 9, 2019 11:05 PM

Hi all,

I have seen in Pacgreg's Metal Gear source code (that is a nice one by the way =) ) something that looks like this


The tileset is loaded normally with incgraphic I compile this and there is no trouble but I try something similar in my code and it fails to compile, I see that what these lines do apparently is retrieving the colors from the image loaded, so what am I doing wrong? I thought just attaching _color# would be enough but of course Im missing something here as its not even compiling, can you please tell me how to do this? thanks beforehand for any help =)

#2 RevEng OFFLINE  


    Bit Player

  • 5,213 posts
  • Location:bottom of the stack

Posted Fri May 10, 2019 5:55 PM

Attaching "_color1" to the filename you used with incgraphic (without the ".png") is enough. The "adventurer.bas" sample does this too.

Look for typos.

#3 asdronin OFFLINE  


    Space Invader

  • Topic Starter
  • 26 posts

Posted Fri May 10, 2019 6:18 PM

Awesome, thanks, yes I was typing something wrong you were right, this functionality to obtain color from image is a time saver, at least for me, I could have avoided so much trouble using this from the start, and yes I looked into adventurer game, but at that moment I was looking into the tilemaps and other things I guess, thanks a lot for the help =)

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users