mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 08:01:50 +00:00
- disabled old finale code
- rough outline of new intermission interface. SVN r2869 (finale)
This commit is contained in:
parent
024bbeb171
commit
39f15b818c
11 changed files with 3215 additions and 3066 deletions
|
@ -57,7 +57,7 @@
|
|||
#include "w_wad.h"
|
||||
#include "s_sound.h"
|
||||
#include "v_video.h"
|
||||
#include "f_finale.h"
|
||||
#include "intermission/intermission.h"
|
||||
#include "f_wipe.h"
|
||||
#include "m_argv.h"
|
||||
#include "m_misc.h"
|
||||
|
|
|
@ -182,12 +182,6 @@ void F_StartFinale (const char *music, int musicorder, int cdtrack, unsigned int
|
|||
}
|
||||
}
|
||||
|
||||
void F_EndFinale ()
|
||||
{
|
||||
FinaleText = NULL;
|
||||
FinaleTextLen = 0;
|
||||
}
|
||||
|
||||
bool F_Responder (event_t *event)
|
||||
{
|
||||
if (FinaleStage == 3)
|
||||
|
|
|
@ -32,22 +32,6 @@ struct event_t;
|
|||
// FINALE
|
||||
//
|
||||
|
||||
// Called by main loop.
|
||||
bool F_Responder (event_t* ev);
|
||||
|
||||
// Called by main loop.
|
||||
void F_Ticker ();
|
||||
|
||||
// Called by main loop.
|
||||
void F_Drawer ();
|
||||
|
||||
|
||||
void F_StartFinale (const char *music, int musicorder, int cdtrack, unsigned int cdid, const char *flat,
|
||||
const char *text, INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText,
|
||||
bool ending, int endsequence = 0);
|
||||
|
||||
void F_StartSlideshow ();
|
||||
|
||||
void F_EndFinale ();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "doomstat.h"
|
||||
#include "d_protocol.h"
|
||||
#include "d_netinf.h"
|
||||
#include "f_finale.h"
|
||||
#include "intermission/intermission.h"
|
||||
#include "m_argv.h"
|
||||
#include "m_misc.h"
|
||||
#include "menu/menu.h"
|
||||
|
@ -1031,7 +1031,8 @@ void G_Ticker ()
|
|||
G_DoCompleted ();
|
||||
break;
|
||||
case ga_slideshow:
|
||||
F_StartSlideshow ();
|
||||
#pragma message("disabled for finale rewrite")
|
||||
//F_StartSlideshow ();
|
||||
break;
|
||||
case ga_worlddone:
|
||||
G_DoWorldDone ();
|
||||
|
@ -1062,10 +1063,6 @@ void G_Ticker ()
|
|||
Page->Unload();
|
||||
Page = NULL;
|
||||
}
|
||||
else if (oldgamestate == GS_FINALE)
|
||||
{
|
||||
F_EndFinale ();
|
||||
}
|
||||
}
|
||||
|
||||
// get commands, check consistancy, and build new consistancy check
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include "p_local.h"
|
||||
#include "r_sky.h"
|
||||
#include "c_console.h"
|
||||
#include "f_finale.h"
|
||||
#include "intermission/intermission.h"
|
||||
#include "gstrings.h"
|
||||
#include "v_video.h"
|
||||
#include "st_stuff.h"
|
||||
|
@ -1024,7 +1024,11 @@ void G_WorldDone (void)
|
|||
|
||||
thiscluster = FindClusterInfo (level.cluster);
|
||||
|
||||
if (strncmp (nextlevel, "enDSeQ", 6) == 0)
|
||||
if (level.info->Intermission != NAME_None)
|
||||
{
|
||||
// todo start intermission
|
||||
}
|
||||
else if (strncmp (nextlevel, "enDSeQ", 6) == 0)
|
||||
{
|
||||
F_StartFinale (thiscluster->MessageMusic, thiscluster->musicorder,
|
||||
thiscluster->cdtrack, thiscluster->cdid,
|
||||
|
|
|
@ -286,6 +286,7 @@ struct level_info_t
|
|||
DWORD compatmask;
|
||||
FString Translator; // for converting Doom-format linedef and sector types.
|
||||
int DefaultEnvironment; // Default sound environment for the map.
|
||||
FName Intermission;
|
||||
|
||||
// Redirection: If any player is carrying the specified item, then
|
||||
// you go to the RedirectMap instead of this one.
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "p_enemy.h"
|
||||
#include "s_sound.h"
|
||||
#include "a_strifeglobal.h"
|
||||
#include "f_finale.h"
|
||||
#include "thingdef/thingdef.h"
|
||||
#include "g_level.h"
|
||||
#include "doomstat.h"
|
||||
|
|
58
src/intermission/intermission.cpp
Normal file
58
src/intermission/intermission.cpp
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
** intermission.cpp
|
||||
** Framework for intermissions (text screens, slideshows, etc)
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2010 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions
|
||||
** are met:
|
||||
**
|
||||
** 1. Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in the
|
||||
** documentation and/or other materials provided with the distribution.
|
||||
** 3. The name of the author may not be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
|
||||
#include "doomtype.h"
|
||||
#include "d_event.h"
|
||||
#include "intermission/intermission.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Called by main loop.
|
||||
bool F_Responder (event_t* ev) { return true; }
|
||||
|
||||
// Called by main loop.
|
||||
void F_Ticker () {}
|
||||
|
||||
// Called by main loop.
|
||||
void F_Drawer () {}
|
||||
|
||||
// starts a cluster transition. This will create a proper intermission object from the passed data
|
||||
void F_StartFinale (const char *music, int musicorder, int cdtrack, unsigned int cdid, const char *flat,
|
||||
const char *text, INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText,
|
||||
bool ending, int endsequence) {}
|
||||
|
99
src/intermission/intermission.h
Normal file
99
src/intermission/intermission.h
Normal file
|
@ -0,0 +1,99 @@
|
|||
#ifndef __INTERMISSION_H
|
||||
#define __INTERMISSION_H
|
||||
|
||||
#include "dobject.h"
|
||||
|
||||
struct event_t;
|
||||
|
||||
enum
|
||||
{
|
||||
// For all tags the format is:
|
||||
|
||||
// 1 DWORD: tag value
|
||||
// 1 DWORD: size of this tag including all parameters
|
||||
// n DWORDs: parameters. Strings are DWORD aligned
|
||||
|
||||
// common
|
||||
ITAG_Class, // parameter: 1 name describing the type of screen
|
||||
ITAG_Done, // parameter: 1 string describing the next level. If empty the screen will stay.
|
||||
ITAG_Music, // parameter: 1 string + 1 int describing the music (+order) to be played
|
||||
ITAG_Cdmusic, // parameter: 1 int cdtrack + 1 int cdid
|
||||
ITAG_DrawImage, // parameter: 1 texture ID, x and y coordinates
|
||||
|
||||
// text screens
|
||||
ITAG_Textscreen_Text, // parameter: 1 string
|
||||
ITAG_Textscreen_Textlump, // parameter: 1 int (lump index) Only used when Text not defined.
|
||||
|
||||
// slide show slide
|
||||
ITAG_Slide_Sound, // parameter: 1 sound ID of sound to be played when starting the screen
|
||||
ITAG_Slide_Delay, // parameter: 1 int (seconds this screen remains, cannot be skipped. -1 means to wait for the sound to end.
|
||||
|
||||
// scroller
|
||||
ITAG_Scroll_Direction, // parameter: 1 int (0=up, 1 = down, 2 = left, 3 = right)
|
||||
ITAG_Scroll_Speed, // parameter: 1 int (scroll speed in tics per frame
|
||||
|
||||
// cast call
|
||||
ITAG_Cast_NewActor, // parameter: 1 FName
|
||||
ITAG_Cast_State, // parameter: 0-terminated list of FNames describing the state label
|
||||
ITAG_Cast_Sound, // parameter: 1 sound ID
|
||||
};
|
||||
|
||||
class FIntermissionDescriptor
|
||||
{
|
||||
TArray<DWORD> mTaglist;
|
||||
int mReadPosition;
|
||||
|
||||
public:
|
||||
void Reset();
|
||||
bool Advance();
|
||||
int GetTag();
|
||||
int GetTagValue();
|
||||
double GetTagFloat();
|
||||
const char *GetTagString();
|
||||
};
|
||||
|
||||
typedef TMap<FName, FIntermissionDescriptor*> FIntermissionDescriptorList;
|
||||
|
||||
extern FIntermissionDescriptorList IntermissionDescriptors;
|
||||
|
||||
class DIntermissionScreen : public DObject
|
||||
{
|
||||
DECLARE_CLASS (DIntermissionScreen, DObject)
|
||||
|
||||
public:
|
||||
|
||||
DIntermissionScreen() {}
|
||||
virtual bool Responder (event_t *ev);
|
||||
virtual void Ticker ();
|
||||
virtual void Drawer () =0;
|
||||
};
|
||||
|
||||
class DIntermissionController : public DObject
|
||||
{
|
||||
DECLARE_CLASS (DIntermissionController, DObject)
|
||||
|
||||
|
||||
public:
|
||||
static DIntermissionController *CurrentIntermission;
|
||||
|
||||
DIntermissionController() {}
|
||||
bool Responder (event_t *ev);
|
||||
void Ticker ();
|
||||
void Drawer ();
|
||||
void Close();
|
||||
};
|
||||
|
||||
|
||||
// Interface for main loop
|
||||
bool F_Responder (event_t* ev);
|
||||
void F_Ticker ();
|
||||
void F_Drawer ();
|
||||
|
||||
// Create an intermission from old cluster data
|
||||
void F_StartFinale (const char *music, int musicorder, int cdtrack, unsigned int cdid, const char *flat,
|
||||
const char *text, INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText,
|
||||
bool ending, int endsequence = 0);
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -44,7 +44,7 @@
|
|||
#include "w_wad.h"
|
||||
#include "cmdlib.h"
|
||||
#include "sbar.h"
|
||||
#include "f_finale.h"
|
||||
#include "intermission/intermission.h"
|
||||
#include "c_console.h"
|
||||
#include "doomdef.h"
|
||||
#include "c_dispatch.h"
|
||||
|
@ -1217,7 +1217,8 @@ void APlayerPawn::Die (AActor *source, AActor *inflictor)
|
|||
}
|
||||
if (!multiplayer && (level.flags2 & LEVEL2_DEATHSLIDESHOW))
|
||||
{
|
||||
F_StartSlideshow ();
|
||||
#pragma message("disabled for finale rewrite")
|
||||
//F_StartSlideshow ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
6076
zdoom.vcproj
6076
zdoom.vcproj
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue