DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

Critical issue: SDL enemy direction graphic incorrect?
Page 1 of 1
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Barry
DieHard Officer
DieHard Officer


Joined: 27 Aug 2008
Last Visit: 14 Dec 2018

Topics: 64
Posts: 563

blank.gif

PostPosted: Mon Jul 04, 2016 1:26 pm
   Subject: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

A quick explanation here. Let's say I approach a south-facing enemy from the southwest, before he is alerted, it will appear as if he's facing directly southwest rather than south. Has anybody else experienced this issue in SDL and does anybody know the cause and/or fix? I never remember this in DOS. I also wonder if it may be because of some bad code I ported over from my DOS version or if this is something inherent in the SDL version. Thanks for any replies.


Last edited by Barry on Mon Jul 04, 2016 1:44 pm; edited 1 time in total
Barry
DieHard Officer
DieHard Officer


Joined: 27 Aug 2008
Last Visit: 14 Dec 2018

Topics: 64
Posts: 563

blank.gif

PostPosted: Mon Jul 04, 2016 1:39 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Here is an example of what I am talking about. Notice the guard and the SS on the left...the correct graphic is not showing for the direction they are moving.

Barry
DieHard Officer
DieHard Officer


Joined: 27 Aug 2008
Last Visit: 14 Dec 2018

Topics: 64
Posts: 563

blank.gif

PostPosted: Mon Jul 04, 2016 2:03 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I think it might have something to do with this...which is not in the DOS code.

case northwest:
if (DEMOCOND_SDL && deltay > -deltax)
return false;
break;

case northeast:
if (DEMOCOND_SDL && deltay > deltax)
return false;
break;

case southwest:
if (DEMOCOND_SDL && deltax > deltay)
return false;
break;

case southeast:
if (DEMOCOND_SDL && -deltax > deltay)
return false;
break;
}

Is this necessary and what does it do?

_________________
Atomprojekt Download: https://www.moddb.com/mods/atomprojekt
Passage to Hollenteufel Download: https://www.moddb.com/mods/passage-to-hollenteufel
Barry
DieHard Officer
DieHard Officer


Joined: 27 Aug 2008
Last Visit: 14 Dec 2018

Topics: 64
Posts: 563

blank.gif

PostPosted: Mon Jul 04, 2016 2:10 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Scratch that. Commenting that out did not fix it. I just tested in DOS again and it doesn't happen there.
Barry
DieHard Officer
DieHard Officer


Joined: 27 Aug 2008
Last Visit: 14 Dec 2018

Topics: 64
Posts: 563

blank.gif

PostPosted: Mon Jul 04, 2016 2:38 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

One more bit of information. The issue appears when the enemies are within about 5 of the player. Enemies farther away appear fine.

What file/section is this controlled in?
Barry
DieHard Officer
DieHard Officer


Joined: 27 Aug 2008
Last Visit: 14 Dec 2018

Topics: 64
Posts: 563

blank.gif

PostPosted: Mon Jul 04, 2016 3:22 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Looks like this also happens in a vanilla SDL compile, so it isn't anything that I've added to the code. This guard should be facing me.


_________________
Atomprojekt Download: https://www.moddb.com/mods/atomprojekt
Passage to Hollenteufel Download: https://www.moddb.com/mods/passage-to-hollenteufel
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 15 Dec 2019

Topics: 57
Posts: 2261
Location: Canada
blank.gif

PostPosted: Mon Jul 04, 2016 3:54 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hi Barry,

Oh yeah, that looks like resf mode (1024x640).

Quote:
--res <width> <height> Sets the screen resolution
(must be multiple of 320x200 or 320x240)

--resf <w> <h> Sets any screen resolution >= 320x200
(which may result in graphic errors)

Graphic errors indeed. I usually just disable resf completely. --res 960 600 or --windowed (or both) should look right.

I think KyleRTCW tried to fix resf once:
http://diehardwolfers.areyep.com/viewtopic.php?t=5996

Even worse is that the ECWolf port of Wolf4SDL always uses resf, even when you use 640x400 or 640x480. Twisted Evil
Barry
DieHard Officer
DieHard Officer


Joined: 27 Aug 2008
Last Visit: 14 Dec 2018

Topics: 64
Posts: 563

blank.gif

PostPosted: Mon Jul 04, 2016 4:12 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Chris wrote:
Hi Barry,

Oh yeah, that looks like resf mode (1024x640).

Quote:
--res <width> <height> Sets the screen resolution
(must be multiple of 320x200 or 320x240)

--resf <w> <h> Sets any screen resolution >= 320x200
(which may result in graphic errors)

Graphic errors indeed. I usually just disable resf completely. --res 960 600 or --windowed (or both) should look right.

I think KyleRTCW tried to fix resf once:
http://diehardwolfers.areyep.com/viewtopic.php?t=5996

Even worse is that the ECWolf port of Wolf4SDL always uses resf, even when you use 640x400 or 640x480. Twisted Evil


Thanks a lot!

I have found that anything above 960 x 600 causes the issue, even if its a multiple of 320x200. I am going to try KyleRTCW's change and see what my results are.
Barry
DieHard Officer
DieHard Officer


Joined: 27 Aug 2008
Last Visit: 14 Dec 2018

Topics: 64
Posts: 563

blank.gif

PostPosted: Mon Jul 04, 2016 4:21 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

KyleRTCW's fix appeared to work. Enemy direction in SDL at high resolutions is now behaving correctly.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 2:55 ago.

Topics: 167
Posts: 8477
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon Jul 04, 2016 5:22 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Chris wrote:
I think KyleRTCW tried to fix resf once:
http://diehardwolfers.areyep.com/viewtopic.php?t=5996
Thank you very much for posting a link to this, Chris. I've been wanting to find this bugfix for a long, long time, but while I remembered seeing it posted, I couldn't track it down again for the life of me. Sad
Barry
DieHard Officer
DieHard Officer


Joined: 27 Aug 2008
Last Visit: 14 Dec 2018

Topics: 64
Posts: 563

blank.gif

PostPosted: Mon Jul 04, 2016 5:41 pm
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Tricob wrote:
Chris wrote:
I think KyleRTCW tried to fix resf once:
http://diehardwolfers.areyep.com/viewtopic.php?t=5996
Thank you very much for posting a link to this, Chris. I've been wanting to find this bugfix for a long, long time, but while I remembered seeing it posted, I couldn't track it down again for the life of me. Sad


This should be added to the list of essential fixes for new SDL projects.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 2:55 ago.

Topics: 167
Posts: 8477
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Tue Jul 05, 2016 6:47 am
   Subject: Re: Critical issue: SDL enemy direction graphic incorrect?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

I've requested Ron to post a link to it in the SDL Code Tutorials thread.
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts Announcement: Wolf3d & Spear of Destiny Shareware SDL Downloads
Author: BrotherTank
10 19731 Tue Aug 24, 2010 10:18 am
dcbasic View latest post
No new posts Sticky: [Tutorial] Compiling Wolf4SDL with Code::Blocks
Author: dcbasic
99 38535 Tue Dec 03, 2019 12:53 pm
Tris View latest post
No new posts [Help] Gun Bobbing in SDL
Author: RichterBelmont12
8 3989 Wed Jul 23, 2008 6:37 pm
Tricob View latest post
No new posts [SDL-Help] Wall patches fix
Author: insurrectionman
0 1547 Tue Jul 15, 2008 11:12 am
insurrectionman View latest post
No new posts [SDL] Apply 2nd ScaleFactor to selected (hi-res) vga gfx
Author: Andy_Nonymous
9 6063 Sun Apr 27, 2008 2:30 am
AlumiuN View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group