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] Enhancing the Tab+L level ratio 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
Andy_Nonymous
Moderator
<B>Moderator</B>


Joined: 02 Apr 2003
Last Visit: 17 Feb 2015

Topics: 99
Posts: 589
Location: New Jersey, USA
usa.gif

PostPosted: Sat Jul 13, 2013 9:57 am
   Subject: [tutorial] Enhancing the Tab+L level ratio cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Bottom of Posts

The current Tab+L cheat shows you what your level stats and times have been for completed levels. The current design works for Wolf3d episodes (8 entries shown) and the Spear of Destiny game (20 entries shown). For seamless mods that are over 20 levels, we want to see everything, right?

And another thing, some mods have crazy big levels that take more than 10 minutes to finish. The current Tab+L window doesn't have enough room to fit times over 10 minutes, so the text spills beyond the right edge of the window. Ugly!

To fix all this, go into WL_DEBUG.CPP and add the code in blue, change the code in red:
::: CODE :::
    else if (Keyboard[sc_L])        // L = level ratios
    {
        byte x,start,end=LRpack;

        if (end == 8)   // wolf3d
        {
            CenterWindow(19,10);
            start = 0;
        }
        else            // sod
        {
            CenterWindow(19,12);
            start = 0; end = 10;
        }
again:
        for(x=start;x<end;x++)
        {
            US_PrintUnsigned(x+1);
            US_Print(" ");
            US_PrintUnsigned(LevelRatios[x].time/60);
            US_Print(":");
            if (LevelRatios[x].time%60 < 10)
                US_Print("0");
            US_PrintUnsigned(LevelRatios[x].time%60);
            US_Print(" ");
            US_PrintUnsigned(LevelRatios[x].kill);
            US_Print("% ");
            US_PrintUnsigned(LevelRatios[x].secret);
            US_Print("% ");
            US_PrintUnsigned(LevelRatios[x].treasure);
            US_Print("%\n");
        }
        VW_UpdateScreen();
        IN_Ack();
        if (end == 10 && gamestate.mapon > 9)
        {
            start = 10; end = 20;
            CenterWindow(19,12);
            goto again;
        }
        if (end == 20 && gamestate.mapon > 19)
        {
            start = 20; end = 30;
            CenterWindow(19,12);
            goto again;
        }
        if (end == 30 && gamestate.mapon > 29)
        {
            start = 30; end = 40;
            CenterWindow(19,12);
            goto again;
        }
        if (end == 40 && gamestate.mapon > 39)
        {
            start = 40; end = 50;
            CenterWindow(19,12);
            goto again;
        }
        if (end == 50 && gamestate.mapon > 49)
        {
            start = 50; end = 60;
            CenterWindow(19,12);
            goto again;
        }

        return 1;
    }

This works on games up to 60 levels long.

Enjoy!
Andy
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 14640 Tue Aug 24, 2010 10:18 am
dcbasic View latest post
No new posts Sticky: [Tutorial] Compiling Wolf4SDL with Code::Blocks
Author: dcbasic
90 22956 Wed May 24, 2017 7:53 pm
Falcon*93 View latest post
No new posts [HELP] sounds crush game?
Author: Raziel
23 6734 Wed Jul 30, 2008 12:41 pm
RichterBelmont12 View latest post
No new posts [SDL-Help] Wall patches fix
Author: insurrectionman
0 1101 Tue Jul 15, 2008 11:12 am
insurrectionman View latest post
No new posts [Wolf4SDL Help] Inserting a second palette (like in SoD)
Author: Andy_Nonymous
10 3047 Mon Jun 02, 2008 3:59 pm
Adam Biser 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