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

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

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

Shadow Warrior Polymer merge issue

User is offline   icecoldduke 

  • 1,327

#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.

PolymerRTX
PolymerRTX github
ICED Shadow Warrior Port
https://crozzbreed23...site.com/icedsw
0

User is offline   Hendricks266 

  • Weaponized Autism
  • 6,404

  #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

User is offline   icecoldduke 

  • 1,327

#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.

PolymerRTX
PolymerRTX github
ICED Shadow Warrior Port
https://crozzbreed23...site.com/icedsw
0

User is offline   Spiker 

  • 257

#4

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

Looks like those alien bastards drank all my beer.
0

User is offline   icecoldduke 

  • 1,327

#5

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

PolymerRTX
PolymerRTX github
ICED Shadow Warrior Port
https://crozzbreed23...site.com/icedsw
0

Share this topic:


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


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options