(Old code tutorial) Read This! enabling... from Team Aardwolf Forums

View previous topic View next topic Go down

(Old code tutorial) Read This! enabling... from Team Aardwolf Forums

Post by Officer-M. John (Admin) on Sat Apr 23, 2016 9:16 am

Subject: Read This! enabling. Mon Mar 26, 2007 6: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.

Writte by WLHack on Sat Jul 28, 2007 12:36 pm
avatar
Officer-M. John (Admin)
Admin

Posts : 323
Join date : 2015-10-02
Age : 19

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

Re: (Old code tutorial) Read This! enabling... from Team Aardwolf Forums

Post by Ferir987 on Thu Feb 23, 2017 8:01 pm

Whats the Ardwolf Forum? :O
I never heard of it!
avatar
Ferir987
Cool mod maker
Cool mod maker

Posts : 199
Join date : 2016-04-15
Age : 18
Location : Hungary,Heves Gyöngyös country

View user profile https://jhoni196.blogspot.hu/

Back to top Go down

Re: (Old code tutorial) Read This! enabling... from Team Aardwolf Forums

Post by Officer-M. John (Admin) on Fri Feb 24, 2017 8:07 am

It is the same as the other Wolf 3D forum.
avatar
Officer-M. John (Admin)
Admin

Posts : 323
Join date : 2015-10-02
Age : 19

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

Re: (Old code tutorial) Read This! enabling... from Team Aardwolf Forums

Post by Ferir987 on Sun Feb 26, 2017 2:08 pm

Officer-M. John (Admin) wrote:It is the same as the other Wolf 3D forum.

Ok but whats the forums url?
avatar
Ferir987
Cool mod maker
Cool mod maker

Posts : 199
Join date : 2016-04-15
Age : 18
Location : Hungary,Heves Gyöngyös country

View user profile https://jhoni196.blogspot.hu/

Back to top Go down

Re: (Old code tutorial) Read This! enabling... from Team Aardwolf Forums

Post by Officer-M. John (Admin) on Sun Feb 26, 2017 4:40 pm

http://wolf3d.forumotion.com/forum

But the Forum is inactive.
avatar
Officer-M. John (Admin)
Admin

Posts : 323
Join date : 2015-10-02
Age : 19

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

Re: (Old code tutorial) Read This! enabling... from Team Aardwolf Forums

Post by Ferir987 on Mon Feb 27, 2017 10:35 pm

Officer-M. John (Admin) wrote:http://wolf3d.forumotion.com/forum

But the Forum is inactive.

Ok but then what?
I can't see itt? Question Question
avatar
Ferir987
Cool mod maker
Cool mod maker

Posts : 199
Join date : 2016-04-15
Age : 18
Location : Hungary,Heves Gyöngyös country

View user profile https://jhoni196.blogspot.hu/

Back to top Go down

Re: (Old code tutorial) Read This! enabling... from Team Aardwolf Forums

Post by Officer-M. John (Admin) on Tue Feb 28, 2017 8:06 am

I sended a link.
avatar
Officer-M. John (Admin)
Admin

Posts : 323
Join date : 2015-10-02
Age : 19

View user profile http://wolf3dfanboys.usersboard.com

Back to top Go down

Re: (Old code tutorial) Read This! enabling... from Team Aardwolf Forums

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum