Skip to content

Commit 8ddd70c

Browse files
committed
Prepare 12.4.0 release.
1 parent e0cd96d commit 8ddd70c

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ v2.0.0
88

99
Unreleased
1010
------------------
11+
12+
12.4.0 - 2021-05-21
13+
-------------------
1114
Added
1215
- Added modernized REXPaint saving/loading functions.
1316
- `tcod.console.load_xp`
1417
- `tcod.console.save_xp`
1518

1619
Changed
17-
- Using `libtcod 1.18.0`.
20+
- Using `libtcod 1.18.1`.
1821

1922
Fixed
2023
- `tcod.event.KeySym` and `tcod.event.Scancode ` can now be hashed.

tcod/console.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,7 @@ def load_xp(
12571257
12581258
# Convert from REXPaint's encoding to Unicode.
12591259
CP437_TO_UNICODE = np.asarray(tcod.tileset.CHARMAP_CP437)
1260+
12601261
console.ch[:] = CP437_TO_UNICODE[console.ch]
12611262
12621263
# Apply REXPaint's alpha key color.
@@ -1302,15 +1303,12 @@ def save_xp(
13021303
13031304
console = tcod.Console(80, 24) # Example console.
13041305
1305-
# Load a REXPaint file with a single layer.
1306-
# The comma after console is used to unpack a single item tuple.
1307-
console, = tcod.console.load_xp(path, order="F")
1308-
13091306
# Convert from Unicode to REXPaint's encoding.
13101307
# Required to load this console correctly in the REXPaint tool.
13111308
CP437_TO_UNICODE = np.asarray(tcod.tileset.CHARMAP_CP437)
13121309
UNICODE_TO_CP437 = np.full(0x1FFFF, fill_value=ord("?"))
13131310
UNICODE_TO_CP437[CP437_TO_UNICODE] = np.arange(len(CP437_TO_UNICODE))
1311+
13141312
console.ch[:] = UNICODE_TO_CP437[console.ch]
13151313
13161314
# Convert console alpha into REXPaint's alpha key color.

0 commit comments

Comments
 (0)