ScummVM API documentation
Ultima::Ultima2::Gfx::DungeonPictures Class Reference

#include <dungeon_pictures.h>

Public Types

enum  Kind {
  FRONT , LEFT , RIGHT , LEFT_OPEN ,
  RIGHT_OPEN , FRONT_DOOR , LEFT_DOOR , RIGHT_DOOR ,
  LADDER_UP , LADDER_DOWN , CHEST , KIND_COUNT
}
 

Static Public Member Functions

static void setEnabled (bool enabled)
 
static bool isActive ()
 
static void load ()
 
static void unload ()
 
static void loadPalette (Graphics::Palette &palette)
 
static bool draw (Graphics::Views::GfxSurface &s, Kind kind, int depth, int offset)
 
static bool drawDoorway (Graphics::Views::GfxSurface &s, int offset)
 
static bool drawMonster (Graphics::Views::GfxSurface &s, int type, int depth, int offset)
 
static byte invert (byte color)
 

Static Public Attributes

static constexpr int DEPTHS = 8
 
static constexpr int MONSTER_TYPES = 8
 
static constexpr int PALETTE_BASE = 48
 

Detailed Description

The pictures that the EGA renderers can use for the corridors of the dungeons, in place of lines, and for the monsters in them. Each is a layer the size of the corridor, with 0 as clear. They're drawn with a standard set of colors that fills the part of the palette that the game doesn't use

Member Function Documentation

◆ setEnabled()

static void Ultima::Ultima2::Gfx::DungeonPictures::setEnabled ( bool  enabled)
inlinestatic

Sets whether the pictures are used, if they've been found and it's one of the EGA renderers

◆ isActive()

static bool Ultima::Ultima2::Gfx::DungeonPictures::isActive ( )
static

Returns true if the corridors are drawn from pictures

◆ load()

static void Ultima::Ultima2::Gfx::DungeonPictures::load ( )
static

Reads the pictures, any of which can be missing

◆ unload()

static void Ultima::Ultima2::Gfx::DungeonPictures::unload ( )
static

Releases the pictures

◆ loadPalette()

static void Ultima::Ultima2::Gfx::DungeonPictures::loadPalette ( Graphics::Palette &  palette)
static

Adds the standard colors to a palette, if they're in the game's data, and works out the colors that are the opposite of them

◆ draw()

static bool Ultima::Ultima2::Gfx::DungeonPictures::draw ( Graphics::Views::GfxSurface &  s,
Kind  kind,
int  depth,
int  offset 
)
static

Draws a picture of a part of the corridor

Returns
False if there's no picture of it

◆ drawDoorway()

static bool Ultima::Ultima2::Gfx::DungeonPictures::drawDoorway ( Graphics::Views::GfxSurface &  s,
int  offset 
)
static

Draws the wall seen from a doorway that the party is in

◆ drawMonster()

static bool Ultima::Ultima2::Gfx::DungeonPictures::drawMonster ( Graphics::Views::GfxSurface &  s,
int  type,
int  depth,
int  offset 
)
static

Draws a picture of a monster, which has a number from 1

Returns
False if there's no picture of it

◆ invert()

static byte Ultima::Ultima2::Gfx::DungeonPictures::invert ( byte  color)
static

Returns the color that a pixel becomes when the view is inverted, as when the party is hit

Member Data Documentation

◆ PALETTE_BASE

constexpr int Ultima::Ultima2::Gfx::DungeonPictures::PALETTE_BASE = 48
staticconstexpr

The first of the palette entries of the standard colors, which run to the end


The documentation for this class was generated from the following file: