Duke4.net Forums: Shadow Warrior Polymer merge issue - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Shadow Warrior Polymer merge issue

#1

Hey I've been working off and on on some additions to the shadow warrior code base, ive actually been teaching a small programming class based on a VM system I built into the game. If anyoen wants the source code right now I can upload it some place : ), but I wanted to copy over the polymer additions. I got the code to compile but I think due to the different variable types in engine.cpp functions.

Anyway its crashing here:

VOID WaterAdjust(short florhit, LONGp loz)	
	{
	switch (TEST(florhit, HIT_MASK))
		{
		case HIT_SECTOR:
			{
			int norm_sector = NORM_SECTOR(florhit);

			SECT_USERp sectu = SectUser[norm_sector];
			
			if (sectu && sectu->depth)
				*loz += Z(sectu->depth);
			}	
			break;
		case HIT_SPRITE:
			break;	
		}
	}


where at norm_sector = NORM_SECTOR(florhit), the return is ALWAYS the same as florhit, which is causing a crash at the IF statement cause sectu has a invalid memory address.

My question is what does this macro do: #define NORM_SECTOR(val) ((val) & (SIZ(sector) - 1)), and do you guys know if any of the new polymer changes would effect this part of the code.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #2

Are you importing this into JFSW and/or SWP?

Talk to ProAsm. SWP has been updated much beyond JonoF's codebase to include things like OGG music, WAV music, MIDI customization, and even a way to update the animations.
0

#3

Im importing everything into JFSW, I allready have OGG support and customization via LUA script, with a script compiler and syntax checker. One of the biggest hurdles I have is that build uses alot of bitwise operators which I am not familar with haha.
0

User is offline   Spiker 

#4

Good luck with it :lol: although it won't be easy :lol:
0

#5

your right its not haha but I still need to do what the NORM_SECTOR macro is supposed to do :|.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options