Wolf3d Haven Forum

Please log in or register. Smile
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


    Read This! enabling.

    Share

    WLHack
    Senior Member
    Senior Member

    Male
    Number of posts : 798
    Age : 28
    Location : Finland
    Registration date : 2007-03-26

    Read This! enabling.

    Post by WLHack on Mon Mar 26, 2007 5:56 am

    This is yet another way to add Read This! - screens...
    It works both in the Wolf and S.O.D.

    First of all check out BrotherTanks great tutorial for easy automated
    intermission screen (we modify it to suit our purpose):

    http://diehardwolfers.areyep.com/viewtopic.php?t=2159

    Open WL_Def and add this in the end:

    Code:

    extern void ReadThisScreen(void);

    Now open the WL_TEXT.C and add in the end:

    Code:

    /*
    ============================
    =
    = ReadThis
    = Based on BrotherTanks intermission code
    =
    ============================
    */
    void ReadThisScreen(void)
    {
        struct ffblk f;
        int artnum;
        char far *text;
        memptr layout;

        char intfilename[13] = "HELPART.";
        strcat(intfilename,extension);

        if (!findfirst(intfilename,&f,FA_ARCH))
        {
        CA_UpLevel();
        MM_SortMem();

        CA_LoadFile(intfilename,&layout);
        text = (char _seg *)layout;
        MM_SetLock (&layout,true);

        ShowArticle (text);

        MM_FreePtr(&layout);

        VW_FadeOut();

        FreeMusic();
        CA_DownLevel();
        MM_SortMem();

        }
    }

    Now close the file and open WL_MENU.C.
    First think you should see is "// PRIVATE PROTOTYPES",
    change it to look like this:

    Code:

    //
    // PRIVATE PROTOTYPES
    //
    void CP_ReadThis(void);
    void MY_ReadThis(void);

    Now scroll down until you see this:

    Code:


    #else
      {1,STR_NG,CP_NewGame},
      {1,STR_SD,CP_Sound},
      {1,STR_CL,CP_Control},
      {1,STR_LG,CP_LoadGame},
      {0,STR_SG,CP_SaveGame},
      {1,STR_CV,CP_ChangeView},

    And change it to this:
    Code:

    #else
      {1,STR_NG,CP_NewGame},
      {1,STR_SD,CP_Sound},
      {1,STR_CL,CP_Control},
      {1,STR_LG,CP_LoadGame},
      {0,STR_SG,CP_SaveGame},
      {2,"Read This!",MY_ReadThis},
      {1,STR_CV,CP_ChangeView},

    Now (still in the same file) search for "// READ THIS!" (without quotes)
    and add this above it:

    Code:

    //
    // ReadThisScreens
    //
    void MY_ReadThis(void)
    {
        StartCPMusic(CORNER_MUS); // Change to your liking
        ReadThisScreen(); // Show the Read This!
        StartCPMusic(MENUSONG);

    }

    Goto "// F-KEYS FROM WITHIN GAME"
    and change the "case sc_F1" to this:

    Code:

    VW_FadeOut();
    ClearMScreen();
    ReadThisScreen(); // Show the Read This!
    goto finishup;

    Now close the file and open WL_MENU.H
    First search for these lines:

    Code:

    #ifndef SPEAR
    #define MENU_H 13*10+6
    #else
    #define MENU_H 13*9+6
    #endif

    And change them to this:
    Code:

    #ifndef SPEAR
    #define MENU_H 13*10+6
    #else
    #define MENU_H 13*10+6 // If you want the Read this for Spear
    #endif

    Then search for "// FUNCTION PROTOTYPES" (without quotes)
    and add this under "void CP_Control(void);"

    Code:

    void MY_ReadThis(void);

    Then scroll down to "// VARIABLES" (it is few lines below)
    and change it to this:

    Code:

    //
    // VARIABLES
    //
    extern int SaveGamesAvail[10],StartGame,SoundStatus;
    extern char SaveGameNames[10][32],SaveName[13];

    enum {MOUSE,JOYSTICK,KEYBOARDBTNS,KEYBOARDMOVE}; // FOR INPUT TYPES

    enum
    {
    newgame,
    soundmenu,
    control,
    loadgame,
    savegame,
    changeview,
    readthis,

    #ifndef GOODTIMES
    #ifndef SPEAR
    readthis,
    #endif
    #endif

    viewscores,
    backtodemo,
    quit
    } menuitems;

    And thats all, now if I didn't forget to mention something... your
    Read This file should work now work, of course remember to
    add HELPART."." (your extension here) in your game folder.

    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!

    Male
    Number of posts : 5090
    Age : 22
    Location : USA or Tawain
    Job : Student, Part time Cactuar fanatic
    Hobbie : Planting Cactuars.
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    Re: Read This! enabling.

    Post by Dark_wizzie on Mon Mar 26, 2007 2:58 pm

    again looks cool but i dont know how to complile wolf3d and set it up so...



    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Fri Dec 09, 2016 5:04 pm