_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Classes
minimap.cpp File Reference
#include <string.h>
#include "stratagus.h"
#include "minimap.h"
#include "editor.h"
#include "map.h"
#include "player.h"
#include "settings.h"
#include "unit.h"
#include "unit_manager.h"
#include "ui.h"
#include "unittype.h"
#include "video.h"

Classes

struct  MinimapEvent
 

minimap.cpp - The minimap.

#define MAX_MINIMAP_EVENTS   8
 Minimap scale to fit into window. More...
 
static constexpr int MINIMAP_FAC {16 * 3}
 integer scale factor More...
 
static constexpr int ATTACK_RED_DURATION {1 * CYCLES_PER_SECOND}
 unit attacked are shown red for at least this amount of cycles More...
 
static constexpr int ATTACK_BLINK_DURATION {7 * CYCLES_PER_SECOND}
 unit attacked are shown blinking for this amount of cycles More...
 
static constexpr int SCALE_PRECISION {100}
 
SDL_Surface * MinimapSurface {nullptr}
 
static SDL_Surface * MinimapTerrainSurface {nullptr}
 generated minimap More...
 
static SDL_Surface * MinimapFogSurface {nullptr}
 generated minimap terrain More...
 
static int * Minimap2MapX
 generated minimap fog of war More...
 
static int * Minimap2MapY
 fast conversion table More...
 
static int Map2MinimapX [MaxMapWidth]
 fast conversion table More...
 
static int Map2MinimapY [MaxMapHeight]
 fast conversion table More...
 
static int MinimapScaleX
 fast conversion table More...
 
static int MinimapScaleY
 Minimap scale to fit into window. More...
 
struct MinimapEvent MinimapEvents [MAX_MINIMAP_EVENTS]
 
int NumMinimapEvents
 
static Uint8 * GetTileGraphicPixel (int xofs, int yofs, int mx, int my, int scalex, int scaley, int bpp)
 
static void DrawUnitOn (CUnit &unit, int red_phase)
 
static void DrawEvents ()
 

Macro Definition Documentation

◆ MAX_MINIMAP_EVENTS

#define MAX_MINIMAP_EVENTS   8

Minimap scale to fit into window.

Function Documentation

◆ DrawEvents()

static void DrawEvents ( )
static

Draw the minimap events

◆ DrawUnitOn()

static void DrawUnitOn ( CUnit unit,
int  red_phase 
)
static

Draw a unit on the minimap.

◆ GetTileGraphicPixel()

static Uint8* GetTileGraphicPixel ( int  xofs,
int  yofs,
int  mx,
int  my,
int  scalex,
int  scaley,
int  bpp 
)
inlinestatic

Calculate the tile graphic pixel

Variable Documentation

◆ ATTACK_BLINK_DURATION

constexpr int ATTACK_BLINK_DURATION {7 * CYCLES_PER_SECOND}
staticconstexpr

unit attacked are shown blinking for this amount of cycles

◆ ATTACK_RED_DURATION

constexpr int ATTACK_RED_DURATION {1 * CYCLES_PER_SECOND}
staticconstexpr

unit attacked are shown red for at least this amount of cycles

◆ Map2MinimapX

int Map2MinimapX[MaxMapWidth]
static

fast conversion table

◆ Map2MinimapY

int Map2MinimapY[MaxMapHeight]
static

fast conversion table

◆ Minimap2MapX

int* Minimap2MapX
static

generated minimap fog of war

◆ Minimap2MapY

int* Minimap2MapY
static

fast conversion table

◆ MINIMAP_FAC

constexpr int MINIMAP_FAC {16 * 3}
staticconstexpr

integer scale factor

◆ MinimapEvents

struct MinimapEvent MinimapEvents[MAX_MINIMAP_EVENTS]

◆ MinimapFogSurface

SDL_Surface* MinimapFogSurface {nullptr}
static

generated minimap terrain

◆ MinimapScaleX

int MinimapScaleX
static

fast conversion table

◆ MinimapScaleY

int MinimapScaleY
static

Minimap scale to fit into window.

◆ MinimapSurface

SDL_Surface* MinimapSurface {nullptr}

◆ MinimapTerrainSurface

SDL_Surface* MinimapTerrainSurface {nullptr}
static

generated minimap

◆ NumMinimapEvents

int NumMinimapEvents

◆ SCALE_PRECISION

constexpr int SCALE_PRECISION {100}
staticconstexpr
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.