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       

[Tutorial] Highlighted Pushwalls Cheat
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
Merthsoft
Bring 'em On
Bring 'em On


Joined: 12 May 2004
Last Visit: 25 Apr 2018

Topics: 5
Posts: 97
Location: Wisconsin
usa.gif

PostPosted: Mon Aug 17, 2009 8:07 pm
   Subject: [Tutorial] Highlighted Pushwalls Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

I've made a new cheat that gives you the ability to "highlight" pushwalls. This comes in handy while playing through your levels, in case you forget where everything is. If this has been done before, I apologize for the repeated tutorial, I searched the forums, and couldn't find it done before. Alright, here we go.
First of all, we want to add the flag that says if we're in highlight mode, so open up wl_def.h, and search for:
::: CODE :::
extern  boolean     noclip,ammocheat;

change this to:
::: CODE :::
extern  boolean     noclip,ammocheat,highlightmode;

Next in wl_play.cpp search for:
::: CODE :::
boolean noclip, ammocheat;

and change that to:
::: CODE :::
boolean noclip,ammocheat,highlightmode;


Now that we have the flag, let's add the actual cheat key (I used the "Y" key). Open up wl_debug.cpp and go to this entry:
::: CODE :::
else if (Keyboard[sc_X])        // X = item cheat
{
    CenterWindow (12,3);
    US_PrintCentered ("Extra stuff!");
    VW_UpdateScreen();
    // DEBUG: put stuff here
    IN_Ack ();
    return 1;
}

after the "}" add:
::: CODE :::
else if (Keyboard[sc_Y]) {   // Y = highlight pushwalls
   CenterWindow (15,2);
   if (highlightmode == 0) {
      US_PrintCentered ("Glow Pushwalls ON");
      highlightmode = 1;
   } else {
      US_PrintCentered ("Glow Pushwalls OFF");
      highlightmode = 0;
   }

   VW_UpdateScreen();
   IN_Ack();
   return 1;
}


Now we just need to make it work. This is the part where you get to choose!
Open wl_draw.cpp and find all occurences of:
::: CODE :::
col = postsource[yw];

(there should be just two, inside the ScalePost() function) and after the #endif add:
::: CODE :::
if (highlightmode && MAPSPOT(xtile, ytile, 1) == PUSHABLETILE)
   col = col << 2;

So that little section should look like:
::: CODE :::
#ifdef USE_SHADING
   col = curshades[postsource[yw]];
#else
   col = postsource[yw];
#endif
   if (highlightmode && MAPSPOT(xtile, ytile, 1) == PUSHABLETILE)
      col = col << 2;

Remember, do this BOTH TIMES this occurs in the ScalePost() section.

Now, what I'm doing is taking the color of the actual texture, and shifting it by two (col = col << 2), this keeps the image of the wall the same, but makes it really stand out color-wise. You could do all sorts of things, like make it black (col = 0) or blue (col = 1) or green (col = 2) or, well, you get the idea.

Edit:
Here's a screenshot to better explain what I mean:


Edit:
Screenshot changed locations.

_________________
Shaun


Last edited by Merthsoft on Mon Dec 28, 2009 7:52 am; edited 1 time in total
Airslide
Don't Hurt Me
Don't Hurt Me


Joined: 08 Aug 2005
Last Visit: 02 Jan 2011

Topics: 8
Posts: 60

blank.gif

PostPosted: Tue Aug 18, 2009 9:33 am
   Subject: Re: [Tutorial] Highlighted Pushwalls Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Neat! You could probably use a spin-off of Ripper's shading to shift everything towards a certain color.

This could be useful not only as a cheat, but as a special powerup. Smile
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 17 Sep 2018

Topics: 163
Posts: 8192
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Tue Aug 18, 2009 6:42 pm
   Subject: Re: [Tutorial] Highlighted Pushwalls Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks for your new feature and its tutorial, Shaun. It breaks new ground in the Wolf4SDL engine. Too Cool
Merthsoft
Bring 'em On
Bring 'em On


Joined: 12 May 2004
Last Visit: 25 Apr 2018

Topics: 5
Posts: 97
Location: Wisconsin
usa.gif

PostPosted: Tue Aug 18, 2009 9:50 pm
   Subject: Re: [Tutorial] Highlighted Pushwalls Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Airslide: That's a clever idea, I hadn't thought of that. I'll work on making it a bonus next, and shading the wall towards a certain color.

Tricob: Thanks! I was hoping I was doing something original.

I'm glad you guys find it helpful, it's something that, when I was making maps, I'd always wanted. I put a lot of secrets into my maps.

BTW, Tricob, I was looking through all my old code today, and I found the hint bubble stuff we worked on. That was fun. I really need to stop disappearing from the community :\

_________________
Shaun
Metalor
DieHard Mutant
DieHard Mutant


Joined: 24 Aug 2005
Last Visit: 8:31 ago.

Topics: 95
Posts: 911
Location: California
usa.gif

PostPosted: Tue Aug 18, 2009 10:33 pm
   Subject: Re: [Tutorial] Highlighted Pushwalls Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

That's probably one of the most useful and original debug code fixings I've ever seen! Awesome Sauce!

_________________
- Taking a hiatus from Wolfenstein for a while...

...But I'll be back, you can count on it!
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 15112 Tue Aug 24, 2010 10:18 am
dcbasic View latest post
No new posts Sticky: [Tutorial] Compiling Wolf4SDL with Code::Blocks
Author: dcbasic
90 24553 Wed May 24, 2017 7:53 pm
Falcon*93 View latest post
No new posts [IDEA] Introducing the new "Haasboy Engine"
Author: Haasboy
2 1274 Fri Aug 01, 2008 10:37 am
dcbasic View latest post
No new posts [SDL-Help] Wall patches fix
Author: insurrectionman
0 1177 Tue Jul 15, 2008 11:12 am
insurrectionman View latest post
No new posts [Help] Problem with Checkweaponchange function (wolf4sdl)
Author: Mortimer
4 3204 Sat May 17, 2008 11:26 am
Mortimer 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