SGDK Rescomp
Posted: Thu Dec 03, 2015 2:58 am
Hi friends.
I'm new in genesis developing.
I'm doing some experiments with SGDK.
I want to implement a way to load tilemaps. given the MAP rescomp plugin is not implemented yet, I'm trying through BIN rescomp plugin.
The rescomp.text document says like below:
BIN name file align salign fill
name BIN data variable name
file path of the data file to convert to binary data array
align memory address alignment for generated data array (default is 2)
salign size alignment for the generated data array (default is 2)
fill fill value for the size alignment (default is 0)
In my project I'm using a line like this: BIN stage1_map "stage1.map" 2 2 0
stage1.map is a binary file which contains int values which are the indexes of the tiles as you know.
What I obtain when I run my program is an u8 array which has a zero value in between eachother values.
for example if my file contains the values 1, 2, 3, 4, 5, 5, 6, 7, the array I get contains 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7.
what I'd like to get would be a u16 array with no that zeroes.
I think the problem is that I don't understand how the params align, saling and fill work.
Can somebody help me with this?
Thanks in advance.
@FedericoTech.
I'm new in genesis developing.
I'm doing some experiments with SGDK.
I want to implement a way to load tilemaps. given the MAP rescomp plugin is not implemented yet, I'm trying through BIN rescomp plugin.
The rescomp.text document says like below:
BIN name file align salign fill
name BIN data variable name
file path of the data file to convert to binary data array
align memory address alignment for generated data array (default is 2)
salign size alignment for the generated data array (default is 2)
fill fill value for the size alignment (default is 0)
In my project I'm using a line like this: BIN stage1_map "stage1.map" 2 2 0
stage1.map is a binary file which contains int values which are the indexes of the tiles as you know.
What I obtain when I run my program is an u8 array which has a zero value in between eachother values.
for example if my file contains the values 1, 2, 3, 4, 5, 5, 6, 7, the array I get contains 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7.
what I'd like to get would be a u16 array with no that zeroes.
I think the problem is that I don't understand how the params align, saling and fill work.
Can somebody help me with this?
Thanks in advance.
@FedericoTech.