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       

[help] Intermission Screens on SDL
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
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Thu Dec 04, 2008 9:43 am
   Subject: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Ok I'm lost on this one.....How do you get the Intermission Screens to work on SDL]

the Original code doesn't work

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 0:33 ago.

Topics: 160
Posts: 8011
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Thu Dec 04, 2008 7:11 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

What happens when you try the original code? And have you tried Rebuild All?
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Thu Dec 04, 2008 7:35 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

yes it say something about the Intermission Void thing in w_text.cpp..i don't remember

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2256
Location: Ontario
canada.gif

PostPosted: Thu Dec 04, 2008 8:25 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I've installed and tested it here... so I'll have to dig it out of my source.... I know I changed a little to install it in the SDL version, but off the top of my head I don't remember all the changes. When I get back from getting my bi-weekly nerve block tomorrow, I'll post up the changes..

Greg
BrotherTank
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Thu Dec 04, 2008 8:58 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks BT..I'll be Waiting for the code

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2256
Location: Ontario
canada.gif

PostPosted: Sat Dec 06, 2008 6:49 am
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Richter Belmont wrote:
Thanks BT..I'll be Waiting for the code


Not A Problem.... Sorry it took a little longer....

In VERSION.H Add:

::: CODE :::
#define AUTOINTER


In WL_DEF.H Add:

::: CODE :::
extern  void    IntermissionScreens (void);
Somewhere near the WL_TEXT defines already in the file... I can go anywhere really, but putting it there shows you where the main routine is at.

At the END of WL_TEXT.C Add:

::: CODE :::

#ifdef AUTOINTER
/*
======================
=
= Intermission Screens by BrotherTank
=
======================
*/
void IntermissionScreens (void)
{
   struct stat statbuf;
   char        *text;
   memptr      layout;
   char intfilename[13] =  "INTART00";
   strcat(intfilename,extension);
#ifndef SPEAR
  #ifndef SEAMLESS
   intfilename[6] = '0' + (gamestate.episode+1);
   intfilename[7] = '0' + (gamestate.mapon+1);
  #else
   intfilename[6] = '0' + ((gamestate.mapon+1)/10);
   intfilename[7] = '0' + ((gamestate.mapon+1)%10);
  #endif
#else
   intfilename[6] = '0' + ((gamestate.mapon+1)/10);
   intfilename[7] = '0' + ((gamestate.mapon+1)%10);
#endif
   if (!stat(intfilename, &statbuf))
   {

      CA_LoadFile (intfilename,&layout);
      text = (char *)layout;
 
      ShowArticle (text);

      VW_FadeOut();
     
      free(layout);
     
      FreeMusic ();
   }
}
#endif


Now in your WL_GAME.C file... find the gameloop routine at the beginning make it look like this:

