[sorrows-mudlib] r192 committed - - Made "gelatinous cube" solid yellow. Putty colouring of "dithered" ...

0 views
Skip to first unread message

sorrows...@googlecode.com

unread,
Sep 14, 2010, 10:08:26 AM9/14/10
to sorrows-mud...@googlegroups.com
Revision: 192
Author: richard.m.tew
Date: Tue Sep 14 06:55:50 2010
Log: - Made "gelatinous cube" solid yellow. Putty colouring of "dithered"
yellow and blue, was indistinguishable from white.
- Cleaned up UTF-8 character set display. Very few characters are actually
present, so not looking viable to use it to give too much of an improved
tile display.
http://code.google.com/p/sorrows-mudlib/source/detail?r=192

Modified:
/trunk/games/roguelike/services/world.py
/trunk/games/roguelike/shells/roguelike.py

=======================================
--- /trunk/games/roguelike/services/world.py Mon Sep 13 05:05:19 2010
+++ /trunk/games/roguelike/services/world.py Tue Sep 14 06:55:50 2010
@@ -356,7 +356,7 @@
# the dungeon freely. Two second tick for movement.

def ManageFloraAndFauna(self):
- uthread.new(self.RunNPC, CUBE_TILE, COLOUR_YELLOW, COLOUR_BLUE)
+ uthread.new(self.RunNPC, CUBE_TILE, COLOUR_YELLOW)
uthread.Sleep(10.0)
uthread.new(self.RunNPC, DRAGON_TILE, COLOUR_GREEN)
uthread.Sleep(10.0)
=======================================
--- /trunk/games/roguelike/shells/roguelike.py Mon Sep 13 05:05:19 2010
+++ /trunk/games/roguelike/shells/roguelike.py Tue Sep 14 06:55:50 2010
@@ -89,7 +89,7 @@
WALL_TILE: chr(178),
FLOOR_TILE: chr(250),
DOOR_TILE: chr(254), # 239
- CUBE_TILE: chr(177),
+ CUBE_TILE: chr(219),
}

TILE_SEEN = 1
@@ -1213,28 +1213,41 @@

ranges = []
if inUnicode:
- firstOrd, lastOrd = 0x0020, 0x007E
+ firstOrd, lastOrd = 0xc280, 0xc2bf
ranges.append((firstOrd, lastOrd))

- firstOrd, lastOrd = 0xC380, 0xC3BF
+ firstOrd, lastOrd = 0xc580, 0xc5bf
ranges.append((firstOrd, lastOrd))

- if False:
- firstOrd, lastOrd = 0x02B9, 0x02C0
- ranges.append((firstOrd, lastOrd))
-
-
- firstOrd, lastOrd = 0xC480, 0xC4BF
- ranges.append((firstOrd, lastOrd))
-
- firstOrd, lastOrd = 0xC580, 0xC5BF
- ranges.append((firstOrd, lastOrd))
-
- firstOrd, lastOrd = 0xC680, 0xC6BF
- ranges.append((firstOrd, lastOrd))
-
- #firstOrd, lastOrd = 0xD280, 0xD2BF
- #ranges.append((firstOrd, lastOrd))
+ firstOrd, lastOrd = 0xc680, 0xc6bf
+ ranges.append((firstOrd, lastOrd))
+
+ firstOrd, lastOrd = 0xc780, 0xc7bf
+ ranges.append((firstOrd, lastOrd))
+
+ firstOrd, lastOrd = 0xc880, 0xc8bf
+ ranges.append((firstOrd, lastOrd))
+
+ firstOrd, lastOrd = 0xc980, 0xc9bf
+ ranges.append((firstOrd, lastOrd))
+
+ firstOrd, lastOrd = 0xca80, 0xcabf
+ ranges.append((firstOrd, lastOrd))
+
+ firstOrd, lastOrd = 0xcb80, 0xcbbf
+ ranges.append((firstOrd, lastOrd))
+
+ firstOrd, lastOrd = 0xce80, 0xcebf
+ ranges.append((firstOrd, lastOrd))
+
+ firstOrd, lastOrd = 0xcf80, 0xcfbf
+ ranges.append((firstOrd, lastOrd))
+
+ firstOrd, lastOrd = 0xe29480, 0xe294BF
+ ranges.append((firstOrd, lastOrd))
+
+ firstOrd, lastOrd = 0xe29580, 0xe295BF
+ ranges.append((firstOrd, lastOrd))

sio.write("\x1b%G")
else:
@@ -1253,9 +1266,11 @@
currentOrd = firstOrd
while currentOrd <= lastOrd:
if inUnicode:
- c1 = (currentOrd >> 8) & 0xFF
- c2 = (currentOrd >> 0) & 0xFF
- s = " %c%c" % (c1, c2)
+ v = currentOrd
+ s = ""
+ while v:
+ s = chr(v & 0xFF) + s
+ v = v >> 8
else:
c = self.DisplayCharacter(currentOrd,
charset=charsetCode)
s = "%03d %s" % (currentOrd, c)
@@ -1265,8 +1280,13 @@
currentOrd += 1

self.MoveCursor(self.windowXStartOffset, self.windowYStartOffset +
1, sio=sio)
-
- n = self.windowWidth - (len(rows[0][0]) + 1) * len(rows[0])
+
+ if inUnicode:
+ cellWidth = 1
+ else:
+ cellWidth = len(rows[0][0])
+
+ n = self.windowWidth - (cellWidth + 1) * len(rows[0])
for row in rows:
rn = n / 2
ln = n - rn

Reply all
Reply to author
Forward
0 new messages