mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
- Generates "MINIMAP.png" in your srb2home
- Uses inherited automap code to render to a temporary buffer
- Because am_map.c is a mess of filescope static variables right now, this only works when the automap is disabled.
- Currently an equal alternate method to SLADE's map image export, but because we're in control, additional features can be added later...
- TODO: Off vertically by one pixel on GHZ. Otherwise effectively identical in shape
- TODO: the colours are rancid, I wonder if they were even updated for the 2.2 palette
Related:
- Use identical linear-time mechanisms for detecting borders of map geometry between automap and minimap
- Automap was previously using iteration over all vertices
- Minimap was previously pointlessly writing min/max values twice
58 lines
1.3 KiB
C
58 lines
1.3 KiB
C
// SONIC ROBO BLAST 2
|
|
//-----------------------------------------------------------------------------
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
|
//
|
|
// This program is free software distributed under the
|
|
// terms of the GNU General Public License, version 2.
|
|
// See the 'LICENSE' file for more details.
|
|
//-----------------------------------------------------------------------------
|
|
/// \file am_map.h
|
|
/// \brief Code for the 'automap', former Doom feature used for DEVMODE testing
|
|
|
|
#ifndef __AMMAP_H__
|
|
#define __AMMAP_H__
|
|
|
|
#include "d_event.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct fpoint_t
|
|
{
|
|
INT32 x, y;
|
|
};
|
|
|
|
struct fline_t
|
|
{
|
|
fpoint_t a, b;
|
|
};
|
|
|
|
extern boolean am_recalc; // true if screen size changes
|
|
extern boolean automapactive; // In AutoMap mode?
|
|
|
|
// Called by main loop.
|
|
boolean AM_Responder(event_t *ev);
|
|
|
|
// Called by main loop.
|
|
void AM_Ticker(void);
|
|
|
|
// Called by main loop, instead of view drawer if automap is active.
|
|
void AM_Drawer(void);
|
|
|
|
// Enables the automap.
|
|
void AM_Start(void);
|
|
|
|
// Called to force the automap to quit if the level is completed while it is up.
|
|
void AM_Stop(void);
|
|
|
|
// Minimap generation
|
|
UINT8 *AM_MinimapGenerate(INT32 wh);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif
|