home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TCE: Transform non-player creatures dying into "X" wall, HUMILITY.
[plomrogue]
/
server
/
utils.py
diff --git
a/server/utils.py
b/server/utils.py
index 22acb0dec6564eda7729be8b918e2e85ee9232a6..c80c1d0288933b85f71c1aab915c73a16a6651d7 100644
(file)
--- a/
server/utils.py
+++ b/
server/utils.py
@@
-84,8
+84,14
@@
def prep_library():
def c_pointer_to_bytearray(ba):
"""Return C char * pointer to ba."""
def c_pointer_to_bytearray(ba):
"""Return C char * pointer to ba."""
- type = ctypes.c_char * len(ba)
- return type.from_buffer(ba)
+ ty = ctypes.c_char * len(ba)
+ return ty.from_buffer(ba)
+
+
+def c_pointer_to_string(string):
+ """Return C char * pointer to string."""
+ p = ctypes.c_char_p(string.encode("ascii"))
+ return p
def parse_command_line_arguments():
def parse_command_line_arguments():
@@
-96,7
+102,8
@@
def parse_command_line_arguments():
action='store')
parser.add_argument('-l', nargs="?", const="save", dest='savefile',
action="store")
action='store')
parser.add_argument('-l', nargs="?", const="save", dest='savefile',
action="store")
- parser.add_argument('-w', type=str, default="confserver/world",
+ parser.add_argument('-w', type=str,
+ default="confserver/TheCrawlingEater",
dest='worldconf', action='store')
parser.add_argument('-v', dest='verbose', action='store_true')
opts, unknown = parser.parse_known_args()
dest='worldconf', action='store')
parser.add_argument('-v', dest='verbose', action='store_true')
opts, unknown = parser.parse_known_args()