mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-21 19:51:12 +00:00
- Doom-style automap WIP
This commit is contained in:
parent
fd3fccdc7a
commit
f0f32d8402
6 changed files with 2801 additions and 1 deletions
|
@ -1019,6 +1019,7 @@ set (PCH_SOURCES
|
|||
build/src/mdsprite.cpp
|
||||
build/src/polymost.cpp
|
||||
|
||||
core/am_map.cpp
|
||||
core/actorinfo.cpp
|
||||
core/zcc_compile_raze.cpp
|
||||
core/vmexports.cpp
|
||||
|
|
|
@ -193,4 +193,9 @@ public:
|
|||
void Fill(PalEntry color, double x, double y, double w, double h, int flags = 0);
|
||||
void SetClipRect(double x, double y, double w, double h, int flags = 0);
|
||||
|
||||
};
|
||||
int GetTopOfStatusbar() const
|
||||
{
|
||||
return SBarTop;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
2711
source/core/am_map.cpp
Normal file
2711
source/core/am_map.cpp
Normal file
File diff suppressed because it is too large
Load diff
77
source/core/am_map.h
Executable file
77
source/core/am_map.h
Executable file
|
@ -0,0 +1,77 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright 1993-1996 id Software
|
||||
// Copyright 1999-2016 Randy Heit
|
||||
// Copyright 2002-2016 Christoph Oelckers
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see http://www.gnu.org/licenses/
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
#ifndef __AMMAP_H__
|
||||
#define __AMMAP_H__
|
||||
|
||||
#include "dobject.h"
|
||||
#include "maptypes.h"
|
||||
|
||||
struct event_t;
|
||||
class FSerializer;
|
||||
struct FLevelLocals;
|
||||
|
||||
class DAutomapBase : public DObject
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(DAutomapBase, DObject);
|
||||
public:
|
||||
DVector2 playerPos;
|
||||
DAngle playerAngle;
|
||||
bool viewactive;
|
||||
|
||||
// Called by main loop.
|
||||
virtual bool Responder(event_t* ev, bool last) = 0;
|
||||
|
||||
// Called by main loop.
|
||||
virtual void Ticker(void) = 0;
|
||||
|
||||
// Called by main loop,
|
||||
// called instead of view drawer if automap active.
|
||||
virtual void Drawer(int bottom) = 0;
|
||||
|
||||
virtual void NewResolution() = 0;
|
||||
virtual void LevelInit() = 0;
|
||||
virtual void UpdateShowAllLines() = 0;
|
||||
virtual void GoBig() = 0;
|
||||
virtual void ResetFollowLocation() = 0;
|
||||
virtual int addMark() = 0;
|
||||
virtual bool clearMarks() = 0;
|
||||
virtual DVector2 GetPosition() = 0;
|
||||
virtual void startDisplay() = 0;
|
||||
|
||||
void SetPlayerPos(int x, int y)
|
||||
{
|
||||
playerPos.X = maptoworld * x;
|
||||
playerPos.Y = maptoworld * y;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
extern BitArray show2dsector;
|
||||
extern BitArray show2dwall;
|
||||
|
||||
void AM_StaticInit();
|
||||
void AM_ClearColorsets(); // reset data for a restart.
|
||||
DAutomapBase *AM_Create(FLevelLocals *Level);
|
||||
void AM_Stop();
|
||||
void AM_ToggleMap();
|
||||
|
||||
#endif
|
|
@ -261,6 +261,7 @@ enum gameaction_t : int
|
|||
ga_loadgamehidecon,
|
||||
ga_newgamenostopsound, // start a new game
|
||||
ga_endscreenjob,
|
||||
ga_togglemap,
|
||||
|
||||
ga_fullconsole,
|
||||
};
|
||||
|
|
|
@ -47,6 +47,11 @@ struct gameinfo_t
|
|||
FName mSliderBackColor;
|
||||
FString mBackButton;
|
||||
FString TitlePage;
|
||||
|
||||
FString mMapArrow;
|
||||
FString mCheatMapArrow;
|
||||
FString mEasyKey;
|
||||
FString mCheatKey;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue