Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Quasar

More PSX Doom Code

Recommended Posts

Hence why I said "might help", I quoted it mostly for the map numbers.

Now that you mention which Cacodemon it is, I think I did take notice to that before. I'll have to go check it out again.

Edit: Yeah, that guy's really subtle. I probably would've completely overlooked it if I weren't looking for it.

Share this post


Link to post
Quasar said:

Some people are saying that spectres occur in more than one translucency value. If you can identify decisively where any of these spectres spawn (MAP # and, if possible, closest coordinate values to where it spawns or is found), it would really help us out.

MAP34 (The Focus), the two Spectres around the exit area have different translucency values IIRC. Coordinates according to the PSXTC map are roughly -1697,1808 and -1936,1312.

Share this post


Link to post

Figured it out definitively, with you guys' help, some musings from Kaiser, and the No$PSX documentation.

If mapthing bitflag 32 is set, then mapthing bitflags 32 through 128 are transformed into the top three flags of mobj_t::flags during P_SpawnMapThing by taking mapthing_t::options & 0xE0 and doing << 23, then ORing that value into mo->flags as set previously from mobjinfo.

In a subroutine dispatched from what Kaiser calls R_DrawScene (looks similar to R_AddSprites from vanilla), these flags are retrieved and extracted, used while setting the texture's palette properties, and then stored along with other data in what appears to be a draw list getting built up.

Either way, and, long story short, if you look at the pattern of the (64|128) bits, they exactly correspond to the PlayStation GPU's blending modes:

Bitmask | Meaning to PSX GPU        | Observed in Game As...
-----------------------------------------------------------------
00      | 50% transparency (B/2+F/2)| Cacodemon on Tenements
01      | 100% additive    (B+F)    | Spectre in MAP34 exit room
10      | 100% subtractive (B-F)    | All Nightmare Spectres
11      | 25%  additive    (B+F/4)  | Usual Spectres
BTW, when mapthing_t::options & 0xE0 == 0xA0 (101 in the three relevant bit flags), the thing's spawnhealth is doubled. So, subtractive blending is inherently tied to the nightmare monster effect - you cannot have one without the other.

Share this post


Link to post
BaronOfStuff said:

So there's not actually a separate Spectre actor? Well that's one way to save space.

I've always wondered why Carmack never embarrassed pallet swapping. I guess he just didn't know about it.

Share this post


Link to post
Technician said:

I've always wondered why Carmack never embarrassed pallet swapping.

He's just too good at logistics.

(You meant "embraced palette swapping".)

Share this post


Link to post

Nice, Quasar. I still wonder why they didn't intentionally add some "spectral" versions of the other monsters to some maps, given the capability was there.

Technician said:

I've always wondered why Carmack never embarrassed pallet swapping. I guess he just didn't know about it.

Doomguy gets palette swapped in multiplayer.

Share this post


Link to post

The monster needs to be relatively monochromatic or the effect becomes kinda weird.

Dragonsbrethren said:

Doomguy gets palette swapped in multiplayer.


More precisely, a range of colors is translated to another.

Doom actually uses palette swapping (as in, swapping the entire palette with another) for visual effects like gold screen on picking up items, red screen on getting hurt, and green screen on using a radsuit.

Doom 64 uses palette swapping for individual sprites (rather than the entire display) because it can have one palette per image. That's how barons and knights share the same sprites for example.

Share this post


Link to post

Yeah, I realize it's not technically swapping the palette, but neither are most "palette swaps" in games. It's bad terminology, but if you say palette swap someone will know what you mean, not so much with translation.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×