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       

Game crashes after title sequence and completing game
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
Tris
Can I Play Daddy
Can I Play Daddy


Joined: 02 May 2017
Last Visit: 25 May 2018

Topics: 4
Posts: 47
Location: wien
austria.gif

PostPosted: Sun May 13, 2018 11:58 am
   Subject: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Hi all,

In our SDL EXE we have the following recurring problems:

- When you start the game and view the title screen and credits screen, the game crashes when it should go to the PlayDemo (); function.

- When you complete the game and the game should go to the high scores roster, the game crashes.
We believe it has something to do with the highscores roster, but we don't know what causes the crash.

Anyone?
Aryan_Wolf3D
I am Death Incarnate
I am Death Incarnate


Joined: 21 Jul 2011
Last Visit: 26 May 2018

Topics: 6
Posts: 181

blank.gif

PostPosted: Sun May 13, 2018 12:12 pm
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

My guess would be that there's a problem with the DemoLoop function, but it's impossible to be sure without seeing your code.

_________________
"Way too many #ifdefs in the code!" - John Carmack
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: Online Now

Topics: 72
Posts: 3746

blank.gif

PostPosted: Sun May 13, 2018 12:43 pm
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

My guess is it's the high score screen, as it always crashes when that particular screen is reached. Deactivating demo's didn't change anything. Anyway, to put it into context, the coding base for this source is Andy's v1.8 source code: http://diehardwolfers.areyep.com/downloads.php?view=detail&id=79

And here's the DemoLoop function:

::: CODE :::
/*
=====================
=
= DemoLoop
=
=====================
*/


static void DemoLoop()
{
    int LastDemo = 0;

//
// check for launch from ted
//
    if (param_tedlevel != -1)
    {
        param_nowait = true;
        EnableEndGameMenuItem();
        NewGame(param_difficulty,0);

#ifndef SPEAR
        gamestate.episode = param_tedlevel/10;
        gamestate.mapon = param_tedlevel%10;
#else
        gamestate.episode = 0;
        gamestate.mapon = param_tedlevel;
#endif
        GameLoop();
        Quit (NULL);
    }


//
// main game cycle
//

#ifndef DEMOTEST

    #ifndef UPLOAD

        #ifndef GOODTIMES
        #ifndef SPEAR
        #ifndef JAPAN
        if (!param_nowait)
            NonShareware();
        #endif
        #else
            #ifndef GOODTIMES
            #ifndef SPEARDEMO
            extern void CopyProtection(void);
            if(!param_goodtimes)
                CopyProtection();
            #endif
            #endif
        #endif
        #endif
    #endif

    StartCPMusic(INTROSONG);

#ifndef JAPAN
//    if (!param_nowait)
//        PG13 ();
#endif

#endif

    while (1)
    {
        while (!param_nowait)
        {
//
// title page
//
#ifndef DEMOTEST

#ifdef SPEAR
            SDL_Color pal[256];
            CA_CacheGrChunk (TITLEPALETTE);
            VL_ConvertPalette(grsegs[TITLEPALETTE], pal, 256);

            CA_CacheGrChunk (TITLE1PIC);
            VWB_DrawPic (0,0,TITLE1PIC);
            UNCACHEGRCHUNK (TITLE1PIC);

            CA_CacheGrChunk (TITLE2PIC);
            VWB_DrawPic (0,80,TITLE2PIC);
            UNCACHEGRCHUNK (TITLE2PIC);
            VW_UpdateScreen ();
            VL_FadeIn(0,255,pal,30);

            UNCACHEGRCHUNK (TITLEPALETTE);
#else
            CA_CacheScreen (TITLEPIC);
            VW_UpdateScreen ();
            VW_FadeIn();
#endif
            if (IN_UserInput(TickBase*15))
                break;
            VW_FadeOut();
//
// credits page
//
            CA_CacheScreen (CREDITSPIC);
            VW_UpdateScreen();
            VW_FadeIn ();
            if (IN_UserInput(TickBase*10))
                break;
            VW_FadeOut ();
//
// high scores
//
            DrawHighScores ();
            VW_UpdateScreen ();
            VW_FadeIn ();

            if (IN_UserInput(TickBase*10))
                break;
#endif
//
// demo
//

            #ifndef SPEARDEMO
            VW_FadeOut();
            #else
            VW_FadeOut();
            #endif

            if (playstate == ex_abort)
                break;
            VW_FadeOut();
            if(screenHeight % 200 != 0)
                VL_ClearScreen(0);
//            StartCPMusic(INTROSONG);
        }

        VW_FadeOut ();

#ifdef DEBUGKEYS
        if (Keyboard[sc_Tab] && param_debugmode)
            RecordDemo ();
        else
            US_ControlPanel (0);
#else
        US_ControlPanel (0);
#endif

        if (startgame || loadedgame)
        {
            GameLoop ();
            if(!param_nowait)
            {
                VW_FadeOut();
                StartCPMusic(INTROSONG);
            }
        }
    }
}


