It is currently Fri Nov 24, 2017 5:19 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Apr 26, 2014 1:48 am 
Offline
User avatar

Joined: Thu Jan 27, 2011 3:08 am
Posts: 33
Location: Europe
Hi, there's a NES demo for making xpm available in NES programs. Basically an xpm file is for coming into a program so you can convert its data in a buffer of characters, a structure has been made for that.

This is an example of such a file :
/* XPM */
static char * tilegrass2_16x16_xpm[] = {
"16 16 8 1",
" c None",
". c #406030",
"+ c #688038",
"@ c #2B471D",
"# c #80A820",
"$ c #E0F830",
"% c #C0B060",
"& c #908040",
".+.@.+.+@.+.@.+.",
".+#.+#.+@.+##.+.",
"..##+.#+.+.#+.+#",
"+..#@.+#.#.#$%.+",
".+.+#@.#.+.#%&..",
".@.$$@.+#.@+.@+.",
"+@@$%..+#.@@.@+.",
"++.@@+@..@.@@...",
"...#.+.@.+..@.#+",
"+..+#.@@@..#+.++",
"+++++.+++.++.+.@",
".+..+#++.##+.+.@",
"..@..+.#.@$%..#+",
"+#.@@@++.@%&@.+.",
".+.+..+..@+@.++.",
"..@.+.+.@+.+...@"};

Now my program just gives you something which can be made to a choice of NES image binary formats, you only have to convert from a character array as I said, pygame works this way also.

Source code is at https://sf.net/projects/xpmnes

If your NES incbins are full you can use my program for embedding xpm files just in plain C.

HTH.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group