Team Aardwolf Forums(wolf3d mods,addons)

A place for Team Aardwolf and anyone else to discuss the Team Aardwolf mods
 
HomePortalFAQSearchRegisterMemberlistUsergroupsLog in

Share | 
 

 [Tutorial] Read This! enabling...

View previous topic View next topic Go down 
AuthorMessage
WLHack



Posts : 15
Join date : 2007-07-26
Age : 28
Location : Loppi - Finland

PostSubject: [Tutorial] Read This! enabling...   Sat Jul 28, 2007 12:36 pm

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.
Back to top Go down
View user profile http://www.freewebs.com/tsalop
 
[Tutorial] Read This! enabling...
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Great Tank and Weathering tutorial
» Power Sword Tutorial (with more to follow)
» Instant Mold Tutorial
» good c++ tutorial series
» After Effects Tutorial - Organic Cell Edges

Permissions in this forum:You cannot reply to topics in this forum
Team Aardwolf Forums(wolf3d mods,addons) :: Team Aardwolf discussion :: Coding quides and help-
Jump to: