adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] event stuff committed


From: Sasha Kushnirenko
Subject: Re: [Adonthell-devel] event stuff committed
Date: Thu, 29 Apr 2004 21:01:49 +0400
User-agent: Mutt/1.3.28i

Hi, Kai!

A few minor fixes.
--- 1 ---
M src/base/diskio.cc
M src/base/flat.cc
M src/base/flat.h

Do not have <stdio.h> in them but use C-style I/O.  I just add include in
them but I'm not sure if it the way you want it to be handled.

--- 2 ---
Compilations error:

g++ -DHAVE_CONFIG_H -I. -I../.. -I../../libltdl -I/usr/include/python2.2 -g
-Wall -fno-exceptions -fno-rtti -I../../src/ -c python.cc
-Wp,-MD,.deps/libadonthell_python_la-python.TPlo  -fPIC -DPIC -o
.libs/libadonthell_python_la-python.lo
<...snip...>
python.cc: In function `struct PyObject * python::get_tuple(base::flat &,
short unsigned int = 0)':
../../src/python/python.h:184: too few arguments to function `struct
PyObject * python::pass_instance<const char *>(const char *,
python::ownership)'
python.cc:96: at this point in file

--->      PyTuple_SetItem (tuple, i, pass_instance ((const char*) value));

I commented those lines out to get further :) I'm running python 2.2

--- 3 ---

I had swig-1.3.14 which does not support -runtime option.  Somehow
./configure let me through without fatal error.

--- 4 ---

> - diskiotest.cc
>   demonstrates all features of the new save/load
>   mechanism

Works just fine!

Comment: There are many similarities to Sun XDR format (RPC) when you pack
data.  May be it is worth looking into it....  Just a thought though.

--- 4 ---
> - eventtest.py
>   demonstrates the event system (time events). To get
>   it working, you'll have to do the following in the
>   test directory:
> 
>     ln -s . game_events
>     touch __init__.py
> 
>   otherwise, connecting the callbacks will fail.

Am I right that you need to ran it like:
../src/python.sh eventtest.py
We may need to add chmod +x ../src/python.sh

address@hidden:~/adonthell/apr2004/adonthell/test$ ../src/python.sh
eventtest.py 
#1 1 30 5
....
#2 Destroying
   Returning to previously saved state
OK
../src/python.sh: line 2:  2306 Segmentation fault
ADONTHELL_MODULES_PATH="/home/kushnir/adonthell/apr2004/adonthell/src" $@

very well can be related to my hack

> - filereport.py
>   this prints the contents of a new-style save game
>   file. Both diskiotest and eventtest create such a
>   file that you can look at with filereport. Those
>   files are
>   
>      /tmp/diskio.test
>      /tmp/eventtest.tmp
../src/python.sh filereport.py /tmp/eventtest.tmp
Runs fine!

Good job Kai!

Sasha.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]