Hmm.. if you fill the faces then you can just draw everything from back to front and simply fill over what’s already in the background. Not so complicated, but requires lots of drawing which is slow.
On the other hand, if you want to hide instead of drawing you would draw from front to back, but then you would have to clip every object against what’s already on screen. Less drawing, but more complicated and time consuming math instead. It could probably still be faster though.
besides, whats worse than being on PVB without having ever played a VB but owning one is that I have a Famicom Disk System shirt but no Famicom (or Disk System) 😛
Do you use the shirt? 😛
somewhat more related: do you think Virty’s sad/enraged? 😐
I think he’s heartbroken for being in a home with no love 🙁
Issue 1:
I don’t think it likes constants declared like that to be used as case labels… The warning will probably go away if you declare it like “#define ExampleConst 123” instead.
Issue 2:
Dunno, can we see how you tried to declare it? 😛
The smallest change to that code to make it work would be:
int i;
for (i = 0; i < 5; i++) {
if(getBGMapChar(1, (xpos/8)+i,1/8)+2) < 514) {
xpos = 22;
ypos = 180;
gamesubdir = 0;
lives--;
b = 1;
torpedodir = 0;
break;
}
}
I'll explain:
d==2?224:0 is a compact form of one-line if/else statement that adds 224 to the ypos if d==2 (and adds 0 otherwise).
< 514 comes from the assumption that you did like me and use one bright coral and one dark, which would be at position 512 and 513 in the charsegs. The map won't use any chars below 512, so it's safe to assume everything below 514 is a hit.