[Scummvm-git-logs] scummvm master -> 86bba9096d1a41b4b23d51e7457ab7ec3f55045e
dreammaster
noreply at scummvm.org
Mon Nov 16 00:49:51 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
86bba9096d ULTIMA: ULTIMA2: New optional dungeon renderer using PNG images
Commit: 86bba9096d1a41b4b23d51e7457ab7ec3f55045e
https://github.com/scummvm/scummvm/commit/86bba9096d1a41b4b23d51e7457ab7ec3f55045e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-11-16T11:47:54+11:00
Commit Message:
ULTIMA: ULTIMA2: New optional dungeon renderer using PNG images
Changed paths:
A devtools/create_ultima/files/ultima2/dungeons/chest_0.png
A devtools/create_ultima/files/ultima2/dungeons/chest_1.png
A devtools/create_ultima/files/ultima2/dungeons/chest_2.png
A devtools/create_ultima/files/ultima2/dungeons/chest_3.png
A devtools/create_ultima/files/ultima2/dungeons/chest_4.png
A devtools/create_ultima/files/ultima2/dungeons/chest_5.png
A devtools/create_ultima/files/ultima2/dungeons/chest_6.png
A devtools/create_ultima/files/ultima2/dungeons/doorway.png
A devtools/create_ultima/files/ultima2/dungeons/front_0.png
A devtools/create_ultima/files/ultima2/dungeons/front_1.png
A devtools/create_ultima/files/ultima2/dungeons/front_2.png
A devtools/create_ultima/files/ultima2/dungeons/front_3.png
A devtools/create_ultima/files/ultima2/dungeons/front_4.png
A devtools/create_ultima/files/ultima2/dungeons/front_5.png
A devtools/create_ultima/files/ultima2/dungeons/front_6.png
A devtools/create_ultima/files/ultima2/dungeons/front_7.png
A devtools/create_ultima/files/ultima2/dungeons/frontdoor_0.png
A devtools/create_ultima/files/ultima2/dungeons/frontdoor_1.png
A devtools/create_ultima/files/ultima2/dungeons/frontdoor_2.png
A devtools/create_ultima/files/ultima2/dungeons/frontdoor_3.png
A devtools/create_ultima/files/ultima2/dungeons/frontdoor_4.png
A devtools/create_ultima/files/ultima2/dungeons/frontdoor_5.png
A devtools/create_ultima/files/ultima2/dungeons/frontdoor_6.png
A devtools/create_ultima/files/ultima2/dungeons/frontdoor_7.png
A devtools/create_ultima/files/ultima2/dungeons/ladderdown_0.png
A devtools/create_ultima/files/ultima2/dungeons/ladderdown_1.png
A devtools/create_ultima/files/ultima2/dungeons/ladderdown_2.png
A devtools/create_ultima/files/ultima2/dungeons/ladderdown_3.png
A devtools/create_ultima/files/ultima2/dungeons/ladderdown_4.png
A devtools/create_ultima/files/ultima2/dungeons/ladderdown_5.png
A devtools/create_ultima/files/ultima2/dungeons/ladderdown_6.png
A devtools/create_ultima/files/ultima2/dungeons/ladderup_0.png
A devtools/create_ultima/files/ultima2/dungeons/ladderup_1.png
A devtools/create_ultima/files/ultima2/dungeons/ladderup_2.png
A devtools/create_ultima/files/ultima2/dungeons/ladderup_3.png
A devtools/create_ultima/files/ultima2/dungeons/ladderup_4.png
A devtools/create_ultima/files/ultima2/dungeons/ladderup_5.png
A devtools/create_ultima/files/ultima2/dungeons/ladderup_6.png
A devtools/create_ultima/files/ultima2/dungeons/left_0.png
A devtools/create_ultima/files/ultima2/dungeons/left_1.png
A devtools/create_ultima/files/ultima2/dungeons/left_2.png
A devtools/create_ultima/files/ultima2/dungeons/left_3.png
A devtools/create_ultima/files/ultima2/dungeons/left_4.png
A devtools/create_ultima/files/ultima2/dungeons/left_5.png
A devtools/create_ultima/files/ultima2/dungeons/left_6.png
A devtools/create_ultima/files/ultima2/dungeons/leftdoor_0.png
A devtools/create_ultima/files/ultima2/dungeons/leftdoor_1.png
A devtools/create_ultima/files/ultima2/dungeons/leftdoor_2.png
A devtools/create_ultima/files/ultima2/dungeons/leftdoor_3.png
A devtools/create_ultima/files/ultima2/dungeons/leftdoor_4.png
A devtools/create_ultima/files/ultima2/dungeons/leftdoor_5.png
A devtools/create_ultima/files/ultima2/dungeons/leftdoor_6.png
A devtools/create_ultima/files/ultima2/dungeons/leftopen_0.png
A devtools/create_ultima/files/ultima2/dungeons/leftopen_1.png
A devtools/create_ultima/files/ultima2/dungeons/leftopen_2.png
A devtools/create_ultima/files/ultima2/dungeons/leftopen_3.png
A devtools/create_ultima/files/ultima2/dungeons/leftopen_4.png
A devtools/create_ultima/files/ultima2/dungeons/leftopen_5.png
A devtools/create_ultima/files/ultima2/dungeons/leftopen_6.png
A devtools/create_ultima/files/ultima2/dungeons/palette.pal
A devtools/create_ultima/files/ultima2/dungeons/right_0.png
A devtools/create_ultima/files/ultima2/dungeons/right_1.png
A devtools/create_ultima/files/ultima2/dungeons/right_2.png
A devtools/create_ultima/files/ultima2/dungeons/right_3.png
A devtools/create_ultima/files/ultima2/dungeons/right_4.png
A devtools/create_ultima/files/ultima2/dungeons/right_5.png
A devtools/create_ultima/files/ultima2/dungeons/right_6.png
A devtools/create_ultima/files/ultima2/dungeons/rightdoor_0.png
A devtools/create_ultima/files/ultima2/dungeons/rightdoor_1.png
A devtools/create_ultima/files/ultima2/dungeons/rightdoor_2.png
A devtools/create_ultima/files/ultima2/dungeons/rightdoor_3.png
A devtools/create_ultima/files/ultima2/dungeons/rightdoor_4.png
A devtools/create_ultima/files/ultima2/dungeons/rightdoor_5.png
A devtools/create_ultima/files/ultima2/dungeons/rightdoor_6.png
A devtools/create_ultima/files/ultima2/dungeons/rightopen_0.png
A devtools/create_ultima/files/ultima2/dungeons/rightopen_1.png
A devtools/create_ultima/files/ultima2/dungeons/rightopen_2.png
A devtools/create_ultima/files/ultima2/dungeons/rightopen_3.png
A devtools/create_ultima/files/ultima2/dungeons/rightopen_4.png
A devtools/create_ultima/files/ultima2/dungeons/rightopen_5.png
A devtools/create_ultima/files/ultima2/dungeons/rightopen_6.png
A devtools/create_ultima/files/ultima2/monsters/monster_1_1.png
A devtools/create_ultima/files/ultima2/monsters/monster_1_2.png
A devtools/create_ultima/files/ultima2/monsters/monster_1_3.png
A devtools/create_ultima/files/ultima2/monsters/monster_1_4.png
A devtools/create_ultima/files/ultima2/monsters/monster_1_5.png
A devtools/create_ultima/files/ultima2/monsters/monster_1_6.png
A devtools/create_ultima/files/ultima2/monsters/monster_1_7.png
A devtools/create_ultima/files/ultima2/monsters/monster_2_1.png
A devtools/create_ultima/files/ultima2/monsters/monster_2_2.png
A devtools/create_ultima/files/ultima2/monsters/monster_2_3.png
A devtools/create_ultima/files/ultima2/monsters/monster_2_4.png
A devtools/create_ultima/files/ultima2/monsters/monster_2_5.png
A devtools/create_ultima/files/ultima2/monsters/monster_2_6.png
A devtools/create_ultima/files/ultima2/monsters/monster_2_7.png
A devtools/create_ultima/files/ultima2/monsters/monster_3_1.png
A devtools/create_ultima/files/ultima2/monsters/monster_3_2.png
A devtools/create_ultima/files/ultima2/monsters/monster_3_3.png
A devtools/create_ultima/files/ultima2/monsters/monster_3_4.png
A devtools/create_ultima/files/ultima2/monsters/monster_3_5.png
A devtools/create_ultima/files/ultima2/monsters/monster_3_6.png
A devtools/create_ultima/files/ultima2/monsters/monster_3_7.png
A devtools/create_ultima/files/ultima2/monsters/monster_4_1.png
A devtools/create_ultima/files/ultima2/monsters/monster_4_2.png
A devtools/create_ultima/files/ultima2/monsters/monster_4_3.png
A devtools/create_ultima/files/ultima2/monsters/monster_4_4.png
A devtools/create_ultima/files/ultima2/monsters/monster_4_5.png
A devtools/create_ultima/files/ultima2/monsters/monster_4_6.png
A devtools/create_ultima/files/ultima2/monsters/monster_4_7.png
A devtools/create_ultima/files/ultima2/monsters/monster_5_1.png
A devtools/create_ultima/files/ultima2/monsters/monster_5_2.png
A devtools/create_ultima/files/ultima2/monsters/monster_5_3.png
A devtools/create_ultima/files/ultima2/monsters/monster_5_4.png
A devtools/create_ultima/files/ultima2/monsters/monster_5_5.png
A devtools/create_ultima/files/ultima2/monsters/monster_5_6.png
A devtools/create_ultima/files/ultima2/monsters/monster_5_7.png
A devtools/create_ultima/files/ultima2/monsters/monster_6_1.png
A devtools/create_ultima/files/ultima2/monsters/monster_6_2.png
A devtools/create_ultima/files/ultima2/monsters/monster_6_3.png
A devtools/create_ultima/files/ultima2/monsters/monster_6_4.png
A devtools/create_ultima/files/ultima2/monsters/monster_6_5.png
A devtools/create_ultima/files/ultima2/monsters/monster_6_6.png
A devtools/create_ultima/files/ultima2/monsters/monster_6_7.png
A devtools/create_ultima/files/ultima2/monsters/monster_7_1.png
A devtools/create_ultima/files/ultima2/monsters/monster_7_2.png
A devtools/create_ultima/files/ultima2/monsters/monster_7_3.png
A devtools/create_ultima/files/ultima2/monsters/monster_7_4.png
A devtools/create_ultima/files/ultima2/monsters/monster_7_5.png
A devtools/create_ultima/files/ultima2/monsters/monster_7_6.png
A devtools/create_ultima/files/ultima2/monsters/monster_7_7.png
A devtools/create_ultima/ultima2/gen_ultima2_dungeons.py
A devtools/create_ultima/ultima2/gen_ultima2_monsters.py
A devtools/create_ultima/ultima2/ultima2_dungeons.txt
A engines/ultima/ultima2/gfx/dungeon_pictures.cpp
A engines/ultima/ultima2/gfx/dungeon_pictures.h
engines/ultima/detection.h
engines/ultima/detection_tables.h
engines/ultima/metaengine.cpp
engines/ultima/module.mk
engines/ultima/ultima2/console.cpp
engines/ultima/ultima2/console.h
engines/ultima/ultima2/data/data.cpp
engines/ultima/ultima2/ultima2.cpp
engines/ultima/ultima2/views/dungeon_map.cpp
diff --git a/devtools/create_ultima/files/ultima2/dungeons/chest_0.png b/devtools/create_ultima/files/ultima2/dungeons/chest_0.png
new file mode 100644
index 00000000000..4f6a3a0f1f8
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/chest_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/chest_1.png b/devtools/create_ultima/files/ultima2/dungeons/chest_1.png
new file mode 100644
index 00000000000..116515db575
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/chest_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/chest_2.png b/devtools/create_ultima/files/ultima2/dungeons/chest_2.png
new file mode 100644
index 00000000000..9f1cba57df7
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/chest_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/chest_3.png b/devtools/create_ultima/files/ultima2/dungeons/chest_3.png
new file mode 100644
index 00000000000..3e2fa9cfecc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/chest_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/chest_4.png b/devtools/create_ultima/files/ultima2/dungeons/chest_4.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/chest_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/chest_5.png b/devtools/create_ultima/files/ultima2/dungeons/chest_5.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/chest_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/chest_6.png b/devtools/create_ultima/files/ultima2/dungeons/chest_6.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/chest_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/doorway.png b/devtools/create_ultima/files/ultima2/dungeons/doorway.png
new file mode 100644
index 00000000000..2f14ede43ab
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/doorway.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/front_0.png b/devtools/create_ultima/files/ultima2/dungeons/front_0.png
new file mode 100644
index 00000000000..786dd500383
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/front_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/front_1.png b/devtools/create_ultima/files/ultima2/dungeons/front_1.png
new file mode 100644
index 00000000000..d90f73f9785
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/front_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/front_2.png b/devtools/create_ultima/files/ultima2/dungeons/front_2.png
new file mode 100644
index 00000000000..341991425f1
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/front_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/front_3.png b/devtools/create_ultima/files/ultima2/dungeons/front_3.png
new file mode 100644
index 00000000000..fca5351f30b
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/front_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/front_4.png b/devtools/create_ultima/files/ultima2/dungeons/front_4.png
new file mode 100644
index 00000000000..0057ef1e7cc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/front_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/front_5.png b/devtools/create_ultima/files/ultima2/dungeons/front_5.png
new file mode 100644
index 00000000000..372d938ab55
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/front_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/front_6.png b/devtools/create_ultima/files/ultima2/dungeons/front_6.png
new file mode 100644
index 00000000000..4494d534cc8
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/front_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/front_7.png b/devtools/create_ultima/files/ultima2/dungeons/front_7.png
new file mode 100644
index 00000000000..cffe4b3c7db
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/front_7.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/frontdoor_0.png b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_0.png
new file mode 100644
index 00000000000..8ad56c3ba28
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/frontdoor_1.png b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_1.png
new file mode 100644
index 00000000000..9fc8c45dc2d
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/frontdoor_2.png b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_2.png
new file mode 100644
index 00000000000..086f5376533
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/frontdoor_3.png b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_3.png
new file mode 100644
index 00000000000..c8a818e93ea
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/frontdoor_4.png b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_4.png
new file mode 100644
index 00000000000..7fe3a17395a
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/frontdoor_5.png b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_5.png
new file mode 100644
index 00000000000..7e5df31ac5b
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/frontdoor_6.png b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_6.png
new file mode 100644
index 00000000000..a69bb51b17f
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/frontdoor_7.png b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_7.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/frontdoor_7.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderdown_0.png b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_0.png
new file mode 100644
index 00000000000..9761b042f93
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderdown_1.png b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_1.png
new file mode 100644
index 00000000000..5f173a9aea0
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderdown_2.png b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_2.png
new file mode 100644
index 00000000000..91dbfe06cef
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderdown_3.png b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_3.png
new file mode 100644
index 00000000000..4bb6347b7c9
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderdown_4.png b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_4.png
new file mode 100644
index 00000000000..24e31ff1efb
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderdown_5.png b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_5.png
new file mode 100644
index 00000000000..d549bb5f775
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderdown_6.png b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_6.png
new file mode 100644
index 00000000000..1140fc4008f
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderdown_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderup_0.png b/devtools/create_ultima/files/ultima2/dungeons/ladderup_0.png
new file mode 100644
index 00000000000..aab21df752d
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderup_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderup_1.png b/devtools/create_ultima/files/ultima2/dungeons/ladderup_1.png
new file mode 100644
index 00000000000..a9a185e062a
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderup_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderup_2.png b/devtools/create_ultima/files/ultima2/dungeons/ladderup_2.png
new file mode 100644
index 00000000000..538302e96e1
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderup_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderup_3.png b/devtools/create_ultima/files/ultima2/dungeons/ladderup_3.png
new file mode 100644
index 00000000000..1b166ea6c8c
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderup_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderup_4.png b/devtools/create_ultima/files/ultima2/dungeons/ladderup_4.png
new file mode 100644
index 00000000000..c40aa255f0b
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderup_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderup_5.png b/devtools/create_ultima/files/ultima2/dungeons/ladderup_5.png
new file mode 100644
index 00000000000..7d1aed89bec
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderup_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/ladderup_6.png b/devtools/create_ultima/files/ultima2/dungeons/ladderup_6.png
new file mode 100644
index 00000000000..72f8e104e76
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/ladderup_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/left_0.png b/devtools/create_ultima/files/ultima2/dungeons/left_0.png
new file mode 100644
index 00000000000..63e10384554
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/left_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/left_1.png b/devtools/create_ultima/files/ultima2/dungeons/left_1.png
new file mode 100644
index 00000000000..ae06614f244
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/left_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/left_2.png b/devtools/create_ultima/files/ultima2/dungeons/left_2.png
new file mode 100644
index 00000000000..d3b1ce1d72b
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/left_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/left_3.png b/devtools/create_ultima/files/ultima2/dungeons/left_3.png
new file mode 100644
index 00000000000..bee4824e6c2
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/left_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/left_4.png b/devtools/create_ultima/files/ultima2/dungeons/left_4.png
new file mode 100644
index 00000000000..a8716edb698
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/left_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/left_5.png b/devtools/create_ultima/files/ultima2/dungeons/left_5.png
new file mode 100644
index 00000000000..3c1f9d254a9
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/left_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/left_6.png b/devtools/create_ultima/files/ultima2/dungeons/left_6.png
new file mode 100644
index 00000000000..e570c5ae093
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/left_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftdoor_0.png b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_0.png
new file mode 100644
index 00000000000..6f26ee26333
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftdoor_1.png b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_1.png
new file mode 100644
index 00000000000..3fdda194591
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftdoor_2.png b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_2.png
new file mode 100644
index 00000000000..3cc32260fd7
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftdoor_3.png b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_3.png
new file mode 100644
index 00000000000..4846cc740aa
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftdoor_4.png b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_4.png
new file mode 100644
index 00000000000..441ff576ba2
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftdoor_5.png b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_5.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftdoor_6.png b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_6.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftdoor_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftopen_0.png b/devtools/create_ultima/files/ultima2/dungeons/leftopen_0.png
new file mode 100644
index 00000000000..6abf29e2430
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftopen_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftopen_1.png b/devtools/create_ultima/files/ultima2/dungeons/leftopen_1.png
new file mode 100644
index 00000000000..71c23aeee82
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftopen_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftopen_2.png b/devtools/create_ultima/files/ultima2/dungeons/leftopen_2.png
new file mode 100644
index 00000000000..ff26de0ebd7
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftopen_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftopen_3.png b/devtools/create_ultima/files/ultima2/dungeons/leftopen_3.png
new file mode 100644
index 00000000000..5fe1ea46a53
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftopen_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftopen_4.png b/devtools/create_ultima/files/ultima2/dungeons/leftopen_4.png
new file mode 100644
index 00000000000..7f88f759ec3
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftopen_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftopen_5.png b/devtools/create_ultima/files/ultima2/dungeons/leftopen_5.png
new file mode 100644
index 00000000000..1898c99959d
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftopen_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/leftopen_6.png b/devtools/create_ultima/files/ultima2/dungeons/leftopen_6.png
new file mode 100644
index 00000000000..e9e73082e72
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/leftopen_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/palette.pal b/devtools/create_ultima/files/ultima2/dungeons/palette.pal
new file mode 100644
index 00000000000..a16738771a7
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/palette.pal differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/right_0.png b/devtools/create_ultima/files/ultima2/dungeons/right_0.png
new file mode 100644
index 00000000000..322ec6e77a0
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/right_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/right_1.png b/devtools/create_ultima/files/ultima2/dungeons/right_1.png
new file mode 100644
index 00000000000..96db7fc94c0
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/right_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/right_2.png b/devtools/create_ultima/files/ultima2/dungeons/right_2.png
new file mode 100644
index 00000000000..ab1dc3c6736
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/right_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/right_3.png b/devtools/create_ultima/files/ultima2/dungeons/right_3.png
new file mode 100644
index 00000000000..435878235e7
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/right_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/right_4.png b/devtools/create_ultima/files/ultima2/dungeons/right_4.png
new file mode 100644
index 00000000000..9b6da46192e
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/right_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/right_5.png b/devtools/create_ultima/files/ultima2/dungeons/right_5.png
new file mode 100644
index 00000000000..93d24b98395
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/right_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/right_6.png b/devtools/create_ultima/files/ultima2/dungeons/right_6.png
new file mode 100644
index 00000000000..295831095fe
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/right_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightdoor_0.png b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_0.png
new file mode 100644
index 00000000000..13e2c52bb75
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightdoor_1.png b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_1.png
new file mode 100644
index 00000000000..aa4b2482d0f
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightdoor_2.png b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_2.png
new file mode 100644
index 00000000000..082dc0ab92b
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightdoor_3.png b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_3.png
new file mode 100644
index 00000000000..32967b24352
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightdoor_4.png b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_4.png
new file mode 100644
index 00000000000..c92857b06a4
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightdoor_5.png b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_5.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightdoor_6.png b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_6.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightdoor_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightopen_0.png b/devtools/create_ultima/files/ultima2/dungeons/rightopen_0.png
new file mode 100644
index 00000000000..94d621f835e
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightopen_0.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightopen_1.png b/devtools/create_ultima/files/ultima2/dungeons/rightopen_1.png
new file mode 100644
index 00000000000..5105d53b180
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightopen_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightopen_2.png b/devtools/create_ultima/files/ultima2/dungeons/rightopen_2.png
new file mode 100644
index 00000000000..bb7e9dc7c41
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightopen_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightopen_3.png b/devtools/create_ultima/files/ultima2/dungeons/rightopen_3.png
new file mode 100644
index 00000000000..6411f4ad258
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightopen_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightopen_4.png b/devtools/create_ultima/files/ultima2/dungeons/rightopen_4.png
new file mode 100644
index 00000000000..a62995afa90
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightopen_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightopen_5.png b/devtools/create_ultima/files/ultima2/dungeons/rightopen_5.png
new file mode 100644
index 00000000000..675ac01989b
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightopen_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/dungeons/rightopen_6.png b/devtools/create_ultima/files/ultima2/dungeons/rightopen_6.png
new file mode 100644
index 00000000000..8de725d6fdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/dungeons/rightopen_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_1_1.png b/devtools/create_ultima/files/ultima2/monsters/monster_1_1.png
new file mode 100644
index 00000000000..88c26821a0b
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_1_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_1_2.png b/devtools/create_ultima/files/ultima2/monsters/monster_1_2.png
new file mode 100644
index 00000000000..60cb9c90ed9
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_1_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_1_3.png b/devtools/create_ultima/files/ultima2/monsters/monster_1_3.png
new file mode 100644
index 00000000000..1a0a90ece51
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_1_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_1_4.png b/devtools/create_ultima/files/ultima2/monsters/monster_1_4.png
new file mode 100644
index 00000000000..68f3e5868da
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_1_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_1_5.png b/devtools/create_ultima/files/ultima2/monsters/monster_1_5.png
new file mode 100644
index 00000000000..24477fde433
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_1_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_1_6.png b/devtools/create_ultima/files/ultima2/monsters/monster_1_6.png
new file mode 100644
index 00000000000..4a63eb3ad34
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_1_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_1_7.png b/devtools/create_ultima/files/ultima2/monsters/monster_1_7.png
new file mode 100644
index 00000000000..4a63eb3ad34
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_1_7.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_2_1.png b/devtools/create_ultima/files/ultima2/monsters/monster_2_1.png
new file mode 100644
index 00000000000..7110fe74898
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_2_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_2_2.png b/devtools/create_ultima/files/ultima2/monsters/monster_2_2.png
new file mode 100644
index 00000000000..2027c8d4726
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_2_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_2_3.png b/devtools/create_ultima/files/ultima2/monsters/monster_2_3.png
new file mode 100644
index 00000000000..a06b0ff36ef
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_2_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_2_4.png b/devtools/create_ultima/files/ultima2/monsters/monster_2_4.png
new file mode 100644
index 00000000000..dfd98a1679c
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_2_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_2_5.png b/devtools/create_ultima/files/ultima2/monsters/monster_2_5.png
new file mode 100644
index 00000000000..51ed89273de
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_2_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_2_6.png b/devtools/create_ultima/files/ultima2/monsters/monster_2_6.png
new file mode 100644
index 00000000000..e5378e40a62
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_2_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_2_7.png b/devtools/create_ultima/files/ultima2/monsters/monster_2_7.png
new file mode 100644
index 00000000000..e5378e40a62
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_2_7.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_3_1.png b/devtools/create_ultima/files/ultima2/monsters/monster_3_1.png
new file mode 100644
index 00000000000..20a6e47485c
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_3_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_3_2.png b/devtools/create_ultima/files/ultima2/monsters/monster_3_2.png
new file mode 100644
index 00000000000..5d6200b6085
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_3_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_3_3.png b/devtools/create_ultima/files/ultima2/monsters/monster_3_3.png
new file mode 100644
index 00000000000..ca115f12a06
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_3_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_3_4.png b/devtools/create_ultima/files/ultima2/monsters/monster_3_4.png
new file mode 100644
index 00000000000..d7efe4cf7a8
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_3_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_3_5.png b/devtools/create_ultima/files/ultima2/monsters/monster_3_5.png
new file mode 100644
index 00000000000..72b414649df
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_3_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_3_6.png b/devtools/create_ultima/files/ultima2/monsters/monster_3_6.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_3_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_3_7.png b/devtools/create_ultima/files/ultima2/monsters/monster_3_7.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_3_7.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_4_1.png b/devtools/create_ultima/files/ultima2/monsters/monster_4_1.png
new file mode 100644
index 00000000000..e1baa7b55d1
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_4_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_4_2.png b/devtools/create_ultima/files/ultima2/monsters/monster_4_2.png
new file mode 100644
index 00000000000..ec4b4dd3387
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_4_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_4_3.png b/devtools/create_ultima/files/ultima2/monsters/monster_4_3.png
new file mode 100644
index 00000000000..9d09523283a
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_4_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_4_4.png b/devtools/create_ultima/files/ultima2/monsters/monster_4_4.png
new file mode 100644
index 00000000000..9e590380611
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_4_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_4_5.png b/devtools/create_ultima/files/ultima2/monsters/monster_4_5.png
new file mode 100644
index 00000000000..b57dd0e4929
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_4_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_4_6.png b/devtools/create_ultima/files/ultima2/monsters/monster_4_6.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_4_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_4_7.png b/devtools/create_ultima/files/ultima2/monsters/monster_4_7.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_4_7.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_5_1.png b/devtools/create_ultima/files/ultima2/monsters/monster_5_1.png
new file mode 100644
index 00000000000..4fc86a92b92
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_5_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_5_2.png b/devtools/create_ultima/files/ultima2/monsters/monster_5_2.png
new file mode 100644
index 00000000000..b98b35dd90d
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_5_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_5_3.png b/devtools/create_ultima/files/ultima2/monsters/monster_5_3.png
new file mode 100644
index 00000000000..b82788f3763
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_5_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_5_4.png b/devtools/create_ultima/files/ultima2/monsters/monster_5_4.png
new file mode 100644
index 00000000000..a351482841d
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_5_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_5_5.png b/devtools/create_ultima/files/ultima2/monsters/monster_5_5.png
new file mode 100644
index 00000000000..2b920671e90
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_5_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_5_6.png b/devtools/create_ultima/files/ultima2/monsters/monster_5_6.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_5_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_5_7.png b/devtools/create_ultima/files/ultima2/monsters/monster_5_7.png
new file mode 100644
index 00000000000..fffa55c6cdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_5_7.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_6_1.png b/devtools/create_ultima/files/ultima2/monsters/monster_6_1.png
new file mode 100644
index 00000000000..370d2656f7d
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_6_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_6_2.png b/devtools/create_ultima/files/ultima2/monsters/monster_6_2.png
new file mode 100644
index 00000000000..11e36fc3ab9
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_6_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_6_3.png b/devtools/create_ultima/files/ultima2/monsters/monster_6_3.png
new file mode 100644
index 00000000000..d246dfa7495
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_6_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_6_4.png b/devtools/create_ultima/files/ultima2/monsters/monster_6_4.png
new file mode 100644
index 00000000000..f7cd3ca3939
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_6_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_6_5.png b/devtools/create_ultima/files/ultima2/monsters/monster_6_5.png
new file mode 100644
index 00000000000..8861a0e6e1d
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_6_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_6_6.png b/devtools/create_ultima/files/ultima2/monsters/monster_6_6.png
new file mode 100644
index 00000000000..7d35b2d29b2
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_6_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_6_7.png b/devtools/create_ultima/files/ultima2/monsters/monster_6_7.png
new file mode 100644
index 00000000000..7d35b2d29b2
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_6_7.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_7_1.png b/devtools/create_ultima/files/ultima2/monsters/monster_7_1.png
new file mode 100644
index 00000000000..59faf5a7114
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_7_1.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_7_2.png b/devtools/create_ultima/files/ultima2/monsters/monster_7_2.png
new file mode 100644
index 00000000000..de348df5652
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_7_2.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_7_3.png b/devtools/create_ultima/files/ultima2/monsters/monster_7_3.png
new file mode 100644
index 00000000000..0de083277e4
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_7_3.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_7_4.png b/devtools/create_ultima/files/ultima2/monsters/monster_7_4.png
new file mode 100644
index 00000000000..eb9df6569ce
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_7_4.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_7_5.png b/devtools/create_ultima/files/ultima2/monsters/monster_7_5.png
new file mode 100644
index 00000000000..013ec7f2a67
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_7_5.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_7_6.png b/devtools/create_ultima/files/ultima2/monsters/monster_7_6.png
new file mode 100644
index 00000000000..15f6cd137c4
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_7_6.png differ
diff --git a/devtools/create_ultima/files/ultima2/monsters/monster_7_7.png b/devtools/create_ultima/files/ultima2/monsters/monster_7_7.png
new file mode 100644
index 00000000000..15f6cd137c4
Binary files /dev/null and b/devtools/create_ultima/files/ultima2/monsters/monster_7_7.png differ
diff --git a/devtools/create_ultima/ultima2/gen_ultima2_dungeons.py b/devtools/create_ultima/ultima2/gen_ultima2_dungeons.py
new file mode 100644
index 00000000000..e389e0e20ee
--- /dev/null
+++ b/devtools/create_ultima/ultima2/gen_ultima2_dungeons.py
@@ -0,0 +1,727 @@
+#!/usr/bin/env python3
+"""
+Generates the stand-in pictures for the Ultima II "textured dungeon" renderer, which is used with
+any of the EGA graphics modes.
+
+The EGA modes only use 16 colors, in palette entries 16 to 31, and the others in the 256 color
+palette are free. This defines a standard set of colors for entries 48 to 255 (see the ramps
+below, and the palette.pal that's written with the pictures, which the game loads) that the
+pictures are drawn with. The pictures only use those, so they look the same in every EGA mode.
+Palette index 0 is transparent.
+
+Every picture is a 256x128 layer in the geometry of the original wire frame view of the corridor,
+which is worked out from the same tables as the game's (views/dungeon_map.cpp). The pictures of
+the places at each depth, 0 being the square the party is on, are:
+
+ front_D the wall in front of the party at depth D
+ left_D/right_D the wall to a side at depth D
+ leftopen_D/rightopen_D an opening in the side at depth D
+ frontdoor_D a door in the wall in front
+ doorway the wall seen from a doorway the party is standing in, with the opening cut out
+ leftdoor_D/rightdoor_D a door in the wall at a side
+ ladderup_D/ladderdown_D a ladder up through the ceiling, and one down through the floor
+ chest_D a chest
+
+Usage: gen_ultima2_dungeons.py <dungeon_map.cpp> <output folder> [<preview.png>]
+"""
+import math
+import os
+import random
+import re
+import struct
+import sys
+import zlib
+
+WIDTH, HEIGHT = 256, 128
+PALETTE_BASE = 48
+
+# The EGA palette of the game, which lives at entries 16 to 31
+EGA = [
+ (0x00, 0x00, 0x00), (0x00, 0x00, 0xaa), (0x00, 0xaa, 0x00), (0x00, 0xaa, 0xaa),
+ (0xaa, 0x00, 0x00), (0xaa, 0x00, 0xaa), (0xaa, 0x55, 0x00), (0xaa, 0xaa, 0xaa),
+ (0x55, 0x55, 0x55), (0x55, 0x55, 0xff), (0x55, 0xff, 0x55), (0x55, 0xff, 0xff),
+ (0xff, 0x55, 0x55), (0xff, 0x55, 0xff), (0xff, 0xff, 0x55), (0xff, 0xff, 0xff)
+]
+
+# The colors in the standard set, as ramps from dark to light through a middle color. Each is
+# (name, dark, middle, light, how many). They fill the entries from PALETTE_BASE onwards.
+RAMPS = [
+ ("grey", (8, 8, 10), (118, 118, 122), (235, 235, 240), 22),
+ ("stone", (24, 20, 16), (118, 110, 98), (210, 200, 184), 22),
+ ("wood", (28, 14, 6), (150, 86, 42), (232, 170, 104), 24),
+ ("rust", (40, 16, 8), (122, 66, 32), (200, 120, 70), 12),
+ ("moss", (8, 24, 8), (52, 98, 42), (150, 200, 110), 16),
+ ("gold", (60, 40, 0), (230, 190, 60), (255, 245, 160), 12),
+ ("iron", (14, 16, 24), (90, 94, 108), (200, 205, 220), 12),
+ ("flesh", (50, 20, 16), (190, 110, 90), (250, 200, 170), 16),
+ ("red", (40, 0, 0), (190, 30, 24), (255, 150, 130), 16),
+ ("green", (6, 30, 12), (40, 150, 60), (170, 240, 150), 12),
+ ("blue", (6, 10, 50), (50, 90, 210), (160, 200, 255), 12),
+ ("pale", (60, 56, 20), (230, 220, 110), (255, 255, 230), 12),
+ ("purple", (30, 10, 50), (130, 60, 170), (220, 170, 250), 12),
+ ("cyan", (0, 60, 60), (60, 200, 210), (200, 255, 255), 8),
+]
+
+
+class Palette:
+ def __init__(self):
+ self.colors = [(0, 0, 0)] * 256
+ for i, c in enumerate(EGA):
+ self.colors[16 + i] = c
+
+ self.ramps = {}
+ index = PALETTE_BASE
+ for name, dark, middle, light, count in RAMPS:
+ entries = []
+ for i in range(count):
+ t = i / (count - 1)
+ if t < 0.5:
+ c = [dark[k] + (middle[k] - dark[k]) * t * 2 for k in range(3)]
+ else:
+ c = [middle[k] + (light[k] - middle[k]) * (t - 0.5) * 2 for k in range(3)]
+ self.colors[index] = tuple(round(v) for v in c)
+ entries.append(index)
+ index += 1
+ self.ramps[name] = entries
+ assert index == 256, index
+
+ self.cache = {}
+
+ def nearest(self, r, g, b, ramps=None):
+ """The entry nearest a color, out of the whole set or just the named ramps"""
+ r, g, b = (max(0, min(255, int(v))) for v in (r, g, b))
+ key = (r >> 1, g >> 1, b >> 1, tuple(ramps) if ramps else None)
+ found = self.cache.get(key)
+ if found is None:
+ pool = [i for name in ramps for i in self.ramps[name]] if ramps else range(PALETTE_BASE, 256)
+ best, best_d = PALETTE_BASE, 1 << 30
+ for i in pool:
+ cr, cg, cb = self.colors[i]
+ d = 3 * (cr - r) ** 2 + 5 * (cg - g) ** 2 + 2 * (cb - b) ** 2
+ if d < best_d:
+ best, best_d = i, d
+ found = self.cache[key] = best
+ return found
+
+ def ramp_color(self, name, t):
+ """An entry of a ramp, for a position along it from 0 (dark) to 1 (light)"""
+ entries = self.ramps[name]
+ return entries[max(0, min(len(entries) - 1, round(t * (len(entries) - 1))))]
+
+ def write(self, path):
+ with open(path, "wb") as f:
+ for i in range(PALETTE_BASE, 256):
+ f.write(bytes(self.colors[i]))
+
+
+# ---------------------------------------------------------------- PNG output
+
+def chunk(tag, data):
+ body = tag + data
+ return struct.pack(">I", len(data)) + body + struct.pack(">I", zlib.crc32(body) & 0xFFFFFFFF)
+
+
+def write_indexed(path, pixels, w, h, palette):
+ raw = b"".join(b"\x00" + bytes(pixels[y * w:(y + 1) * w]) for y in range(h))
+ data = b"\x89PNG\r\n\x1a\n"
+ data += chunk(b"IHDR", struct.pack(">IIBBBBB", w, h, 8, 3, 0, 0, 0))
+ data += chunk(b"PLTE", b"".join(bytes(c) for c in palette.colors))
+ data += chunk(b"tRNS", b"\x00")
+ data += chunk(b"IDAT", zlib.compress(raw, 9))
+ data += chunk(b"IEND", b"")
+ with open(path, "wb") as f:
+ f.write(data)
+
+
+def write_rgb(path, rgb, w, h):
+ raw = b"".join(b"\x00" + bytes(rgb[y * w * 3:(y + 1) * w * 3]) for y in range(h))
+ data = b"\x89PNG\r\n\x1a\n"
+ data += chunk(b"IHDR", struct.pack(">IIBBBBB", w, h, 8, 2, 0, 0, 0))
+ data += chunk(b"IDAT", zlib.compress(raw, 9))
+ data += chunk(b"IEND", b"")
+ with open(path, "wb") as f:
+ f.write(data)
+
+
+# ----------------------------------------------------------- renderer tables
+
+TABLE_BASE = 0x1620D
+ADDR = dict(
+ LEFT_X=0x1620D, LEFT_X_NEXT=0x1620E, LEFT_X_NEXT2=0x1620F, LEFT_X_NEXT3=0x16210,
+ RIGHT_X=0x16217, RIGHT_X_NEXT=0x16218, RIGHT_X_NEXT2=0x16219, RIGHT_X_NEXT3=0x1621A,
+ TOP_Y=0x16221, TOP_Y_NEXT=0x16222, BOTTOM_Y=0x16229, BOTTOM_Y_NEXT=0x1622A,
+ LADDER_LEFT_A=0x16232, LADDER_LEFT_B=0x1623A, LADDER_RIGHT_B=0x16242, LADDER_RIGHT_A=0x1624A,
+ LEFT_DOOR_X=0x16231, LEFT_DOOR_X2=0x16239, AHEAD_DOOR_X=0x16241, AHEAD_DOOR_X2=0x16249,
+ DOOR_BOTTOM_A=0x16251, DOOR_BOTTOM_B=0x16259, DOOR_TOP_B=0x16261,
+ RAIL_TOP_A=0x16269, RAIL_TOP_B=0x16271, RAIL_BOTTOM_A=0x16279, RAIL_BOTTOM_B=0x16281,
+ CHEST_BOTTOM=0x16289
+)
+
+
+def parse_table(source):
+ text = open(source).read()
+ m = re.search(r"const byte TABLE\[\] = \{(.*?)\n\};", text, re.S)
+ body = re.sub(r"//[^\n]*", "", m.group(1))
+ return [int(v, 16) for v in re.findall(r"0x[0-9A-Fa-f]+", body)]
+
+
+class Tables:
+ def __init__(self, source):
+ self.table = parse_table(source)
+
+ def t(self, name, d):
+ return self.table[ADDR[name] - TABLE_BASE + d]
+
+
+# -------------------------------------------------------------------- shapes
+
+def lerp(a, b, t):
+ return a + (b - a) * t
+
+
+class Shape:
+ """The pixels of a piece, each with where it is on the surface: (u across, v down, height)"""
+
+ def __init__(self):
+ self.cells = {}
+ self.slope = {}
+ self.width = 1
+ self.height = 1
+
+ def add_columns(self, x0, x1, top0, top1, bottom0, bottom1, perspective=None):
+ """A piece with vertical sides, whose top and bottom run straight between two columns.
+ Perspective is the distance of the near and far edge from the vanishing point, to
+ space what's drawn on it as it is in depth"""
+ if x1 < x0:
+ x0, x1, top0, top1, bottom0, bottom1 = x1, x0, top1, top0, bottom1, bottom0
+ if perspective:
+ perspective = (perspective[1], perspective[0])
+ span = max(x1 - x0, 1)
+ self.width = max(self.width, x1 - x0 + 1)
+
+ for x in range(x0, x1 + 1):
+ t = (x - x0) / span
+ top = lerp(top0, top1, t)
+ bottom = lerp(bottom0, bottom1, t)
+ h = max(bottom - top, 1.0)
+ self.height = max(self.height, h)
+
+ if perspective and perspective[0] != perspective[1]:
+ near, far = perspective
+
+ def along(px):
+ distance = abs(128 - px)
+ v = (1 / max(distance, 0.5) - 1 / near) / (1 / far - 1 / near)
+ return max(0.0, min(1.0, v))
+
+ u = along(x + 0.5)
+ self.slope[x] = max(abs(along(x + 1) - along(x)), 0.0005)
+ else:
+ u = (x - x0 + 0.5) / (x1 - x0 + 1)
+ self.slope[x] = 1.0 / (x1 - x0 + 1)
+
+ for y in range(int(round(top)), int(round(bottom)) + 1):
+ if 0 <= x < WIDTH and 0 <= y < HEIGHT:
+ self.cells[(x, y)] = (u, (y - top + 0.5) / h, h)
+
+ def add_polygon(self, points):
+ """A piece with any outline, mapped in a simple way by where it is within its extent"""
+ xs = [p[0] for p in points]
+ ys = [p[1] for p in points]
+ x0, x1, y0, y1 = min(xs), max(xs), min(ys), max(ys)
+ self.width = max(self.width, x1 - x0 + 1)
+ self.height = max(self.height, y1 - y0 + 1)
+
+ for y in range(int(y0), int(y1) + 1):
+ hits = []
+ for i in range(len(points)):
+ ax, ay = points[i]
+ bx, by = points[(i + 1) % len(points)]
+ if (ay <= y + 0.5 < by) or (by <= y + 0.5 < ay):
+ hits.append(ax + (y + 0.5 - ay) / (by - ay) * (bx - ax))
+ hits.sort()
+ for i in range(0, len(hits) - 1, 2):
+ for x in range(int(math.ceil(hits[i] - 0.5)), int(math.floor(hits[i + 1] - 0.5)) + 1):
+ if 0 <= x < WIDTH and 0 <= y < HEIGHT:
+ self.cells[(x, y)] = ((x - x0 + 0.5) / (x1 - x0 + 1), (y - y0 + 0.5) / (y1 - y0 + 1),
+ y1 - y0 + 1)
+
+ def border(self, x, y):
+ c = self.cells
+ return ((x - 1, y) not in c) or ((x + 1, y) not in c) or ((x, y - 1) not in c) or ((x, y + 1) not in c)
+
+
+# ------------------------------------------------------------------ painting
+
+def mix(a, b, t):
+ return tuple(a[i] + (b[i] - a[i]) * t for i in range(3))
+
+
+def scale(c, k):
+ return tuple(v * k for v in c)
+
+
+STONE = (118, 110, 98)
+MORTAR = (36, 33, 30)
+RUST = (122, 66, 32)
+MOSS = (52, 98, 42)
+WOOD = (150, 86, 42)
+IRON = (76, 78, 88)
+GOLD = (232, 190, 62)
+
+
+def depth_light(d):
+ """Stone is lit less the further away it is"""
+ return 1.0 - 0.1 * d
+
+
+def put(img, palette, x, y, color, ramps=None):
+ img[y * WIDTH + x] = palette.nearest(*color, ramps=ramps)
+
+
+# The stone is laid the same size everywhere, in courses of ROWS to the height of a square and
+# BRICKS to its length, so a wall carries straight on from one square to the next
+ROWS = 8
+BRICKS = 4
+
+
+def brick_info(group, row, col):
+ rng = random.Random("%s/%d/%d" % (group, row, col))
+ return (rng.uniform(-0.22, 0.22), rng.random(), rng.random(), rng.uniform(-1, 1))
+
+
+def stone(shape, palette, seed, d, tone=1.0, rows=ROWS, bricks=BRICKS, group=None, flip=False, side=False,
+ unit_width=None):
+ """Rough stone blocks laid in courses, dirtier and darker the further away they are.
+
+ A side wall is drawn with side set: it's a piece of a wall that runs on through every square,
+ so the courses, the bricks and the light go on from the piece before it to the next. Flip is
+ for one whose far end is at the start of its surface. A wall in front can carry on past its
+ edges, if it is given the width of the wall as the unit width"""
+ rng = random.Random(seed)
+ img = bytearray(WIDTH * HEIGHT)
+ group = group or str(seed)
+
+ for (x, y), (u, v, h) in shape.cells.items():
+ row = int(v * rows)
+ along = (1.0 - u if flip else u) if side else u
+ position = (d + along) * bricks if side else u * bricks
+ bu = position + (0.5 if row & 1 else 0.0)
+ col = math.floor(bu)
+ shade, stain, moss, hue = brick_info(group, row, col)
+
+ brick_h = h / rows
+ fy = v * rows - row
+ fx = bu - col
+ brick_w = 1.0 / (shape.slope[x] * bricks) if side else (unit_width or shape.width) / bricks
+ mortar = (brick_h >= 3 and fy * brick_h < 1.0) or (brick_w >= 3 and fx * brick_w < 1.0)
+
+ light = depth_light(d + along if side else d) * tone
+ light *= 1.0 - 0.45 * max(0.0, (0.12 - v) / 0.12)
+ light *= 1.0 - 0.35 * max(0.0, (v - 0.85) / 0.15)
+ if not side and 0.0 <= u <= 1.0:
+ light *= 1.0 - 0.28 * max(0.0, (0.08 - u) / 0.08) - 0.28 * max(0.0, (u - 0.92) / 0.08)
+
+ if mortar:
+ color = scale(MORTAR, light * 1.5)
+ else:
+ color = (STONE[0] * (1 + 0.10 * hue), STONE[1], STONE[2] * (1 - 0.10 * hue))
+ color = scale(color, (1 + shade) * light)
+ if brick_h >= 4:
+ if 1.0 <= fy * brick_h < 2.0:
+ color = scale(color, 1.18)
+ elif fy > 1 - 1.5 / brick_h:
+ color = scale(color, 0.82)
+ if stain > 0.78:
+ color = scale(color, 0.8)
+ if moss > 0.92 and v > 0.5:
+ color = mix(color, scale(MOSS, light * 1.3), 0.65 * min(1.0, (v - 0.5) * 3))
+ color = mix(color, scale((70, 62, 50), light), 0.35 * max(0.0, (v - 0.8) / 0.2))
+
+ color = scale(color, 1.0 + rng.gauss(0, 0.045))
+ put(img, palette, x, y, color)
+
+ return img
+
+
+def door(shape, palette, seed, d, planks=4):
+ """A wooden door of planks with iron bands, inside a dark frame"""
+ rng = random.Random(seed)
+ img = bytearray(WIDTH * HEIGHT)
+ light = 0.85 + 0.2 * depth_light(d)
+
+ # a narrow door has no room for a frame at its sides
+ roomy = shape.width >= 8
+
+ for (x, y), (u, v, h) in shape.cells.items():
+ if shape.border(x, y) and (roomy or not ((x - 1, y) not in shape.cells or (x + 1, y) not in shape.cells)):
+ put(img, palette, x, y, scale((50, 34, 22), light))
+ continue
+
+ per_plank = max(shape.width / planks, 1.0)
+ plank = int(u * planks)
+ fu = (u * planks - plank) * per_plank
+ grain = 0.07 * math.sin(y * 0.8 + plank * 2.7) + 0.05 * math.sin(y * 2.3 + x * 0.3 + plank)
+ color = scale(WOOD, light * (1.0 + grain + (0.14 if plank & 1 else -0.08)))
+
+ # the seams and the edges of the planks only show if they're wide enough
+ if per_plank >= 3:
+ if fu < 1.3:
+ color = scale((46, 22, 10), light)
+ elif fu < 2.4:
+ color = scale(color, 1.2)
+
+ ramps = ["wood"]
+ for band in (0.2, 0.8):
+ dist = abs(v - band)
+ if dist < 0.045:
+ color = scale((196, 196, 208), light)
+ ramps = None
+ if int(u * 14) & 1 and dist < 0.015 and h > 24:
+ color = scale((120, 120, 132), light)
+ elif dist < 0.065:
+ color = scale((52, 52, 60), light)
+ ramps = None
+
+ put(img, palette, x, y, scale(color, 1.0 + rng.gauss(0, 0.035)), ramps)
+
+ return img
+
+
+def wood_box(shape, palette, seed, d, lit=1.0, bands=True, lock=False):
+ """A face of a chest"""
+ rng = random.Random(seed)
+ img = bytearray(WIDTH * HEIGHT)
+ light = (0.7 + 0.3 * depth_light(d)) * lit
+
+ for (x, y), (u, v, h) in shape.cells.items():
+ if shape.border(x, y):
+ put(img, palette, x, y, scale((40, 26, 14), light))
+ continue
+ color = scale(WOOD, light * (1.0 + 0.08 * math.sin(x * 1.9 + y * 0.4)))
+ ramps = ["wood"]
+ if bands and (abs(u - 0.2) < 0.05 or abs(u - 0.8) < 0.05):
+ color = scale(IRON, light * 1.5)
+ ramps = None
+ if lock and abs(u - 0.5) < 0.06 and 0.2 < v < 0.6:
+ color = scale(GOLD, light)
+ ramps = None
+ put(img, palette, x, y, scale(color, 1.0 + rng.gauss(0, 0.04)), ramps)
+
+ return img
+
+
+def tint(img, palette, other, mask_img=None):
+ """Lays one picture over another"""
+ for i, c in enumerate(other):
+ if c:
+ img[i] = c
+
+
+def dark_stone(shape, palette, seed, d, amount=0.45):
+ return stone(shape, palette, seed, d, tone=amount)
+
+
+# ------------------------------------------------------------------- pieces
+
+def make_pieces(tb, palette):
+ """Every picture, as a dictionary of name to pixels"""
+ t = tb.t
+ pieces = {}
+ seed = [100]
+
+ def next_seed():
+ seed[0] += 1
+ return seed[0]
+
+ for d in range(8):
+ # the wall in front, which is the whole of the plane at that depth
+ lx, rx, ty, by = t("LEFT_X", d), t("RIGHT_X", d), t("TOP_Y", d), t("BOTTOM_Y", d)
+ shape = Shape()
+ shape.add_columns(lx, rx, ty, ty, by + 1, by + 1)
+ pieces["front_%d" % d] = stone(shape, palette, next_seed(), d, group="front_%d" % d)
+
+ # a door in it
+ lxn, rxn, tyn = t("LEFT_X_NEXT", d), t("RIGHT_X_NEXT", d), t("TOP_Y_NEXT", d)
+ shape = Shape()
+ shape.add_columns(lxn, rxn, tyn, tyn, by + 1, by + 1)
+ pieces["frontdoor_%d" % d] = door(shape, palette, next_seed(), d)
+
+ # standing in a doorway, with the wall all round it and the way through open
+ lx, rx, ty, by = t("LEFT_X", 0), t("RIGHT_X", 0), t("TOP_Y", 0), t("BOTTOM_Y", 0)
+ lxn, rxn, tyn = t("LEFT_X_NEXT", 0), t("RIGHT_X_NEXT", 0), t("TOP_Y_NEXT", 0)
+ shape = Shape()
+ shape.add_columns(lx, rx, ty, ty, by + 1, by + 1)
+ for (x, y) in list(shape.cells):
+ if lxn <= x <= rxn and tyn <= y <= by:
+ del shape.cells[(x, y)]
+ pieces["doorway"] = stone(shape, palette, next_seed(), 0)
+
+ for d in range(7):
+ lx, lxn = t("LEFT_X", d), t("LEFT_X_NEXT", d)
+ rx, rxn = t("RIGHT_X", d), t("RIGHT_X_NEXT", d)
+ ty, tyn = t("TOP_Y", d), t("TOP_Y_NEXT", d)
+ by, byn = t("BOTTOM_Y", d), t("BOTTOM_Y_NEXT", d)
+
+ near_l, far_l = 128 - lx, max(128 - lxn, 0.5)
+ near_r, far_r = rx - 127, max(rxn - 127, 0.5)
+
+ # the walls to the sides, which go from the near plane to the far one
+ shape = Shape()
+ shape.add_columns(lx, lxn, ty, tyn, by + 1, byn + 1, perspective=(near_l, far_l))
+ pieces["left_%d" % d] = stone(shape, palette, 1, d, tone=1.0, group="left", side=True)
+ shape = Shape()
+ shape.add_columns(rxn, rx, tyn, ty, byn + 1, by + 1, perspective=(far_r, near_r))
+ pieces["right_%d" % d] = stone(shape, palette, 2, d, tone=1.0, group="right", side=True, flip=True)
+
+ # an opening at the side shows the far wall of the passage, and the edge of the wall in
+ # front of it
+ for side in ("left", "right"):
+ near, far = (lx, lxn) if side == "left" else (rx, rxn)
+ x0, x1 = min(near, far), max(near, far)
+ img = bytearray(WIDTH * HEIGHT)
+
+ far_wall = Shape()
+ far_wall.add_columns(x0, x1, tyn, tyn, byn + 1, byn + 1)
+ front_left, front_right = t("LEFT_X", d + 1), t("RIGHT_X", d + 1)
+ front_width = front_right - front_left + 1
+ for (x, y), (u, v, h) in list(far_wall.cells.items()):
+ far_wall.cells[(x, y)] = ((x - front_left + 0.5) / front_width, v, h)
+ wall = stone(far_wall, palette, next_seed(), d + 1, group="front_%d" % (d + 1),
+ unit_width=front_width)
+ for (x, y) in far_wall.cells:
+ img[y * WIDTH + x] = wall[y * WIDTH + x]
+
+ # the edge nearest the party, which is lit
+ jamb_x = near
+ for y in range(ty, by + 1):
+ if 0 <= jamb_x < WIDTH:
+ img[y * WIDTH + jamb_x] = palette.nearest(*scale((150, 142, 128), depth_light(d)))
+ pieces["%sopen_%d" % (side, d)] = img
+
+ # doors in the walls at the sides
+ for side, xa, xb in (("left", "LEFT_DOOR_X", "LEFT_DOOR_X2"), ("right", "AHEAD_DOOR_X", "AHEAD_DOOR_X2")):
+ x0, x1 = t(xa, d), t(xb, d)
+ shape = Shape()
+ if x0 == x1:
+ pieces["%sdoor_%d" % (side, d)] = bytearray(WIDTH * HEIGHT)
+ continue
+ top0, top1 = tyn, t("DOOR_TOP_B", d)
+ bot0, bot1 = t("DOOR_BOTTOM_A", d), t("DOOR_BOTTOM_B", d)
+ near = 128 - x0 if side == "left" else x0 - 127
+ far = max(128 - x1 if side == "left" else x1 - 127, 0.5)
+ shape.add_columns(x0, x1, top0, top1, bot0 + 1, bot1 + 1,
+ perspective=(max(near, 0.5), far))
+ pieces["%sdoor_%d" % (side, d)] = door(shape, palette, next_seed(), d)
+
+ pieces["ladderup_%d" % d] = ladder(tb, palette, d, True, next_seed())
+ pieces["ladderdown_%d" % d] = ladder(tb, palette, d, False, next_seed())
+ pieces["chest_%d" % d] = chest(tb, palette, d, next_seed())
+
+ return pieces
+
+
+def ladder(tb, palette, d, up, seed):
+ """A hole in the ceiling or the floor, with a ladder to it"""
+ t = tb.t
+ rng = random.Random(seed)
+ img = bytearray(WIDTH * HEIGHT)
+ near_y = t("RAIL_TOP_A" if up else "RAIL_BOTTOM_A", d)
+ far_y = t("RAIL_TOP_B" if up else "RAIL_BOTTOM_B", d)
+ left_near, left_far = t("LADDER_LEFT_A", d), t("LADDER_LEFT_B", d)
+ right_far, right_near = t("LADDER_RIGHT_A", d), t("LADDER_RIGHT_B", d)
+
+ hole = Shape()
+ hole.add_polygon([(left_near, near_y), (left_far, far_y), (right_far, far_y), (right_near, near_y)])
+ hole_light = depth_light(d)
+ for (x, y), (u, v, h) in hole.cells.items():
+ edge = hole.border(x, y)
+ c = scale((150, 142, 128), hole_light * (0.6 if edge else 1.0)) if edge else scale((16, 14, 22), 1.0 - 0.4 * v)
+ put(img, palette, x, y, scale(c, 1.0 + rng.gauss(0, 0.04)))
+
+ # the ladder is two rails with rungs between them, from the floor or the ceiling into the
+ # hole, as far as the line round the end of it
+ hole_rows = [y for (x, y) in hole.cells]
+ top, bottom = t("RAIL_TOP_A", d), t("RAIL_BOTTOM_A", d)
+ gap = max(1.0, 9.0 / (2 ** d))
+ rail_w = max(1, round(3.0 / (2 ** d)) or 1)
+ if up:
+ y0, y1 = (min(hole_rows) + 1 if hole_rows else far_y), bottom
+ else:
+ y0, y1 = top, (max(hole_rows) - 1 if hole_rows else near_y)
+ if y1 <= y0:
+ return img
+
+ for rail in (127.5 - gap, 127.5 + gap):
+ for y in range(int(y0), int(y1) + 1):
+ for w in range(rail_w):
+ x = int(round(rail)) - rail_w // 2 + w
+ if 0 <= x < WIDTH and 0 <= y < HEIGHT:
+ put(img, palette, x, y, scale(WOOD, depth_light(d) * (1.0 + rng.gauss(0, 0.05))), ["wood"])
+
+ count = max(2, round((y1 - y0) / max(3.0, gap * 1.6)))
+ for i in range(count):
+ y = int(y0 + (i + 0.5) * (y1 - y0) / count)
+ for x in range(int(round(127.5 - gap)) + rail_w, int(round(127.5 + gap)) - rail_w + 1):
+ if 0 <= x < WIDTH and 0 <= y < HEIGHT:
+ put(img, palette, x, y, scale((154, 108, 62), depth_light(d)), ["wood"])
+
+ return img
+
+
+def chest(tb, palette, d, seed):
+ """A chest on the floor: the front, the lid and the side"""
+ t = tb.t
+ lx2, lx3 = t("LEFT_X_NEXT2", d), t("LEFT_X_NEXT3", d)
+ rx2, rx3 = t("RIGHT_X_NEXT2", d), t("RIGHT_X_NEXT3", d)
+ cb, dba, dbb = t("CHEST_BOTTOM", d), t("DOOR_BOTTOM_A", d), t("DOOR_BOTTOM_B", d)
+
+ img = bytearray(WIDTH * HEIGHT)
+
+ def paint(points, lit, lock=False, bands=True):
+ shape = Shape()
+ shape.add_polygon(points)
+ part = wood_box(shape, palette, seed, d, lit, bands, lock)
+ for (x, y) in shape.cells:
+ img[y * WIDTH + x] = part[y * WIDTH + x]
+
+ paint([(rx3, cb), (rx2, dbb), (rx2, cb), (rx3, dba)], 0.55, bands=False)
+ paint([(lx2, cb), (rx3, cb), (rx2, dbb), (lx3, dbb)], 1.15, bands=True)
+ paint([(lx2, cb), (rx3, cb), (rx3, dba), (lx2, dba)], 0.9, lock=True)
+ return img
+
+
+# -------------------------------------------------------------- the preview
+
+def preview(pieces, palette, layout, px, py, fx, fy, out):
+ """Draws the corridor the way the game does, with these pictures, to see how they look"""
+ def cell(x, y):
+ if not (0 <= x < 16 and 0 <= y < 16):
+ return 0x80
+ return layout[y][x]
+
+ MAX = 8
+ left, center, right = [0] * MAX, [0] * MAX, [0] * MAX
+ lx, ly = px + fy, py - fx
+ cx, cy = px, py
+ rx, ry = px - fy, py + fx
+ for d in range(MAX):
+ left[d] = cell(lx, ly) & 0xF0
+ lx += fx
+ ly += fy
+ center[d] = cell(cx, cy) & 0xF0
+ cx += fx
+ cy += fy
+ right[d] = cell(rx, ry) & 0xF0
+ rx += fx
+ ry += fy
+
+ buf = bytearray(WIDTH * HEIGHT)
+ deferred = []
+
+ def blit(name):
+ img = pieces.get(name)
+ if img:
+ for i, c in enumerate(img):
+ if c:
+ buf[i] = c
+
+ d = 0
+ while True:
+ c = center[d]
+ if c & 0x80:
+ if (c & 0x40) == 0 or (c & 0x20) != 0:
+ blit("front_%d" % d)
+ break
+ if d == 0:
+ blit("doorway")
+ d += 1
+ continue
+ blit("front_%d" % d)
+ blit("frontdoor_%d" % d)
+ break
+
+ if c & 0x20:
+ deferred.append("ladderdown_%d" % d)
+ if c & 0x10:
+ deferred.append("ladderup_%d" % d)
+ elif c & 0x40:
+ deferred.append("chest_%d" % d)
+
+ for side, v in (("left", left[d]), ("right", right[d])):
+ if v & 0x80:
+ blit("%s_%d" % (side, d))
+ if (v & 0x40) and not (v & 0x20):
+ blit("%sdoor_%d" % (side, d))
+ else:
+ blit("%sopen_%d" % (side, d))
+
+ d += 1
+ if d >= MAX - 1:
+ break
+
+ for name in reversed(deferred):
+ blit(name)
+
+ rgb = bytearray()
+ for i in range(WIDTH * HEIGHT):
+ rgb += bytes(palette.colors[buf[i]])
+ return rgb
+
+
+def sample_layout():
+ """A dungeon with a corridor, side openings, doors, a ladder and a chest"""
+ g = [[0x80] * 16 for _ in range(16)]
+ for x in range(1, 15):
+ g[7][x] = 0
+ for y in range(2, 14):
+ g[y][4] = 0
+ g[y][10] = 0
+ g[7][3] = 0x00
+ g[7][12] = 0x40 # a chest
+ g[7][9] = 0x10 # ladder up
+ g[7][6] = 0x20 # ladder down
+ g[6][7] = 0xC0 # a door in the side wall
+ g[8][2] = 0xC0
+ g[7][14] = 0xC0 # a door at the end
+ return g
+
+
+def enlarge(rgb, w, h, k):
+ out = bytearray()
+ for y in range(h):
+ row = bytearray()
+ for x in range(w):
+ row += bytes(rgb[(y * w + x) * 3:(y * w + x) * 3 + 3]) * k
+ out += bytes(row) * k
+ return out
+
+
+def main():
+ source, outdir = sys.argv[1], sys.argv[2]
+ tb = Tables(source)
+ palette = Palette()
+ os.makedirs(outdir, exist_ok=True)
+
+ pieces = make_pieces(tb, palette)
+ for name, img in pieces.items():
+ write_indexed(os.path.join(outdir, name + ".png"), img, WIDTH, HEIGHT, palette)
+ palette.write(os.path.join(outdir, "palette.pal"))
+
+ if len(sys.argv) > 3:
+ layout = sample_layout()
+ shots = [preview(pieces, palette, layout, x, y, fx, fy, None)
+ for (x, y, fx, fy) in [(1, 7, 1, 0), (8, 7, 1, 0), (14, 7, -1, 0), (3, 7, 1, 0)]]
+ k = 2
+ w = WIDTH * 2
+ rgb = bytearray()
+ for row in range(2):
+ for y in range(HEIGHT):
+ for col in range(2):
+ s = shots[row * 2 + col]
+ rgb += s[y * WIDTH * 3:(y + 1) * WIDTH * 3]
+ write_rgb(sys.argv[3], enlarge(rgb, w, HEIGHT * 2, k), w * k, HEIGHT * 2 * k)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/devtools/create_ultima/ultima2/gen_ultima2_monsters.py b/devtools/create_ultima/ultima2/gen_ultima2_monsters.py
new file mode 100644
index 00000000000..f1dbaf3568b
--- /dev/null
+++ b/devtools/create_ultima/ultima2/gen_ultima2_monsters.py
@@ -0,0 +1,418 @@
+#!/usr/bin/env python3
+"""
+Generates the stand-in pictures of the monsters in the dungeons of Ultima II, for the "textured
+dungeon" renderer that is used with the EGA graphics modes.
+
+There is a picture of each of the 7 kinds of monster at each of the depths 1 to 7 down the
+corridor, named monster_<kind>_<depth>.png. Each is a 256x128 layer in the geometry of the
+corridor, like the pictures of the walls, and uses the same standard colors (palette.pal, which
+gen_ultima2_dungeons.py writes). The monsters stand in the middle of the corridor, with their
+feet on the floor of the depth they're at, and are as tall as the corridor is there.
+
+The kinds, which match the order in the game, are:
+ 1 imp, 2 ghost, 3 jellyfish, 4 serpent, 5 gremlin, 6 horned demon, 7 winged demon
+
+These are stand-in pictures made by a program, written with the help of an AI assistant (Claude).
+They are meant to be replaced by hand drawn art: any picture can be swapped for one of the same
+name, size and palette, and the game falls back to its blocky sprites for any that are missing.
+
+Usage: gen_ultima2_monsters.py <dungeon_map.cpp> <output folder> [<preview.png>]
+"""
+import math
+import os
+import sys
+
+import gen_ultima2_dungeons as g
+
+WIDTH, HEIGHT = g.WIDTH, g.HEIGHT
+LIGHT = (-0.45, -0.6, 0.66)
+SUPERSAMPLE = 4
+
+# ------------------------------------------------------------------- shapes
+# Everything is designed in a box 100 wide and 100 high, with the feet at the bottom in the middle
+
+
+class Part:
+ """A piece of a monster, in the ramp of colors it's painted from"""
+
+ def __init__(self, ramp, base, gloss=0.0, glow=False):
+ self.ramp = ramp
+ self.base = base
+ self.gloss = gloss
+ self.glow = glow
+
+ def hit(self, x, y):
+ """Returns the normal of the surface if the point is on the part, or None"""
+ raise NotImplementedError
+
+
+class Ellipse(Part):
+ def __init__(self, cx, cy, rx, ry, ramp, base, **kw):
+ super().__init__(ramp, base, **kw)
+ self.cx, self.cy, self.rx, self.ry = cx, cy, rx, ry
+
+ def hit(self, x, y):
+ dx, dy = (x - self.cx) / self.rx, (y - self.cy) / self.ry
+ r2 = dx * dx + dy * dy
+ if r2 > 1.0:
+ return None
+ return (dx, dy, math.sqrt(1.0 - r2))
+
+
+class Capsule(Part):
+ """A line with a round end at each, which can be thicker at one end"""
+
+ def __init__(self, x1, y1, x2, y2, r1, r2, ramp, base, **kw):
+ super().__init__(ramp, base, **kw)
+ self.x1, self.y1, self.x2, self.y2, self.r1, self.r2 = x1, y1, x2, y2, r1, r2
+
+ def hit(self, x, y):
+ vx, vy = self.x2 - self.x1, self.y2 - self.y1
+ length2 = vx * vx + vy * vy
+ t = 0.0 if length2 == 0 else max(0.0, min(1.0, ((x - self.x1) * vx + (y - self.y1) * vy) / length2))
+ qx, qy = self.x1 + vx * t, self.y1 + vy * t
+ r = self.r1 + (self.r2 - self.r1) * t
+ dx, dy = x - qx, y - qy
+ d2 = dx * dx + dy * dy
+ if d2 > r * r:
+ return None
+ return (dx / r, dy / r, math.sqrt(max(0.0, 1.0 - d2 / (r * r))))
+
+
+class Poly(Part):
+ """A flat piece with any outline, lit a little more at the top"""
+
+ def __init__(self, points, ramp, base, **kw):
+ super().__init__(ramp, base, **kw)
+ self.points = points
+ xs = [p[0] for p in points]
+ ys = [p[1] for p in points]
+ self.cx, self.cy = (min(xs) + max(xs)) / 2, (min(ys) + max(ys)) / 2
+ self.w, self.h = max(max(xs) - min(xs), 1), max(max(ys) - min(ys), 1)
+
+ def hit(self, x, y):
+ inside = False
+ pts = self.points
+ j = len(pts) - 1
+ for i in range(len(pts)):
+ xi, yi = pts[i]
+ xj, yj = pts[j]
+ if (yi > y) != (yj > y) and x < (xj - xi) * (y - yi) / (yj - yi) + xi:
+ inside = not inside
+ j = i
+ if not inside:
+ return None
+ nx, ny = 0.5 * (x - self.cx) / self.w, 0.5 * (y - self.cy) / self.h
+ return (nx, ny, math.sqrt(max(0.0, 1.0 - nx * nx - ny * ny)))
+
+
+def mirror(parts_x):
+ """The reflection of a point list across the middle"""
+ return [(100 - x, y) for (x, y) in parts_x]
+
+
+# ---------------------------------------------------------------- the monsters
+
+RED, FLESH, GOLD = "red", "flesh", "gold"
+BOOT = (130, 80, 40)
+
+
+def imp():
+ p = []
+ base = (190, 40, 30)
+ horn = (240, 232, 190)
+ # the tail, behind
+ p += [Capsule(60, 84, 78, 82, 3.2, 2.6, "red", base),
+ Capsule(78, 82, 86, 66, 2.6, 2.2, "red", base),
+ Poly([(84, 66), (92, 56), (90, 70)], "red", (120, 20, 16))]
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Capsule(X(44), 84, X(42), 98, 6.5, 5.0, "red", base),
+ Ellipse(X(39), 98, 7.5, 3.4, "red", (130, 22, 18)),
+ Capsule(X(38), 58, X(20), 74, 5.2, 3.6, "red", base),
+ Ellipse(X(18), 76, 4.5, 3.2, "gold", (210, 180, 60))]
+ p += [Ellipse(50, 70, 17, 21, "red", base),
+ Ellipse(50, 75, 10, 12, "flesh", (232, 150, 120)),
+ Ellipse(50, 42, 16, 15, "red", base)]
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Capsule(X(40), 32, X(33), 14, 4.4, 1.4, "pale", horn),
+ Poly([(X(37), 42), (X(22), 36), (X(35), 50)], "red", (150, 30, 24)),
+ Ellipse(X(43), 41, 4.0, 4.6, "pale", (250, 240, 150), glow=True),
+ Ellipse(X(43), 42, 1.5, 2.6, "red", (30, 0, 0))]
+ p += [Poly([(41, 53), (59, 53), (56, 60), (50, 57), (44, 60)], "red", (40, 4, 4)),
+ Poly([(43, 53), (45, 57), (47, 53)], "pale", (250, 250, 240)),
+ Poly([(53, 53), (55, 57), (57, 53)], "pale", (250, 250, 240))]
+ return p
+
+
+def ghost():
+ p = []
+ base = (236, 230, 150)
+ cloak = [(34, 30), (66, 30), (80, 100), (72, 90), (64, 100), (56, 90), (48, 100), (40, 90), (32, 100), (22, 98)]
+ p += [Poly(cloak, "pale", base),
+ Ellipse(50, 30, 19, 22, "pale", base)]
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Capsule(X(30), 52, X(14), 76, 6, 4, "pale", base),
+ Ellipse(X(13), 78, 4.5, 3.5, "pale", (250, 250, 220))]
+ p += [Ellipse(50, 34, 12, 14, "iron", (22, 22, 34)),
+ Ellipse(45, 33, 3.2, 2.4, "pale", (255, 255, 235), glow=True),
+ Ellipse(55, 33, 3.2, 2.4, "pale", (255, 255, 235), glow=True),
+ Ellipse(50, 42, 3.5, 4.5, "iron", (6, 6, 14))]
+ return p
+
+
+def jellyfish():
+ p = []
+ blue, green = (60, 100, 220), (50, 180, 70)
+ for i in range(7):
+ x0 = 24 + i * 8.7
+ sw = 4 if i % 2 else -4
+ p += [Capsule(x0, 52, x0 + sw, 70, 4.0, 3.2, "blue", blue),
+ Capsule(x0 + sw, 70, x0 - sw * 0.5, 86, 3.2, 2.4, "blue", blue),
+ Capsule(x0 - sw * 0.5, 86, x0 + sw * 0.8, 99, 2.4, 1.4, "green", green)]
+ p += [Ellipse(50, 34, 28, 30, "blue", blue)]
+ for x in (34, 42, 50, 58, 66):
+ p += [Capsule(x, 12 + abs(x - 50) * 0.5, x, 52 - abs(x - 50) * 0.3, 2.2, 2.2, "green", green)]
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Ellipse(X(41), 44, 6.5, 7.5, "pale", (250, 250, 230), gloss=0.6),
+ Ellipse(X(41), 45, 3, 4, "green", (20, 120, 40))]
+ p += [Poly([(44, 56), (56, 56), (50, 62)], "iron", (20, 20, 40))]
+ return p
+
+
+def serpent():
+ p = []
+ red = (190, 40, 30)
+ spine = [(14, 94, 7), (28, 90, 7.5), (42, 94, 8), (56, 90, 8.5), (68, 78, 8.5), (66, 62, 8.5),
+ (54, 54, 8.5), (46, 44, 8.5)]
+ for i in range(len(spine) - 1):
+ x1, y1, r1 = spine[i]
+ x2, y2, r2 = spine[i + 1]
+ p.append(Capsule(x1, y1, x2, y2, r1, r2, "red", red))
+ # stripes across the body
+ mx, my = (x1 + x2) / 2, (y1 + y2) / 2
+ p.append(Ellipse(mx, my, 2.4, (r1 + r2) / 2 * 0.9, "red", (110, 14, 10)))
+ p += [Ellipse(47, 36, 15, 11, "red", red),
+ Poly([(35, 40), (61, 40), (63, 48), (51, 45), (37, 50)], "iron", (24, 4, 4)),
+ Poly([(39, 42), (42, 50), (45, 42)], "pale", (250, 250, 240)),
+ Poly([(53, 42), (56, 50), (59, 42)], "pale", (250, 250, 240)),
+ Ellipse(53, 31, 3.4, 3.4, "pale", (250, 235, 110), glow=True),
+ Ellipse(53, 31, 1.2, 2.4, "red", (20, 0, 0)),
+ Ellipse(41, 31, 3.4, 3.4, "pale", (250, 235, 110), glow=True),
+ Ellipse(41, 31, 1.2, 2.4, "red", (20, 0, 0)),
+ Capsule(61, 45, 77, 48, 1.6, 1.2, "red", (255, 90, 80)),
+ Poly([(77, 48), (85, 44), (83, 48), (85, 52)], "red", (255, 90, 80))]
+ return p
+
+
+def gremlin():
+ p = []
+ base = (190, 40, 30)
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Capsule(X(43), 82, X(41), 98, 5.5, 4.5, "red", base),
+ Ellipse(X(38), 98, 6.5, 3.2, "red", (130, 22, 18)),
+ Capsule(X(40), 62, X(22), 52, 4.6, 3.2, "red", base),
+ Ellipse(X(20), 50, 4.0, 3.5, "gold", (210, 180, 60)),
+ Poly([(X(38), 56), (X(14), 54), (X(32), 66)], "red", (150, 30, 24))]
+ p += [Ellipse(50, 72, 14, 18, "red", base),
+ Ellipse(50, 76, 8, 10, "flesh", (232, 150, 120)),
+ Ellipse(50, 50, 14, 13, "red", base)]
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Poly([(X(38), 50), (X(24), 38), (X(32), 56)], "red", (150, 30, 24)),
+ Ellipse(X(44), 49, 4.4, 5.0, "pale", (250, 250, 240)),
+ Ellipse(X(44), 50, 1.8, 2.6, "iron", (10, 10, 20))]
+ p += [Poly([(42, 58), (58, 58), (54, 64), (50, 62), (46, 64)], "iron", (36, 4, 4)),
+ Poly([(44, 58), (46, 61), (48, 58)], "pale", (250, 250, 240)),
+ Poly([(52, 58), (54, 61), (56, 58)], "pale", (250, 250, 240))]
+ # the jester's hat, with bells
+ p += [Poly([(36, 42), (64, 42), (58, 24), (50, 32), (42, 18)], "pale", (240, 230, 110)),
+ Ellipse(42, 17, 3.2, 3.2, "gold", (230, 190, 60), gloss=0.7),
+ Ellipse(60, 23, 3.2, 3.2, "gold", (230, 190, 60), gloss=0.7)]
+ # sparks of magic
+ for (x, y, ramp, c) in ((20, 22, "green", (60, 220, 90)), (80, 24, "gold", (255, 230, 90)),
+ (14, 40, "purple", (210, 110, 240)), (84, 42, "cyan", (110, 240, 250))):
+ p += [Poly([(x, y - 5), (x + 2.2, y), (x, y + 5), (x - 2.2, y)], ramp, c, glow=True),
+ Poly([(x - 5, y), (x, y - 2.2), (x + 5, y), (x, y + 2.2)], ramp, c, glow=True)]
+ return p
+
+
+def horned_demon():
+ p = []
+ base = (190, 40, 30)
+ horn = (60, 100, 230)
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Capsule(X(40), 70, X(38), 92, 8.5, 6.0, "red", base),
+ Ellipse(X(36), 96, 10, 5, "wood", BOOT),
+ Capsule(X(32), 42, X(14), 62, 8.0, 6.0, "red", base),
+ Ellipse(X(12), 66, 6.5, 6.5, "red", (150, 30, 24))]
+ p += [Ellipse(50, 56, 23, 28, "red", base),
+ Ellipse(50, 22, 14, 14, "red", base)]
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Capsule(X(41), 14, X(30), -2, 4.5, 1.2, "blue", horn),
+ Ellipse(X(44), 21, 4.2, 3.4, "pale", (250, 235, 100), glow=True),
+ Ellipse(X(44), 21.5, 1.4, 2.2, "red", (20, 0, 0))]
+ p += [Poly([(41, 30), (59, 30), (55, 38), (50, 34), (45, 38)], "iron", (36, 4, 4)),
+ Poly([(43, 30), (45, 34), (47, 30)], "pale", (250, 250, 240)),
+ Poly([(53, 30), (55, 34), (57, 30)], "pale", (250, 250, 240))]
+ return p
+
+
+def winged_demon():
+ p = []
+ base = (190, 40, 30)
+ horn = (60, 100, 230)
+ wing = (120, 20, 28)
+ left = [(36, 40), (2, 10), (12, 34), (4, 44), (16, 52), (12, 64), (30, 56), (38, 66)]
+ p += [Poly(left, "red", wing), Poly(mirror(left), "red", wing)]
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Capsule(X(36), 42, X(4), 12, 1.6, 1.2, "flesh", (226, 120, 100)),
+ Capsule(X(36), 46, X(8), 46, 1.4, 1.2, "flesh", (226, 120, 100)),
+ Capsule(X(38), 56, X(14), 62, 1.4, 1.2, "flesh", (226, 120, 100))]
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Capsule(X(41), 72, X(39), 93, 7.5, 5.5, "red", base),
+ Ellipse(X(37), 97, 9, 4.2, "wood", BOOT),
+ Capsule(X(33), 44, X(22), 60, 6.5, 5.0, "red", base)]
+ p += [Ellipse(50, 58, 19, 26, "red", base),
+ Ellipse(50, 26, 12, 12, "red", base)]
+ for sx in (1, -1):
+ def X(v, s=sx):
+ return 50 + (v - 50) * s
+ p += [Capsule(X(42), 19, X(32), 4, 4.0, 1.2, "blue", horn),
+ Ellipse(X(45), 25, 3.6, 3.0, "pale", (250, 235, 100), glow=True)]
+ # a staff in one hand and a blade in the other
+ p += [Capsule(15, 30, 15, 98, 1.8, 1.8, "wood", (150, 86, 42)),
+ Ellipse(15, 26, 5, 5, "cyan", (80, 230, 240), glow=True, gloss=0.8),
+ Capsule(23, 62, 16, 62, 4.6, 4.0, "red", base),
+ Capsule(85, 62, 85, 58, 3.6, 3.2, "red", base),
+ Capsule(85, 56, 80, 14, 2.0, 1.2, "iron", (200, 205, 220), gloss=0.9),
+ Poly([(80, 56), (92, 56), (90, 60), (82, 60)], "gold", (230, 190, 60))]
+ p += [Poly([(44, 33), (56, 33), (53, 40), (50, 37), (47, 40)], "iron", (36, 4, 4))]
+ return p
+
+
+MONSTERS = [imp, ghost, jellyfish, serpent, gremlin, horned_demon, winged_demon]
+
+
+# -------------------------------------------------------------------- render
+
+def render(parts, palette, size, feet_y, centre_x, seed=0):
+ """Draws a monster so that it's size pixels tall, with its feet on a line"""
+ size = max(int(round(size)), 1)
+ scale = size / 100.0
+ left = int(round(centre_x - 50 * scale))
+ top = int(round(feet_y - 100 * scale))
+ w = max(int(math.ceil(100 * scale)), 1)
+ h = size
+ S = SUPERSAMPLE if size >= 6 else 8
+ lx, ly, lz = LIGHT
+ norm = math.sqrt(lx * lx + ly * ly + lz * lz)
+ lx, ly, lz = lx / norm, ly / norm, lz / norm
+
+ # the color and part of each sample
+ pixels = {}
+ for py in range(h):
+ for px in range(w):
+ hits = 0
+ sr = sg = sb = 0.0
+ ramp_votes = {}
+ for sy in range(S):
+ for sx in range(S):
+ x = (px + (sx + 0.5) / S) / scale
+ y = (py + (sy + 0.5) / S) / scale
+ found = None
+ for part in reversed(parts):
+ n = part.hit(x, y)
+ if n is not None:
+ found = (part, n)
+ break
+ if not found:
+ continue
+
+ part, (nx, ny, nz) = found
+ diffuse = max(0.0, nx * lx + ny * ly + nz * lz)
+ lum = 0.32 + 0.85 * diffuse
+ if part.glow:
+ lum = max(lum, 0.95)
+ r, gg, b = (c * lum for c in part.base)
+ if part.gloss:
+ spec = max(0.0, (nx * -0.3 + ny * -0.4 + nz * 0.85)) ** 14 * part.gloss
+ r, gg, b = r + 255 * spec, gg + 255 * spec, b + 255 * spec
+ sr, sg, sb = sr + r, sg + gg, sb + b
+ hits += 1
+ ramp_votes[part.ramp] = ramp_votes.get(part.ramp, 0) + 1
+
+ if hits * 2 >= S * S:
+ ramp = max(ramp_votes, key=ramp_votes.get)
+ pixels[(px, py)] = (palette.nearest(sr / hits, sg / hits, sb / hits, ramps=[ramp]), ramp)
+
+ # a dark edge round the outside, where it's big enough to see
+ img = bytearray(WIDTH * HEIGHT)
+ for (px, py), (c, ramp) in pixels.items():
+ x, y = left + px, top + py
+ if not (0 <= x < WIDTH and 0 <= y < HEIGHT):
+ continue
+ if size >= 20 and any((px + dx, py + dy) not in pixels for dx, dy in ((1, 0), (-1, 0), (0, 1), (0, -1))):
+ c = palette.ramps[ramp][1]
+ img[y * WIDTH + x] = c
+ return img
+
+
+def main():
+ source, outdir = sys.argv[1], sys.argv[2]
+ tb = g.Tables(source)
+ palette = g.Palette()
+ os.makedirs(outdir, exist_ok=True)
+
+ images = {}
+ for kind, design in enumerate(MONSTERS, 1):
+ parts = design()
+ for depth in range(1, 8):
+ # as tall as the corridor is at that depth, standing on its floor
+ height = tb.t("BOTTOM_Y", depth) - tb.t("TOP_Y", depth) + 1
+ img = render(parts, palette, max(2.0, height * 0.9), tb.t("BOTTOM_Y", depth) + 1, 128)
+ images["monster_%d_%d" % (kind, depth)] = img
+
+ for name, img in images.items():
+ g.write_indexed(os.path.join(outdir, name + ".png"), img, WIDTH, HEIGHT, palette)
+
+ if len(sys.argv) > 3:
+ # the monsters at the first depths, side by side, with the gaps cropped
+ cols = 7
+ crop_w, crop_h = 90, 80
+ rgb = bytearray(crop_w * cols * crop_h * 3 * 3)
+ for kind in range(1, 8):
+ for row, depth in enumerate((1, 2, 3)):
+ img = images["monster_%d_%d" % (kind, depth)]
+ for y in range(crop_h):
+ for x in range(crop_w):
+ sx, sy = 128 - crop_w // 2 + x, 96 - crop_h + y + (0 if depth == 1 else 0)
+ c = img[sy * WIDTH + sx] if 0 <= sy < HEIGHT else 0
+ col = palette.colors[c] if c else (36, 36, 44)
+ o = ((row * crop_h + y) * crop_w * cols + (kind - 1) * crop_w + x) * 3
+ rgb[o:o + 3] = bytes(col)
+ k = 3
+ write = g.enlarge(bytes(rgb), crop_w * cols, crop_h * 3, k)
+ g.write_rgb(sys.argv[3], write, crop_w * cols * k, crop_h * 3 * k)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/devtools/create_ultima/ultima2/ultima2_dungeons.txt b/devtools/create_ultima/ultima2/ultima2_dungeons.txt
new file mode 100644
index 00000000000..05cd3a9917c
--- /dev/null
+++ b/devtools/create_ultima/ultima2/ultima2_dungeons.txt
@@ -0,0 +1,55 @@
+Ultima II textured dungeon pictures
+===================================
+
+With the Standard, Classic (v1.0) and Alternate (Wiltshire) EGA graphics modes and the "Use textured
+dungeon walls" option, the first person view in the dungeons and towers is drawn from the pictures in
+files/ultima2/dungeons, and the monsters in it from the pictures in files/ultima2/monsters, rather
+than from lines and blocks. Any picture that is missing is drawn the old way, so they can be replaced
+one at a time. (The Commodore 64 mode keeps its own look.)
+
+The colors
+----------
+The EGA modes use 16 colors, in palette entries 16 to 31, and the rest of the 256 are free. A standard
+set of colors fills entries 48 to 255 (ramps of grays, stone, wood, rust, moss, gold, iron, flesh, red,
+green, blue, pale yellow, purple and cyan, each from dark to light). They are defined in the RAMPS in
+gen_ultima2_dungeons.py, which writes them to files/ultima2/dungeons/palette.pal (208 colors, 8 bits
+each of red, green and blue) for the game to load. Every PNG has the whole 256 color palette in it, so
+they look right in an editor, but the game draws the palette indexes. Draw with entries 48 to 255 so
+that the pictures look the same in every EGA mode. Entry 0 is transparent (the PNGs have a tRNS chunk
+saying so).
+
+The dungeon pictures
+--------------------
+256x128 pixel PNGs, which are layers the size of the corridor (it's drawn 16 pixels in from the left
+and top of the game screen). Their shapes are worked out from the same tables as the original wire
+frame view (views/dungeon_map.cpp). Depth 0 is the square the party is on, and each is drawn at the
+depths it can be seen at:
+
+ front_0..7 the wall at the end of the corridor
+ left_0..6, right_0..6 the walls at the sides
+ leftopen_0..6, rightopen_0..6 openings in the sides, which show the far wall of the passage
+ frontdoor_0..7 a door in the wall at the end
+ leftdoor_0..6, rightdoor_0..6 doors in the walls at the sides
+ ladderup_0..6, ladderdown_0..6 a ladder up through the ceiling, and one down through the floor
+ chest_0..6 a chest
+ doorway the wall seen from a doorway the party is standing in, with the way through
+ left open
+
+Ladders and chests are drawn last, farthest first, so that they're over any walls drawn after them.
+
+The monsters
+------------
+monsters/monster_K_D.png, for the 7 kinds of monster K in the order of the game's dungeon monsters
+(1 imp, 2 ghost, 3 jellyfish, 4 serpent, 5 gremlin, 6 horned demon, 7 winged demon) at each depth D from
+1 to 7 squares down the corridor. Each is a 256x128 layer in the same geometry. The monster stands in the
+middle with its feet on the floor of that depth, and is about as tall as the corridor is there (57 pixels
+at depth 1, half that at depth 2, and so on).
+
+Regenerating the stand-ins
+--------------------------
+python gen_ultima2_dungeons.py ../../../engines/ultima/ultima2/views/dungeon_map.cpp ../files/ultima2/dungeons
+python gen_ultima2_monsters.py ../../../engines/ultima/ultima2/views/dungeon_map.cpp ../files/ultima2/monsters
+
+Adding a .png name after those arguments also draws a preview of some views (dungeons) or of the
+monsters at the first depths. The stand-ins are made by programs, written with the help of an AI
+assistant (Claude), and are meant to be replaced by hand drawn art.
diff --git a/engines/ultima/detection.h b/engines/ultima/detection.h
index d9947f8a049..3c306657d27 100644
--- a/engines/ultima/detection.h
+++ b/engines/ultima/detection.h
@@ -86,9 +86,10 @@ struct UltimaGameDescription {
#define GAMEOPTION_ULTIMA3_MOON_ICONS GUIO_GAMEOPTIONS14
#define GAMEOPTION_ULTIMA3_MIDI_MUSIC GUIO_GAMEOPTIONS15
#define GAMEOPTION_ULTIMA3_TIMED_SOUNDS GUIO_GAMEOPTIONS16
-#define GAMEOPTION_ULTIMA3_PICTURE_DUNGEONS GUIO_GAMEOPTIONS17
+#define GAMEOPTION_ULTIMA3_PICTURE_DUNGEONS GUIO_GAMEOPTIONS19
#define GAMEOPTION_ULTIMA2_STAT_BOOST GUIO_GAMEOPTIONS17
#define GAMEOPTION_ULTIMA2_MIXED_CASE GUIO_GAMEOPTIONS18
+#define GAMEOPTION_ULTIMA2_PICTURE_DUNGEONS GUIO_GAMEOPTIONS20
} // End of namespace Ultima
diff --git a/engines/ultima/detection_tables.h b/engines/ultima/detection_tables.h
index 5868eca9c9a..154c78dc663 100644
--- a/engines/ultima/detection_tables.h
+++ b/engines/ultima/detection_tables.h
@@ -23,7 +23,7 @@ namespace Ultima {
#define GUI_OPTIONS_ULTIMA0 GUIO0()
#define GUI_OPTIONS_ULTIMA1 GUIO0()
-#define GUI_OPTIONS_ULTIMA2 GUIO3(GAMEOPTION_ULTIMA2_STAT_BOOST, GAMEOPTION_ULTIMA2_MIXED_CASE, GAMEOPTION_LESS_HUNGER)
+#define GUI_OPTIONS_ULTIMA2 GUIO4(GAMEOPTION_ULTIMA2_STAT_BOOST, GAMEOPTION_ULTIMA2_MIXED_CASE, GAMEOPTION_LESS_HUNGER, GAMEOPTION_ULTIMA2_PICTURE_DUNGEONS)
#define GUI_OPTIONS_ULTIMA3 GUIO6(GAMEOPTION_ULTIMA3_MORE_MONSTERS, GAMEOPTION_LESS_HUNGER, GAMEOPTION_ULTIMA3_MOON_ICONS, GAMEOPTION_ULTIMA3_MIDI_MUSIC, GAMEOPTION_ULTIMA3_TIMED_SOUNDS, GAMEOPTION_ULTIMA3_PICTURE_DUNGEONS)
#define GUI_OPTIONS_ULTIMA4 GUIO1(GUIO_NOSPEECH)
#define GUI_OPTIONS_ULTIMA6 GUIO0()
diff --git a/engines/ultima/metaengine.cpp b/engines/ultima/metaengine.cpp
index af816bd5289..75e5984db0f 100644
--- a/engines/ultima/metaengine.cpp
+++ b/engines/ultima/metaengine.cpp
@@ -262,6 +262,17 @@ static const ADExtraGuiOptionsMap optionsList[] = {
0
}
},
+ {
+ GAMEOPTION_ULTIMA2_PICTURE_DUNGEONS,
+ {
+ _s("Use textured dungeon walls"),
+ _s("Draws the view in dungeons using pictures of stone walls, doors, ladders, chests and monsters rather than lines. Only used with the EGA graphics, other than Commodore 64"),
+ "picture_dungeons",
+ false,
+ 0,
+ 0
+ }
+ },
{
GAMEOPTION_ALWAYS_CHRISTMAS,
{
diff --git a/engines/ultima/module.mk b/engines/ultima/module.mk
index f8876261477..8d96bbfba57 100644
--- a/engines/ultima/module.mk
+++ b/engines/ultima/module.mk
@@ -115,6 +115,7 @@ MODULE_OBJS += \
ultima2/data/secret_archive.o \
ultima2/data/tiles.o \
ultima2/gfx/composite.o \
+ ultima2/gfx/dungeon_pictures.o \
ultima2/gfx/ega_picture.o \
ultima2/gfx/pic_decoder.o \
ultima2/gfx/text.o \
diff --git a/engines/ultima/ultima2/console.cpp b/engines/ultima/ultima2/console.cpp
index df4bda2a3d2..59270d268c9 100644
--- a/engines/ultima/ultima2/console.cpp
+++ b/engines/ultima/ultima2/console.cpp
@@ -23,6 +23,7 @@
#include "ultima/ultima2/console.h"
#include "ultima/ultima2/ultima2.h"
#include "ultima/ultima2/data/tiles.h"
+#include "ultima/ultima2/logic/dungeon_logic.h"
#include "ultima/ultima2/logic/overworld_logic.h"
#include "ultima/ultima2/logic/space_logic.h"
@@ -189,10 +190,14 @@ bool Console::cmdLocations(int argc, const char **argv) {
return true;
}
-bool Console::cmdEnemy(int, const char **) {
+bool Console::cmdEnemy(int argc, const char **argv) {
Data::Savegame &sg = _G(savegame);
+
+ if (dynamic_cast<Logic::DungeonLogic *>(_G(logic).get()))
+ return spawnDungeonEnemy(argc, argv);
+
if (sg._mapType != 0) {
- debugPrintf("Only supported on the overworld map\n");
+ debugPrintf("Only supported on the overworld map and in dungeons\n");
return true;
}
@@ -264,6 +269,74 @@ bool Console::cmdEnemy(int, const char **) {
return true;
}
+bool Console::spawnDungeonEnemy(int argc, const char **argv) {
+ if (argc > 3) {
+ debugPrintf("enemy [<monster number> [<distance>]]\n");
+ return true;
+ }
+
+ Data::Savegame &sg = _G(savegame);
+ Data::MapMonsters &monsters = _G(map)._monsters;
+ const int level = sg._dungeonLevel;
+ const int type = argc > 1 ? atoi(argv[1]) : 1;
+ const int distance = argc > 2 ? atoi(argv[2]) : 1;
+
+ if (type < 1 || type > 7) {
+ debugPrintf("Monster number must be from 1 to 7\n");
+ return true;
+ }
+ if (distance < 1) {
+ debugPrintf("Distance must be at least 1\n");
+ return true;
+ }
+
+ const int x = sg._mapX + sg._facingX * distance;
+ const int y = sg._mapY + sg._facingY * distance;
+ if (x < 0 || y < 0 || x >= Data::DUNGEON_WIDTH || y >= Data::DUNGEON_HEIGHT) {
+ debugPrintf("(%d,%d) is outside the map\n", x, y);
+ return true;
+ }
+
+ byte &cell = _G(dungeon).cell(level, x, y);
+ if (cell & 0x80) {
+ debugPrintf("(%d,%d) is a wall\n", x, y);
+ return true;
+ }
+ if (cell & 7) {
+ debugPrintf("(%d,%d) already has a monster\n", x, y);
+ return true;
+ }
+
+ // The level's own slots are used first, as the game does
+ int slot = -1;
+ for (int i = level * 2; i <= level * 2 + 1 && slot < 0; ++i) {
+ if (i >= 1 && !monsters.isActive(i))
+ slot = i;
+ }
+ for (int i = 31; i >= 1 && slot < 0; --i) {
+ if (!monsters.isActive(i))
+ slot = i;
+ }
+ if (slot < 0) {
+ debugPrintf("No free monster slots\n");
+ return true;
+ }
+
+ monsters._mapX[slot] = x;
+ monsters._mapY[slot] = y;
+ monsters._glyphTile[slot] = level;
+ monsters._type[slot] = type;
+ monsters._spellHP[slot] = (byte)((type * 2 + level) * 8) | 0x10;
+ monsters._offerFlag[slot] = 0;
+ monsters._tempX[slot] = 0;
+ monsters._tempY[slot] = 0;
+ cell |= type;
+
+ g_engine->focusedView()->redraw();
+ debugPrintf("Spawned monster %d in slot %d at (%d,%d)\n", type, slot, x, y);
+ return true;
+}
+
bool Console::cmdIntangible(int, const char **) {
_G(intangible) = !_G(intangible);
debugPrintf("Intangible mode %s\n", _G(intangible) ? "ON" : "OFF");
diff --git a/engines/ultima/ultima2/console.h b/engines/ultima/ultima2/console.h
index 8894bd05868..3760b5370b5 100644
--- a/engines/ultima/ultima2/console.h
+++ b/engines/ultima/ultima2/console.h
@@ -37,6 +37,7 @@ private:
bool cmdLocations(int argc, const char **argv);
bool cmdIntangible(int argc, const char **argv);
bool cmdEnemy(int argc, const char **argv);
+ bool spawnDungeonEnemy(int argc, const char **argv);
bool cmdHP(int argc, const char **argv);
bool cmdFood(int argc, const char **argv);
bool cmdGold(int argc, const char **argv);
diff --git a/engines/ultima/ultima2/data/data.cpp b/engines/ultima/ultima2/data/data.cpp
index 66e8fe56a5c..72ceb8db16a 100644
--- a/engines/ultima/ultima2/data/data.cpp
+++ b/engines/ultima/ultima2/data/data.cpp
@@ -24,6 +24,7 @@
#include "common/translation.h"
#include "graphics/paletteman.h"
#include "ultima/ultima2/data/data.h"
+#include "ultima/ultima2/gfx/dungeon_pictures.h"
namespace Ultima {
namespace Ultima2 {
@@ -101,6 +102,7 @@ void setPalette() {
palette.set(EGA_PALETTE16, EGA_PALETTE_BASE, EGA_PALETTE_SIZE);
loadCompositePalette(palette);
+ Gfx::DungeonPictures::loadPalette(palette);
g_system->getPaletteManager()->setPalette(palette);
}
diff --git a/engines/ultima/ultima2/gfx/dungeon_pictures.cpp b/engines/ultima/ultima2/gfx/dungeon_pictures.cpp
new file mode 100644
index 00000000000..e94f5b8f63a
--- /dev/null
+++ b/engines/ultima/ultima2/gfx/dungeon_pictures.cpp
@@ -0,0 +1,231 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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/>.
+ *
+ */
+
+#include "common/file.h"
+#include "image/png.h"
+#include "ultima/ultima2/gfx/dungeon_pictures.h"
+#include "ultima/ultima2/ultima2.h"
+
+namespace Ultima {
+namespace Ultima2 {
+namespace Gfx {
+
+constexpr int PICTURE_WIDTH = 256;
+constexpr int PICTURE_HEIGHT = 128;
+constexpr int PALETTE_COUNT = 256 - DungeonPictures::PALETTE_BASE;
+
+static const char *const KIND_NAMES[DungeonPictures::KIND_COUNT] = {
+ "front", "left", "right", "leftopen", "rightopen", "frontdoor", "leftdoor", "rightdoor",
+ "ladderup", "ladderdown", "chest"
+};
+
+DungeonPictures::Picture DungeonPictures::_pictures[KIND_COUNT][DEPTHS];
+DungeonPictures::Picture DungeonPictures::_doorway;
+DungeonPictures::Picture DungeonPictures::_monsters[MONSTER_TYPES][DEPTHS];
+bool DungeonPictures::_enabled = false;
+bool DungeonPictures::_loaded = false;
+bool DungeonPictures::_paletteLoaded = false;
+byte DungeonPictures::_inverse[256];
+
+bool DungeonPictures::isActive() {
+ if (!_enabled || !_paletteLoaded)
+ return false;
+
+ if (!_loaded)
+ load();
+
+ const Data::RenderMode mode = g_engine->getRenderMode();
+ return mode == Data::RENDER_EGA || mode == Data::RENDER_EGA_V1 || mode == Data::RENDER_EGA_WILTSHIRE;
+}
+
+bool DungeonPictures::loadPicture(Picture &picture, const Common::String &name) {
+ Common::File f;
+ Image::PNGDecoder decoder;
+ decoder.setKeepTransparencyPaletted(true);
+
+ if (!f.open(Common::Path(name + ".png")) || !decoder.loadStream(f))
+ return false;
+
+ const Graphics::Surface *surface = decoder.getSurface();
+ if (!surface || surface->format.bytesPerPixel != 1 || surface->w != PICTURE_WIDTH ||
+ surface->h != PICTURE_HEIGHT)
+ return false;
+
+ // Only the part that isn't clear is kept
+ Common::Rect bounds;
+ for (int y = 0; y < PICTURE_HEIGHT; ++y) {
+ const byte *row = (const byte *)surface->getBasePtr(0, y);
+ for (int x = 0; x < PICTURE_WIDTH; ++x) {
+ if (row[x]) {
+ bounds.left = MIN<int>(bounds.left, x);
+ bounds.right = MAX<int>(bounds.right, x + 1);
+ bounds.top = MIN<int>(bounds.top, y);
+ bounds.bottom = MAX<int>(bounds.bottom, y + 1);
+ }
+ }
+ }
+
+ if (bounds.isEmpty())
+ return false;
+
+ delete[] picture._pixels;
+ picture._left = bounds.left;
+ picture._top = bounds.top;
+ picture._width = bounds.width();
+ picture._height = bounds.height();
+ picture._pixels = new byte[bounds.width() * bounds.height()];
+ for (int y = 0; y < bounds.height(); ++y)
+ memcpy(picture._pixels + y * bounds.width(), surface->getBasePtr(bounds.left, bounds.top + y), bounds.width());
+
+ return true;
+}
+
+void DungeonPictures::freePictures() {
+ for (int kind = 0; kind < KIND_COUNT; ++kind) {
+ for (int depth = 0; depth < DEPTHS; ++depth) {
+ delete[] _pictures[kind][depth]._pixels;
+ _pictures[kind][depth]._pixels = nullptr;
+ }
+ }
+
+ delete[] _doorway._pixels;
+ _doorway._pixels = nullptr;
+
+ for (int type = 0; type < MONSTER_TYPES; ++type) {
+ for (int depth = 0; depth < DEPTHS; ++depth) {
+ delete[] _monsters[type][depth]._pixels;
+ _monsters[type][depth]._pixels = nullptr;
+ }
+ }
+}
+
+void DungeonPictures::unload() {
+ freePictures();
+ _loaded = false;
+}
+
+void DungeonPictures::load() {
+ freePictures();
+ _loaded = true;
+
+ for (int kind = 0; kind < KIND_COUNT; ++kind) {
+ for (int depth = 0; depth < DEPTHS; ++depth)
+ loadPicture(_pictures[kind][depth], Common::String::format("dungeons/%s_%d", KIND_NAMES[kind], depth));
+ }
+
+ loadPicture(_doorway, "dungeons/doorway");
+
+ for (int type = 1; type < MONSTER_TYPES; ++type) {
+ for (int depth = 1; depth < DEPTHS; ++depth)
+ loadPicture(_monsters[type][depth], Common::String::format("monsters/monster_%d_%d", type, depth));
+ }
+}
+
+static bool isUsedEntry(int index) {
+ return index < Data::EGA_PALETTE_BASE + Data::EGA_PALETTE_SIZE ?
+ index >= Data::EGA_PALETTE_BASE : index >= DungeonPictures::PALETTE_BASE;
+}
+
+void DungeonPictures::loadPalette(Graphics::Palette &palette) {
+ _paletteLoaded = false;
+
+ Common::File f;
+ byte colors[PALETTE_COUNT * 3];
+ if (!f.open("dungeons/palette.pal") || f.read(colors, sizeof(colors)) != sizeof(colors))
+ return;
+
+ palette.resize(256, true);
+ palette.set(colors, PALETTE_BASE, PALETTE_COUNT);
+ _paletteLoaded = true;
+
+ // The opposite of each color is the nearest of them to what's left from white
+ byte rgb[256][3];
+ for (int i = 0; i < 256; ++i)
+ palette.get(i, rgb[i][0], rgb[i][1], rgb[i][2]);
+
+ for (int i = 0; i < 256; ++i) {
+ _inverse[i] = i;
+ if (!isUsedEntry(i))
+ continue;
+
+ int best = i, bestDistance = 1 << 30;
+ for (int j = 0; j < 256; ++j) {
+ if (!isUsedEntry(j))
+ continue;
+
+ int dr = rgb[j][0] - (255 - rgb[i][0]);
+ int dg = rgb[j][1] - (255 - rgb[i][1]);
+ int db = rgb[j][2] - (255 - rgb[i][2]);
+ int distance = dr * dr + dg * dg + db * db;
+ if (distance < bestDistance) {
+ bestDistance = distance;
+ best = j;
+ }
+ }
+
+ _inverse[i] = best;
+ }
+}
+
+byte DungeonPictures::invert(byte color) {
+ return _inverse[color];
+}
+
+void DungeonPictures::draw(Graphics::Views::GfxSurface &s, const Picture &picture, int offset) {
+ const int width = picture._width;
+
+ for (int y = 0; y < picture._height; ++y) {
+ const byte *row = picture._pixels + y * width;
+
+ for (int x = 0; x < width; ++x) {
+ if (row[x])
+ s.setPixel(offset + picture._left + x, offset + picture._top + y, row[x]);
+ }
+ }
+}
+
+bool DungeonPictures::draw(Graphics::Views::GfxSurface &s, Kind kind, int depth, int offset) {
+ if (depth < 0 || depth >= DEPTHS || !_pictures[kind][depth].isPresent())
+ return false;
+
+ draw(s, _pictures[kind][depth], offset);
+ return true;
+}
+
+bool DungeonPictures::drawDoorway(Graphics::Views::GfxSurface &s, int offset) {
+ if (!_doorway.isPresent())
+ return false;
+
+ draw(s, _doorway, offset);
+ return true;
+}
+
+bool DungeonPictures::drawMonster(Graphics::Views::GfxSurface &s, int type, int depth, int offset) {
+ if (type < 1 || type >= MONSTER_TYPES || depth < 1 || depth >= DEPTHS || !_monsters[type][depth].isPresent())
+ return false;
+
+ draw(s, _monsters[type][depth], offset);
+ return true;
+}
+
+} // namespace Gfx
+} // namespace Ultima2
+} // namespace Ultima
diff --git a/engines/ultima/ultima2/gfx/dungeon_pictures.h b/engines/ultima/ultima2/gfx/dungeon_pictures.h
new file mode 100644
index 00000000000..fc10ff51417
--- /dev/null
+++ b/engines/ultima/ultima2/gfx/dungeon_pictures.h
@@ -0,0 +1,133 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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 ULTIMA2_GFX_DUNGEON_PICTURES_H
+#define ULTIMA2_GFX_DUNGEON_PICTURES_H
+
+#include "graphics/palette.h"
+#include "graphics/views/gfx_surface.h"
+#include "ultima/ultima2/data/data.h"
+
+namespace Ultima {
+namespace Ultima2 {
+namespace Gfx {
+
+/**
+ * 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
+ */
+class DungeonPictures {
+public:
+ enum Kind {
+ FRONT, LEFT, RIGHT, LEFT_OPEN, RIGHT_OPEN, FRONT_DOOR, LEFT_DOOR, RIGHT_DOOR,
+ LADDER_UP, LADDER_DOWN, CHEST, KIND_COUNT
+ };
+
+ static constexpr int DEPTHS = 8;
+ static constexpr int MONSTER_TYPES = 8;
+
+ /**
+ * The first of the palette entries of the standard colors, which run to the end
+ */
+ static constexpr int PALETTE_BASE = 48;
+
+private:
+ // Plain data, so that the static pictures need no constructors
+ struct Picture {
+ int16 _left, _top, _width, _height;
+ byte *_pixels;
+
+ bool isPresent() const {
+ return _pixels != nullptr;
+ }
+ };
+
+ static Picture _pictures[KIND_COUNT][DEPTHS];
+ static Picture _doorway;
+ static Picture _monsters[MONSTER_TYPES][DEPTHS];
+ static bool _enabled;
+ static bool _loaded;
+ static bool _paletteLoaded;
+ static byte _inverse[256];
+
+ static void freePictures();
+ static bool loadPicture(Picture &picture, const Common::String &name);
+ static void draw(Graphics::Views::GfxSurface &s, const Picture &picture, int offset);
+
+public:
+ /**
+ * Sets whether the pictures are used, if they've been found and it's one of the EGA renderers
+ */
+ static void setEnabled(bool enabled) {
+ _enabled = enabled;
+ }
+
+ /**
+ * Returns true if the corridors are drawn from pictures
+ */
+ static bool isActive();
+
+ /**
+ * Reads the pictures, any of which can be missing
+ */
+ static void load();
+
+ /**
+ * Releases the pictures
+ */
+ static void unload();
+
+ /**
+ * 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
+ */
+ static void loadPalette(Graphics::Palette &palette);
+
+ /**
+ * Draws a picture of a part of the corridor
+ * @returns False if there's no picture of it
+ */
+ static bool draw(Graphics::Views::GfxSurface &s, Kind kind, int depth, int offset);
+
+ /**
+ * Draws the wall seen from a doorway that the party is in
+ */
+ static bool drawDoorway(Graphics::Views::GfxSurface &s, int offset);
+
+ /**
+ * Draws a picture of a monster, which has a number from 1
+ * @returns False if there's no picture of it
+ */
+ static bool drawMonster(Graphics::Views::GfxSurface &s, int type, int depth, int offset);
+
+ /**
+ * Returns the color that a pixel becomes when the view is inverted, as when the party is hit
+ */
+ static byte invert(byte color);
+};
+
+} // namespace Gfx
+} // namespace Ultima2
+} // namespace Ultima
+
+#endif
diff --git a/engines/ultima/ultima2/ultima2.cpp b/engines/ultima/ultima2/ultima2.cpp
index 1400d4f7a2f..7bae8e5cfd2 100644
--- a/engines/ultima/ultima2/ultima2.cpp
+++ b/engines/ultima/ultima2/ultima2.cpp
@@ -30,6 +30,7 @@
#include "ultima/ultima2/console.h"
#include "ultima/ultima2/metaengine.h"
#include "ultima/ultima2/data/secret_archive.h"
+#include "ultima/ultima2/gfx/dungeon_pictures.h"
#include "ultima/ultima2/gfx/text.h"
#include "ultima/ultima2/logic/space_logic.h"
#include "ultima/ultima2/views/views.h"
@@ -52,6 +53,7 @@ Ultima2Engine::Ultima2Engine(OSystem *syst, const Ultima::UltimaGameDescription
}
Ultima2Engine::~Ultima2Engine() {
+ Gfx::DungeonPictures::unload();
delete _pcSpeaker;
}
@@ -71,6 +73,7 @@ void Ultima2Engine::loadOptions() {
_statBoostChoice = Shared::configuredOption("stat_boost_choice", isEnhanced());
_mixedCaseText = Shared::configuredOption("mixed_case_text", isEnhanced());
_lessHunger = Shared::configuredOption("less_hunger", isEnhanced());
+ Gfx::DungeonPictures::setEnabled(Shared::configuredOption("picture_dungeons", isEnhanced()));
}
Common::String Ultima2Engine::getGameId() const {
@@ -291,6 +294,10 @@ void Ultima2Engine::applyGameSettings() {
// The options can be changed from the in-game options dialog
loadOptions();
setRenderMode(configuredRenderMode(isEnhanced()));
+
+ // The dungeon pictures can be turned on and off without changing the mode
+ if (focusedView())
+ focusedView()->redraw();
}
void Ultima2Engine::setRenderMode(Data::RenderMode mode) {
diff --git a/engines/ultima/ultima2/views/dungeon_map.cpp b/engines/ultima/ultima2/views/dungeon_map.cpp
index ccaea150236..f5f9a87558c 100644
--- a/engines/ultima/ultima2/views/dungeon_map.cpp
+++ b/engines/ultima/ultima2/views/dungeon_map.cpp
@@ -24,6 +24,7 @@
#include "graphics/paletteman.h"
#include "ultima/ultima2/data/data.h"
#include "ultima/ultima2/gfx/composite.h"
+#include "ultima/ultima2/gfx/dungeon_pictures.h"
#include "ultima/ultima2/gfx/pic_decoder.h"
#include "ultima/ultima2/views/dungeon_map.h"
#include "ultima/ultima2/ultima2.h"
@@ -210,6 +211,22 @@ public:
}
}
+ // The border of the view, which is always drawn
+ void frame() {
+ _depth = 0;
+ frontWall();
+ }
+
+ // A wall with a door in it
+ void frontDoorWall() {
+ frontWall();
+ frontDoor();
+ }
+
+ // What's left to draw once all of it has been walked
+ void finish() {
+ }
+
void leftOpen() {
_x1 = _x2 = t(LEFT_X);
_y1 = t(TOP_Y);
@@ -383,6 +400,180 @@ public:
}
};
+/**
+ * Draws the same things as the Painter does, but from pictures, using it to
+ * draw any that there's no picture of. The ladders and chests are drawn last,
+ * since they're in front of anything drawn after them
+ */
+class PicturePainter {
+private:
+ typedef Gfx::DungeonPictures Pictures;
+
+ struct Thing {
+ Pictures::Kind _kind;
+ int _depth;
+ };
+
+ Graphics::Views::GfxSurface &_s;
+ Painter _lines;
+ Common::Array<Thing> _things;
+
+ bool draw(Pictures::Kind kind) {
+ _lines._depth = _depth;
+ return Pictures::draw(_s, kind, _depth, VIEW_OFFSET);
+ }
+
+public:
+ int _depth = 0;
+
+ PicturePainter(Graphics::Views::GfxSurface &s, byte color) : _s(s), _lines(s, color) {
+ }
+
+ void frame() {
+ }
+
+ void frontWall() {
+ if (!draw(Pictures::FRONT))
+ _lines.frontWall();
+ }
+
+ void frontDoor() {
+ if (!draw(Pictures::FRONT_DOOR))
+ _lines.frontDoor();
+ }
+
+ void frontDoorWall() {
+ // Standing in a doorway has the wall round it, and the way through is open
+ if (_depth == 0 && Pictures::drawDoorway(_s, VIEW_OFFSET))
+ return;
+
+ frontWall();
+ frontDoor();
+ }
+
+ void leftWall() {
+ if (!draw(Pictures::LEFT))
+ _lines.leftWall();
+ }
+
+ void rightWall() {
+ if (!draw(Pictures::RIGHT))
+ _lines.rightWall();
+ }
+
+ void leftOpen() {
+ if (!draw(Pictures::LEFT_OPEN))
+ _lines.leftOpen();
+ }
+
+ void rightOpen() {
+ if (!draw(Pictures::RIGHT_OPEN))
+ _lines.rightOpen();
+ }
+
+ void leftDoor() {
+ if (!draw(Pictures::LEFT_DOOR))
+ _lines.leftDoor();
+ }
+
+ void rightDoor() {
+ if (!draw(Pictures::RIGHT_DOOR))
+ _lines.rightDoor();
+ }
+
+ void ladderUp() {
+ _things.push_back({ Pictures::LADDER_UP, _depth });
+ }
+
+ void ladderDown() {
+ _things.push_back({ Pictures::LADDER_DOWN, _depth });
+ }
+
+ void chest() {
+ _things.push_back({ Pictures::CHEST, _depth });
+ }
+
+ void finish() {
+ for (int i = (int)_things.size() - 1; i >= 0; --i) {
+ _depth = _things[i]._depth;
+
+ if (!draw(_things[i]._kind)) {
+ switch (_things[i]._kind) {
+ case Pictures::LADDER_UP:
+ _lines.ladderUp();
+ break;
+ case Pictures::LADDER_DOWN:
+ _lines.ladderDown();
+ break;
+ default:
+ _lines.chest();
+ break;
+ }
+ }
+ }
+ }
+};
+
+/**
+ * Goes down the corridor, drawing what's in view with a painter, and returns the depth
+ * it got to
+ */
+template<class Drawer>
+int walkCorridor(Drawer &p, const byte *left, const byte *center, const byte *right) {
+ p.frame();
+
+ int d = 0;
+ for (;;) {
+ p._depth = d;
+ byte c = center[d];
+
+ if (c & TERRAIN_WALL) {
+ if ((c & TERRAIN_DOOR) == 0 || (c & TERRAIN_SECRET) != 0) {
+ p.frontWall();
+ break;
+ }
+
+ p.frontDoorWall();
+ if (d != 0)
+ break;
+
+ ++d;
+ continue;
+ }
+
+ if (c & TERRAIN_LADDER_DOWN)
+ p.ladderDown();
+ if (c & TERRAIN_LADDER_UP)
+ p.ladderUp();
+ else if (c & TERRAIN_CHEST)
+ p.chest();
+
+ byte l = left[d];
+ if (l & TERRAIN_WALL) {
+ p.leftWall();
+ if ((l & TERRAIN_DOOR) && !(l & TERRAIN_SECRET))
+ p.leftDoor();
+ } else {
+ p.leftOpen();
+ }
+
+ byte r = right[d];
+ if (r & TERRAIN_WALL) {
+ p.rightWall();
+ if ((r & TERRAIN_DOOR) && !(r & TERRAIN_SECRET))
+ p.rightDoor();
+ } else {
+ p.rightOpen();
+ }
+
+ if (++d >= MAX_DEPTH - 1)
+ break;
+ }
+
+ p.finish();
+ return d;
+}
+
} // namespace
DungeonMap::DungeonMap() : Map("DungeonMap") {
@@ -508,56 +699,15 @@ int DungeonMap::drawCorridor(Graphics::Views::GfxSurface &s) {
ry = y + fy;
}
- Painter p(s, Data::isEgaMode(g_engine->getRenderMode()) ?
- Data::EGA_PALETTE_BASE + 15 : COLOR_LINE);
- p._depth = 0;
- p.frontWall();
-
- int d = 0;
- for (;;) {
- p._depth = d;
- byte c = center[d];
-
- if (c & TERRAIN_WALL) {
- p.frontWall();
- if ((c & TERRAIN_DOOR) == 0 || (c & TERRAIN_SECRET) != 0)
- break;
-
- p.frontDoor();
- if (d != 0)
- break;
-
- ++d;
- continue;
- }
-
- if (c & TERRAIN_LADDER_DOWN)
- p.ladderDown();
- if (c & TERRAIN_LADDER_UP)
- p.ladderUp();
- else if (c & TERRAIN_CHEST)
- p.chest();
-
- byte l = left[d];
- if (l & TERRAIN_WALL) {
- p.leftWall();
- if ((l & TERRAIN_DOOR) && !(l & TERRAIN_SECRET))
- p.leftDoor();
- } else {
- p.leftOpen();
- }
-
- byte r = right[d];
- if (r & TERRAIN_WALL) {
- p.rightWall();
- if ((r & TERRAIN_DOOR) && !(r & TERRAIN_SECRET))
- p.rightDoor();
- } else {
- p.rightOpen();
- }
+ const byte color = Data::isEgaMode(g_engine->getRenderMode()) ? Data::EGA_PALETTE_BASE + 15 : COLOR_LINE;
+ int d;
- if (++d >= MAX_DEPTH - 1)
- break;
+ if (Gfx::DungeonPictures::isActive()) {
+ PicturePainter p(s, color);
+ d = walkCorridor(p, left, center, right);
+ } else {
+ Painter p(s, color);
+ d = walkCorridor(p, left, center, right);
}
drawMonster(s, monsters, d + 1);
@@ -570,6 +720,9 @@ void DungeonMap::drawMonster(Graphics::Views::GfxSurface &s, const byte *monster
continue;
// Only the nearest monster in view is drawn
+ if (Gfx::DungeonPictures::isActive() && Gfx::DungeonPictures::drawMonster(s, monsters[d], d, VIEW_OFFSET))
+ return;
+
int offset = (d == 1) ? monsters[d] * 256 : SPRITE_BAND_OFFSETS[d];
Data::RenderMode mode = g_engine->getRenderMode();
bool ega = Data::isEgaMode(mode);
@@ -609,11 +762,16 @@ void DungeonMap::draw() {
if (_inverted) {
// Inverts the bits of the color, which for the EGA colors is all four
const bool ega = Data::isEgaMode(g_engine->getRenderMode());
+ const bool pictures = Gfx::DungeonPictures::isActive();
for (int y = 0; y < s.h; ++y) {
byte *pixels = (byte *)s.getBasePtr(0, y);
- for (int x = 0; x < s.w; ++x)
- pixels[x] = ega ? Data::EGA_PALETTE_BASE + ((pixels[x] ^ 0xF) & 0xF) : pixels[x] ^ 3;
+ for (int x = 0; x < s.w; ++x) {
+ if (pictures && pixels[x] >= Gfx::DungeonPictures::PALETTE_BASE)
+ pixels[x] = Gfx::DungeonPictures::invert(pixels[x]);
+ else
+ pixels[x] = ega ? Data::EGA_PALETTE_BASE + ((pixels[x] ^ 0xF) & 0xF) : pixels[x] ^ 3;
+ }
}
s.markAllDirty();
More information about the Scummvm-git-logs
mailing list