::: CODE :::
void GameLoop (void)
{
  boolean died;
#ifdef MYPROFILE
  clock_t start,end;
#endif

restartgame:
  ClearMemory ();
  SETFONTCOLOR(0,15);
  VW_FadeOut();
#ifdef AUTOINTER
  ClearMScreen();
  IntermissionScreens (); // Intermission Text - Shown when starting new game
  ClearMemory ();
#endif


Now scroll down in the routine and just before the "case ex_died:" line add this:

::: CODE :::
#ifdef AUTOINTER
        IntermissionScreens (); // Intermission Screen If file exists
        ClearMemory ();
        DrawPlayScreen ();
#endif


Now make the beginning of the Case ex_died look like this:

::: CODE :::
        case ex_died:
          Died ();
          died = true;                    // don't "get psyched!"

          if (gamestate.lives > -1)
#ifdef AUTOINTER
          {
            VW_FadeOut();
            ClearMScreen();
            ClearMemory ();
            IntermissionScreens (); // Intermission Text
            ClearMemory ();
            DrawPlayScreen ();
#endif
            break;                          // more lives left
#ifdef AUTOINTER
          }
#endif
          VW_FadeOut ();

and so on... the lines below the vw_fadeout line above haven't changed....

Now save it all and give it a compile... it should work... It does here...
Now that's Easy Intermission Screens.... by Tank

Greg
BrotherTank
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Sat Dec 06, 2008 9:15 am
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks i'll test it out

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Sat Dec 06, 2008 10:23 am
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Wried i'm getting something like

871 C:\Wolf4SDL-1.6-src\wl_text.cpp aggregate `stat statbuf' has incomplete type and cannot be defined
888 C:\Wolf4SDL-1.6-src\wl_text.cpp invalid use of undefined type `struct stat'
871 C:\Wolf4SDL-1.6-src\wl_text.cpp forward declaration of `struct stat'

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 2:00 ago.

Topics: 37
Posts: 2401
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Sat Dec 06, 2008 10:57 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Make sure you didn't miss the struct before 'stat statbuf'.
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Sun Dec 07, 2008 12:59 am
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

What do you mean by that?

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 0:33 ago.

Topics: 160
Posts: 8011
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sun Dec 07, 2008 6:10 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I think he means that the lines of code should read:

::: CODE :::
void IntermissionScreens (void)
{
   struct stat statbuf;
   char        *text;


If you have it read:
::: CODE :::
void IntermissionScreens (void)
{
   stat statbuf;
   char        *text;
... then that's what's causing the problem. Look closely at the line ending with the word "statbuf;".
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Sun Dec 07, 2008 6:38 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

even i did add that..there is still errors..that same one

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Tue Dec 09, 2008 8:08 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Here is my Source Code To LOOK AT ONLY..cause i don't get it...

http://www.zshare.net/download/5251361359605208/

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Wed Dec 17, 2008 6:40 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

did you find out the problem?

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
Havoc
I am Death Incarnate
I am Death Incarnate


Joined: 03 Sep 2004
Last Visit: 16 Mar 2017

Topics: 7
Posts: 190
Location: Germany
blank.gif

PostPosted: Thu Dec 18, 2008 3:41 am
   Subject: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

In order to fix the problem do the following:

Open the wl_text.cpp and change the top of the file to look like this:

::: CODE :::
// WL_TEXT.C

#include <sys/stat.h>
#include <sys/types.h>
#ifdef _WIN32
   #include <io.h>
#else
   #include <unistd.h>
#endif

#include "wl_def.h"
#pragma hdrstop


Now a little fix in the IntermissionScreens function needs to be done. Find this line in the function:

::: CODE :::
char        intfilename[13] = "INTART00";


and change it to this

::: CODE :::
char        intfilename[13] = "INTART00.";


These changes should fix all problems Thumbs Up

_________________
Havoc's Wolf3D Page - updated 02/20/2017
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 13 Nov 2017

Topics: 97
Posts: 1505
Location: New Jersey
usa.gif

PostPosted: Thu Dec 18, 2008 11:59 am
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yes..it worked Thanks a Bunch Havoc for the Fix and BT For the Code

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2256
Location: Ontario
canada.gif

PostPosted: Fri Dec 19, 2008 7:37 am
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yep.. sorry bout that... I just read the series of the posts and checked my source and forgot to put that in the fixed code I posted earlier..... And yes... I did forget the period in the filename as well.. my bad. The fixes posted are almost identical to my code...

Mine is:
::: CODE :::

#ifdef AUTOINTER
   #include <io.h>
#else
   #include <unistd.h>
#endif


But, good to see that you got it figured out and hopefully when they stop changing my meds, I'll be a little more awake at the switch as they say... Anyhoo... I'm off for yet another nerve block this afternoon, even in this major snow storm that we are having...

Greg
BrotherTank
Nembo
Can I Play Daddy
Can I Play Daddy


Joined: 26 Feb 2006
Last Visit: 01 Oct 2017

Topics: 5
Posts: 35

usa.gif

PostPosted: Sun Dec 06, 2009 1:34 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Have a small problem.

Before the first and second level it uses intart11.wl6. Before the third level it runs intart12.wl6 for the fourth level intart13.wl6, and so on.

Any thoughts on why it would be using the same file for both the first and second level?
Soldat 555
Guest



Last Visit:





PostPosted: Tue Aug 23, 2011 8:32 pm
   Subject: Re: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I had that same issue, Nembo. To fix it I rearranged the code in WL_Game.CPP to look like this...
::: CODE :::

                        //
                        // GOING TO NEXT LEVEL
                        //
                        gamestate.mapon++;
                        IntermissionScreens (); // Intermission Screen If file exists
                        ClearMemory ();
                        DrawPlayScreen ();

                break;

            case ex_died:
                Died ();
                died = true;                    // don't "get psyched!"
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 2:00 ago.

Topics: 37
Posts: 2401
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Thu Jun 22, 2017 10:06 pm
   Subject: [help] Intermission Screens on SDL
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

I've written a quick rewrite of the IntermissionScreens function so that it doesn't use the 'stat' function, as it sometimes corrupts the string passed to it (I have yet to determine why). Thankfully the stat function was actually unnecessary in the first place, as CA_LoadFile will return false if the file doesn't exist or it's otherwise unable to open it.

::: CODE :::
void IntermissionScreens (void)
{
    memptr      layout;
   
    char intfilename[13] =  "INTART00.";
    strcat(intfilename,extension);
   
#ifndef SPEAR
  #ifndef SEAMLESS
    intfilename[6] = '0' + (gamestate.episode+1);
    intfilename[7] = '0' + (gamestate.mapon+1);
  #else
     intfilename[6] = '0' + ((gamestate.mapon+1)/10);
     intfilename[7] = '0' + ((gamestate.mapon+1)%10);
  #endif
#else
     intfilename[6] = '0' + ((gamestate.mapon+1)/10);
     intfilename[7] = '0' + ((gamestate.mapon+1)%10);
#endif

    if (CA_LoadFile (intfilename,&layout))
    {
        ShowArticle ((char *)layout);
        VW_FadeOut();
        free(layout);
        FreeMusic ();
    }
}
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 [help] Adding teleporters in wolf4sdl
Author: Mortimer
35 7362 Fri May 26, 2017 8:19 am
Military View latest post
No new posts [WOLF4SDL Help] Blake Stone Style doors
Author: Haasboy
3 2197 Sun Jul 20, 2008 7:56 am
Haasboy View latest post
No new posts [Help] Problem with Checkweaponchange function (wolf4sdl)
Author: Mortimer
4 2335 Sat May 17, 2008 11:26 am
Mortimer View latest post
No new posts [help] Wolf4sdl's implemented tutorials
Author: Mortimer
6 2482 Tue May 06, 2008 1:15 pm
Ripper View latest post
No new posts [SDL] Apply 2nd ScaleFactor to selected (hi-res) vga gfx
Author: Andy_Nonymous
9 3276 Sun Apr 27, 2008 2:30 am
AlumiuN 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