![]() |
#1 |
Hello again, and bug report / proposed fix (JFSW)
Hi guys!
Sorry for disappearing for so long. I'm still getting my head around the [SW] code, but things are going good. This pertains to the "placed sprites don't show up in build" problem. I'm using jfsw-src-20050402. If this is way off base / you have already fixed it, please ignore. Here's what's happening, as far as I can see. SW build and game appears to do some relocation voodoo to get sector-over-sector working, involving making stuff invisible and drawing it in "user code" instead of "engine code." (grain of salt, I'm still a little shaky on this part.) When you're inserting a sprite, it's getting put in the right place, but with the invisible flag set. (cstat highest bit) There is code to properly reset this flag when you save and load a map, but this code isn't called on sprites when you add sprites. (jnstub.c:ResetSprites()) Here's a hack to build.c to make sprites appear when you place them. build.c, line ~4040 or so. --------------------------------------------- printmessage16("Sprite inserted."); updatenumsprites(); //Ifdef this code in if building for Shadow Warrior. sprite[i].cstat&=~32768 //inv. //--Bdragon asksave = 1; } keystatus[0x1f] = 0; ------------------------------------------------ jonof, is it _safe_ to make the sprite visible at this point, or is there a _good_ reason for it to be invisible? If it really needs to be invisible at that point, what would be a clean way of remembering to reset the flag later? Hope I brought some insight. --Brandon |
|
![]() |
![]() |
#2 |
Re: Hello again, and bug report / proposed fix (JF
The problem is because the tile->voxel array isn't being initialised properly for new maps. I've fixed the bug and it'll be right in the next release.
Jonathon |
|
![]() |
Bookmarks |
|
|