Responding to a question that came up in chat but was too long to explain there...
In DSB, there are actually two ways to replace most graphics:
- Have a bitmap of the same name as an existing graphic
- Load something different to its entry in the gfx table.
For example, in this line:
Code: Select all
gfx.alcove_vi_front = dsb_get_bitmap("VI_FRONT")
The Vi alcove's front image can be replaced by placing a new
vi_front.bmp (or .png, .pcx, etc.) image in the dungeon's folder. The first method works because DSB searches loose images in the dungeon folder, then that dungeon's
graphics.dsb, and only searches the base
graphics.dat last. You can also replace images by writing a new line of code to load a different image to
gfx.alcove_vi_front, such as:
Code: Select all
gfx.alcove_vi_front = dsb_get_bitmap("NEW_VI_FRONT")
However, there are some images whose names are "Hardcoded" in the engine. They aren't loaded by the Lua code at all because they are drawn by the system. This means they cannot be replaced using the second method, however, they can still be replaced by placing an image of the proper name in the dungeon's folder. These images are the following:

CONTROL_BACKGROUND = the background for the brown GUI boxes (for saving and loading etc.)

CONTROL_LONG = a long GUI button

CONTROL_SHORT = a short GUI button

PTRARROW = the yellow arrow mouse pointer

PTRHAND = the mouse "hand" pointer

OPTION_RES = a 232x146 image offering resurrection (only)

OPTION_REI = a 232x146 image offering reincarnation (only)

OPTION_RES_REI = a 232x146 image offering resurrection and reincarnation

REI_NAMEENTRY = a 240x146 image where you enter the name of your reincarnated champion
EDIT: Formerly hardcoded images that can now be changed by the normal Lua means

BAR_DAMAGE = an 86x42 image, consisting of three 86x14 sections (
gfx.damage_bar)

FULL_DAMAGE = an 64x174 image, consisting of three 64x58 sections (
gfx.damage_full)

BOX_BOOST = a 36x36 green outline box (
gfx.box_boost)

BOX_HURT = a 36x36 red outline box (
gfx.box_hurt)

BOX_SEL = a 36x36 cyan outline box (
gfx.box_sel)

DAMAGE = a 176x90 jagged cyan explosion showing weapon damage (
gfx.monster_damage)

INVENTORY = the inventory background image (
gfx.inventory_background)

TOP_HANDS = the 134x58 image for the top of the screen showing the champion's hands (
gfx.top_hands)

TOP_PORT = the 134x58 background image where a champion's portrait goes (
gfx.top_port)

TOP_DEAD = the 134x58 skull and crossbones image when a champion is dead (
gfx.top_dead)
So, for example, to replace the yellow mouse pointer with the Atari ST's cyan pointer, simply place an image of the cyan pointer (with a power pink background) in the dungeon's folder as
ptrarrow.bmp (or .png, .pcx, etc.) and DSB will automatically load the image.
All of these images can be extracted by opening graphics.dat in the Allegro grabber, in case anyone is interested.