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       

How do you display two of the same weapons in SDL Games?
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
Joshua
DieHard SS
DieHard SS


Joined: 15 Mar 2012
Last Visit: 16 Oct 2018

Topics: 183
Posts: 428

usa.gif

PostPosted: Tue Sep 25, 2018 6:28 am
   Subject: How do you display two of the same weapons in SDL Games?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Does anyone on here know how to display two of the same weapon in a Wolfenstein 3D video game mod without having to add sprites? I remember something being said about using draw. Is the weapon number for example, 4 is the chain gun indication of how powerful the weapon is? I remember the four weapons being coded in SDL in a way that each weapon was powerful in strength. This also depended on additional code. How do I implement two weapons in SDL easily without having to add additional sprites?
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 8:29 ago.

Topics: 38
Posts: 2497
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Tue Sep 25, 2018 4:50 pm
   Subject: Re: How do you display two of the same weapons in SDL Games?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

The call to SimpleScaleShape in DrawPlayerWeapon is what draws the player's weapon; you can duplicate the call and change the xcenter (which is the first argument) of both calls to an appropriate number so that they're offset. Note that both weapons will display the same frame when firing with this method, but there's not really a good way around it without adding more sprites.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 8:42 ago.

Topics: 164
Posts: 8230
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Tue Sep 25, 2018 8:01 pm
   Subject: Re: How do you display two of the same weapons in SDL Games?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

As for strength, you'll need to go to the GunAttack routine in WL_AGENT.CPP.
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 15514 Tue Aug 24, 2010 10:18 am
dcbasic View latest post
No new posts Sticky: [Tutorial] Compiling Wolf4SDL with Code::Blocks
Author: dcbasic
90 25975 Wed May 24, 2017 7:53 pm
Falcon*93 View latest post
No new posts [Help] Adding a weapon problem
Author: Zombie_Plan
10 2132 Thu Jul 24, 2008 4:26 pm
RichterBelmont12 View latest post
No new posts [HELP WOLF4SDL] High-Res Weapons.
Author: Raziel
9 2105 Sun Jul 13, 2008 5:04 pm
Ripper View latest post
No new posts [SDL] Apply 2nd ScaleFactor to selected (hi-res) vga gfx
Author: Andy_Nonymous
9 4603 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