//===========================================================================


But again, my guess would be that it's high score screen causing the crashes. Since it happens both at the beginning and the end of the game (where there are no demo's).
Wolf3DGuy
Bring 'em On
Bring 'em On


Joined: 01 Aug 2017
Last Visit: 1:24 ago.

Topics: 4
Posts: 87
Location: Hungary
hungary.gif

PostPosted: Sun May 13, 2018 4:15 pm
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Just a question, are you using Wolf3D or SOD?

If you're using Wolf3D, have you tried to put a background image in the menu?

_________________
Wolf3DGuy is so Wolf3DGuy.
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 21:06 ago.

Topics: 38
Posts: 2458
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Sun May 13, 2018 5:07 pm
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Using the debugger might be worthwhile; failing that I can probably take a look sometime today if you want to email me the files.
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: Online Now

Topics: 72
Posts: 3746

blank.gif

PostPosted: Sun May 13, 2018 5:12 pm
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Wolf3DGuy wrote:
If you're using Wolf3D, have you tried to put a background image in the menu?


I am using Wolf3D, and indeed I've put a background imagine in the menu. Is that what's causing the problem?

Quote:
Using the debugger might be worthwhile; failing that I can probably take a look sometime today if you want to email me the files.


It does sound like Wolf3DGuy might have the solution, or at the very least recognizes the proble. But if it doesn't lead to a solution, I'll gladly send over the files. It's been a bug for quite some time now, I'll be really happy when it's gone Very Happy
Wolf3DGuy
Bring 'em On
Bring 'em On


Joined: 01 Aug 2017
Last Visit: 1:24 ago.

Topics: 4
Posts: 87
Location: Hungary
hungary.gif

PostPosted: Sun May 13, 2018 5:39 pm
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Well, I ran into he same problem, I used Wolf3D and tried to put a background image and whenever I tried to take a look at the high scores the game crashed, even if I finished with the game. So maybe yeah I recognised it, also can solve it because I managed to fix this in my mod, and furthermore I helped OMJ once because he tried to do the same and his mod crashed at the same point.

I can take a look if you send the code in PM.

_________________
Wolf3DGuy is so Wolf3DGuy.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 6:26 ago.

Topics: 163
Posts: 8138
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sun May 13, 2018 7:14 pm
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

If you're adding images to the VGAGRAPH file, you'll need to change one of the GFXV_??? files to make things work again. As to which GFXV file it is, it depends on what mode you have the code running in. For Spear Of Destiny, it's GFXV_SOD.H. But if you're running Wolf3D, it's either GFXV_APO.H or GFXV_WL6.H.
Aryan_Wolf3D
I am Death Incarnate
I am Death Incarnate


Joined: 21 Jul 2011
Last Visit: 26 May 2018

Topics: 6
Posts: 181

blank.gif

PostPosted: Mon May 14, 2018 12:19 am
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

If the menu background image is causing the problem, then it's probably not being cached when it needs to be drawn... Or possibly it's being uncached before it has been cached. Make sure you have something like this whenever it needs to be drawn...

::: CODE :::
CA_CacheGrChunk (MENUBACKDROPPIC);

...

UNCACHEGRCHUNK (MENUBACKDROPPIC);

_________________
"Way too many #ifdefs in the code!" - John Carmack
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: Online Now

Topics: 72
Posts: 3746

blank.gif

PostPosted: Mon May 14, 2018 2:49 am
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

^^Thanks, that seems to have solved it! Smile
Aryan_Wolf3D
I am Death Incarnate
I am Death Incarnate


Joined: 21 Jul 2011
Last Visit: 26 May 2018

Topics: 6
Posts: 181

blank.gif

PostPosted: Mon May 14, 2018 6:39 am
   Subject: Re: Game crashes after title sequence and completing game
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Glad I could help. Smile

_________________
"Way too many #ifdefs in the code!" - John Carmack
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 14136 Tue Aug 24, 2010 10:18 am
dcbasic View latest post
No new posts [HELP] sounds crush game?
Author: Raziel
23 6392 Wed Jul 30, 2008 12:41 pm
RichterBelmont12 View latest post
No new posts [Help] Gun Bobbing in SDL
Author: RichterBelmont12
8 2543 Wed Jul 23, 2008 6:37 pm
Tricob View latest post
No new posts [Help] Problem with Checkweaponchange function (wolf4sdl)
Author: Mortimer
4 2874 Sat May 17, 2008 11:26 am
Mortimer View latest post
No new posts [SDL] Apply 2nd ScaleFactor to selected (hi-res) vga gfx
Author: Andy_Nonymous
9 4068 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