If there's one thing I'd want added to Stonesense- that's it.
Ladies, gentlemen, and others: The Cavalier Crusader!
I can't say I didn't think the exact same thing, but still... be nice. It's not like it would be bad for Stonesense to have that capability, all other things being equal.
Now now, I'm generally nice. I 'ust wanted to share my amusement with the world. I'm not trying to knock down his suggestion or insult him.
To prove this I shall determine what changes needed to implement his tileset, at the least. (True custom shapes would be much harder, custom tilesize should be easy, swapping a global variable read on start from the files for the current TILEWIDTH #define)
*ponders briefly what needs changing* Draw order, location, tilesize are really it from the back end. . . I don't like how the blocks draw themselves and determine all about it.
draws all tiles sorted by z, then x, then y.
if you had stated that more clearly...ah
for(int32_t vsz=viewedSegment->z; vsz < vszmax; vsz++){
for(int32_t vsx=viewedSegment->x; vsx < vsxmax; vsx++){
for(int32_t vsy=viewedSegment->y; vsy < vsymax; vsy++){
That would need a swapping for cavalier if Mayday's to get his wide graphics. It shouldn't otherwise matter which way, as it's symmetric in the current angle.
...grrr. This is being hard to find. That calls block.draw...which determines where it draws by void correctBlockForSegmetOffset, which doesn't hint nicely where it is...turns out to be in common.h/main.cpp...argh you made the anti-escher code nontogglable and hardcoded to 3/4 in block. Among other things.
No wait that isn't it at all where is it saying where to draw the block that's the only thing that should need changing ARGH
if(waterlevel == 7) waterlevel--; //ARGH so you're not using one sprite?
Ah it's pointToScreen...where's that? Aha, GUI.cpp. First one that makes any sense.void pointToScreen(int *inx, int *iny, int inz){
static int offx = config.screenWidth / 2;
static int offy = 50;
if( config.lift_segment_offscreen ) offy = -200;
int x=*inx, y=*iny, z=inz;
x = (int) (x-0.5*(x+y));
y = (int) (0.5*(x+y));
x+=offx;
y+=offy;
y-=z;
*inx=x;*iny=y;
}
...there are five separate getsprite functions. Why are there five separate getsprite functions.
Changes needed:
Split TILEWIDTH to TILEWIDTH and TILEHEIGHT. well, for frontwise cavalier, also seems to be a TILEHEIGHT already..- Add CAVALIER/TILESHAPE:CAVALIER option flag somehow to init
- Add the ability to pick your spritesheet filenames(init easiest)
- Also the ability to pick the xml files indicating what's what (Want to be easy to switch, not a matter of swapping out all the config files.)
- Change the anti-Escher line bits to not trigger on Cavalier
- *optional* add top-edge anti-escher linedraw for Cavalier
- add a cavalier-style pointToScreen/surrounding code in Block.cpp
- Casual inspection doesn't suggest it's necessary, but check all those drawx/drawy to see what else may be dependant on the projection angle.
correctBlockForSegmetOffset( drawx, drawy, drawz);
drawx *= TILEWIDTH;
drawy *= TILEWIDTH;
pointToScreen((int*)&drawx, (int*)&drawy, drawz * WALLHEIGHT);
drawx -= TILEWIDTH>>1;
...Okay, this is for a frontwise Cavalier, rather than the rotated 45. Whoops.void pointToScreenCavalier(int *inx, int *iny, int inz){
static int offx = 25;
static int offy = 25; //should these be configurable?
if( config.lift_segment_offscreen ) offy = -200;
int x=*inx, y=*iny, z=inz;
x = x;
y = y;
x+=offx;
y+=offy;
y-=z;
*inx=x;*iny=y;
}
...hmm. Okay, something's screwed up here to me.Your pointToScreen is going by apparently halves, which would support
Mayday's proposed tiles, except going up a Z is HALF a tile.
When I wrote my script to convert basically spritesheets to isometric projections (working with Sol's tileset initially) the y got turned into TILESIZE*((x+y)/4). Here it's being assigned /2. where's the other /2?
I can't find it, but I know it's gotta be somewhere...or things would NOT be displaying right. Dev-guys, please?
Time to go do some noncode for a while.