My old attempt:
-For every single sprite an own file.
-7 spritesets (no snow, 1/4, 2/4, 3/4, and 4/4 + ground 0/4 and ground 4/4 snow)
-5 spritelayouts for all snow-stages (0/4 - 4/4)
I think, this is much coding for little output.
So i revamped the code and made one single file for all sprites of one building.
-one file
-5 spritesets (no snow (3 sprites: 2 buildingstages, 1 finished building), one for all snow stages (without buildingstages), one for full snow (3 sprites: 2 buildingstages, 1 finished building))
-5 spritelayouts for all snow-stages (0/4 - 4/4)
This is better.... but it needs much code as well...
I think, something like an extended spritelayout wouldn't be bad:
Code: Select all
spritelayout gfx_house {
ground {
view :bitmap(HOUSE_NORMAL,HOUSE_1_4_SNOW,...);
sprite :[spriteset_house(15),spriteset_house(16),spriteset_house(17),spriteset_house(18),spriteset_house(19)];
}
building {
view :bitmap(HOUSE_NORMAL,HOUSE_1_4_SNOW,HOUSE_2_4_SNOW,HOUSE_3_4_SNOW,HOUSE_4_4_SNOW,);
sprite :[spriteset_house(0),spriteset_house(1),spriteset_house(2),spriteset_house(3),spriteset_house(4)];
}
}
sprite: contains an array of spriteset-references
Here is a fictive code
Could something like this be realised?
Are there existing alternatives?