Forum Archive

Go Back   3D Realms Forums > 3D Realms Topics > Other Apogee/3D Realms Games > Shadow Warrior Source Code
Blogs FAQ Community Calendar

Notices

 
 
Thread Tools
Old 04-28-2005, 09:58 AM   #1
Bdragon
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
Bdragon is offline  
Old 04-28-2005, 11:08 AM   #2
JonoF

JonoF's Avatar
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
JonoF is offline  
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:34 PM.

Page generated in 0.11384106 seconds (100.00% PHP - 0% MySQL) with 16 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is ©1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.