Page 1 of 1

2 developers

Posted: Mon Apr 07, 2003 4:59 pm
by Quester
I change some chars to unsigned char and get it:

$ make -f makefile.mingw install
g++ -O2 -Wno-long-long -mms-bitfields -DHAVE_SNPRINTF -DHAVE_EXT_HASH_MAP -DHAVE _EXT_HASH_SET -DHAVE_SSTREAM -DUSE_FMOPL_MIDI -DVERSION=\"1.1.0cvs\" -DEXULT_DAT ADIR=\"data\" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -I./imagewin -I./shapes -I./files -I./files/zip -I./gumps -I./objs -I./tools -I. -I./audio -I./conf -I./pathfinder -I./headers -I./usecode -I./usecode/ucxt/include -I./usecode/compiler -I./data -I./server -I./sdl/include -DUSE_EXULTSTUDIO -DHAVE_PNG_H -I./zlib-1.1.4 -DHAVE_ ZIP_SUPPORT -c -o font.o ./shapes/font.cc
shapes/font.cc: In member function `int Font::paint_text_box(Image_buffer8*,
const unsigned char*, int, int, int, int, int, int)':
shapes/font.cc:148: call of overloaded `append(const unsigned char*&, int)' is
ambiguous
c:/mingw/include/c++/3.2/bits/basic_string.tcc:593: candidates are:
std::basic_string& std::basic_string::append(const _CharT*, _Alloc::size_type) [with _CharT =
char, _Traits = std::char_traits, _Alloc = std::allocator]
c:/mingw/include/c++/3.2/bits/basic_string.tcc:604:
std::basic_string& std::basic_string::append(_Alloc::size_type, _CharT) [with _CharT = char,
_Traits = std::char_traits, _Alloc = std::allocator]
shapes/font.cc:169: invalid conversion from `const char*' to `const unsigned
char*'
shapes/font.cc: In member function `int
Font::paint_text_box_fixedwidth(Image_buffer8*, const unsigned char*, int,
int, int, int, int, int, int)':
shapes/font.cc:327: call of overloaded `append(const unsigned char*&, int)' is
ambiguous
c:/mingw/include/c++/3.2/bits/basic_string.tcc:593: candidates are:
std::basic_string& std::basic_string::append(const _CharT*, _Alloc::size_type) [with _CharT =
char, _Traits = std::char_traits, _Alloc = std::allocator]
c:/mingw/include/c++/3.2/bits/basic_string.tcc:604:
std::basic_string& std::basic_string::append(_Alloc::size_type, _CharT) [with _CharT = char,
_Traits = std::char_traits, _Alloc = std::allocator]
shapes/font.cc:348: invalid conversion from `const char*' to `const unsigned
char*'
make: *** [font.o] Error 1

148 lines[cur_line].append(text, ewrd - text);
169 const unsigned char *str = lines.data();
327 lines[cur_line].append(text, ewrd - text);
348 const unsigned char *str = lines.data();

text, ewrd - unsigned char

It can be solved?

Re: 2 developers

Posted: Tue Apr 08, 2003 9:15 am
by wjp
Try http://www.math.leidenuniv.nl/~wpalenst/font.patch (patch against current CVS)

If it works properly I'll commit it to CVS.

Re: 2 developers

Posted: Wed Apr 09, 2003 12:15 am
by Quester
It's WORK!!! Huray!!! :)
Please commit it it CVS!!!!!!
Big THANKS!

Re: 2 developers

Posted: Wed Apr 09, 2003 12:20 am
by Quester
Ups...
In start scene BG - then the Red Moon Gate going down game is stoped (not responding).

Re: 2 developers

Posted: Wed Apr 09, 2003 1:01 am
by Quester
Bug only than starts a russian dialogs (russian uphead text and englsh dialogs work fine).

Re: 2 developers

Posted: Wed Apr 09, 2003 1:06 am
by Quester
I directly change one symbol in usecode file(Iolo dialogs). While it was original all work fine, than before show changed dialog application halted.

Re: 2 developers

Posted: Wed Apr 09, 2003 6:46 am
by wjp
I'm sorry, but I really can't figure out what you're trying to say. What exactly did you try, what works and what doesn't work?

Re: 2 developers

Posted: Wed Apr 09, 2003 11:29 pm
by Quester
work all, except russian dialogs. Example - then I start game I can see Iolo talking with Petre in russian. Than Avatar come throw red moongate and shown dialog. If I add in this dialog one or more russian symbol, application halted.

Re: 2 developers

Posted: Thu Apr 10, 2003 12:01 am
by wjp
How did you edit the usecode? (With which tools?)

Re: 2 developers

Posted: Thu Apr 10, 2003 12:20 am
by Quester
I try edit with tools and try change directly using FAR manager.

Re: 2 developers

Posted: Thu Apr 10, 2003 12:30 am
by wjp
Editing usecode needs the right tools.
You can't directly edit usecode using a hex editor (or similar), since that will almost certainly mess up the structure of the file.

To translate usecode, you should first disassemble usecode. Then, translate the disassembled files. Finally, re-assemble it.
This way, the internal structure will be preserved.

I think Artaxerxes wrote some posts on the forum about the details. Try searching the forum for them.

Re: 2 developers

Posted: Thu Apr 10, 2003 12:46 am
by Quester
I correctly compule usecode, couse it was work with unsigned char default version of exult.
And directly I only replace latin symbol, it dont corrupt file structure.
Maybe you connect to chat and we discuss this?

Re: 2 developers

Posted: Thu Apr 10, 2003 12:54 am
by wjp
> And directly I only replace latin symbol, it dont corrupt file structure.

Ok, if you only replace characters, and don't remove or add any, it should work. (But I would not recommend using this for fully translating all of usecode :-) )


Can you send me your usecode file so I can take a look? (use the email address I entered with this post)

Re: 2 developers

Posted: Thu Apr 10, 2003 1:06 am
by Quester
Ok, sended. Font I send to you month ago :)

Re: 2 developers

Posted: Thu Apr 10, 2003 1:50 am
by wjp
It works here.

Did you maybe make some other changes to the code?

Re: 2 developers

Posted: Thu Apr 10, 2003 1:53 am
by Quester
are use font I was sent you?

Re: 2 developers

Posted: Thu Apr 10, 2003 2:20 am
by Quester
I just now try to new compile (last cvs) and get halt agane.
may couse I use WinXP?
this last string stdout.txt:
Created Pipe for Exult Server
Cheats enabled.
Path_walking_actor_action::open_door()
Path_walking_actor_action::open_door()
Path_walking_actor_action::open_door()
Path_walking_actor_action::open_door()
ireg object
Und sched. opcode 0x00
Und sched. opcode 0x00
Und sched. opcode 0x00

Re: 2 developers

Posted: Thu Apr 10, 2003 3:09 am
by wjp
Can you enable verbose usecode tracing in your exult.cfg file and try again?
(And post the last 25 lines of stdout.txt after that?)

This should cause a _lot_ of debugging information to be written to stdout.txt


your exult.cfg should look something like:


[the rest of the config file]



verbose





(So the key to set is config/debug/trace/usecode, with value 'verbose')

Re: 2 developers

Posted: Thu Apr 10, 2003 11:15 pm
by Quester
Exult version 1.1.0cvs
Built at: Apr 10 2003 19:06:22
Compile-time options: USE_EXULTSTUDIO, HAVE_ZIP_SUPPORT
Compiler: gcc, version: 3.2 (mingw special 20020817-1)

Platform: Windows XP Version 5.1 Build 2600
Data path = data
is_installed: 'c:\games\u7bg\static\endgame.dat': yes
is_installed: 'c:\games\u7si\static\sispeech.spc' : yes
Starting a BLACK GATE game
Current path settings:
Static : c:\games\u7bg\static
Gamedat : c:\games\u7bg\gamedat
Savegame: c:\games\u7bg
Patch : none

Gamedat identity FORGE
Found Serpent Isle 'paperdol.vga', 'gumps.vga' and 'shapes.vga'.
Support for 'Serpent Isle' Paperdolls and Multiracial Avatars in 'Black Gate' ENABLED.
Loading /exult_bg.flx...
Loading default keybindings
NPC #139 is unused
NPC #148 is unused
NPC #279 is unused
NPC #283 is unused
NPC #286 is unused
NPC #287 is unused
NPC #293 is unused
NPC #294 is unused
NPC #295 is unused
NPC #296 is unused
NPC #297 is unused
NPC #302 is unused
NPC #303 is unused
NPC #304 is unused
NPC #305 is unused
NPC #306 is unused
NPC #307 is unused
NPC #308 is unused
NPC #309 is unused
NPC #310 is unused
NPC #311 is unused
NPC #312 is unused
NPC #313 is unused
NPC #314 is unused
NPC #315 is unused
NPC #316 is unused
NPC #317 is unused
NPC #318 is unused
NPC #319 is unused
NPC #320 is unused
NPC #321 is unused
NPC #322 is unused
NPC #323 is unused
NPC #324 is unused
NPC #325 is unused
NPC #326 is unused
NPC #327 is unused
NPC #328 is unused
NPC #329 is unused
NPC #330 is unused
NPC #331 is unused
NPC #332 is unused
NPC #333 is unused
NPC #334 is unused
NPC #335 is unused
NPC #336 is unused
NPC #337 is unused
NPC #338 is unused
NPC #339 is unused
NPC #340 is unused
NPC #341 is unused
NPC #342 is unused
NPC #343 is unused
NPC #344 is unused
NPC #345 is unused
NPC #346 is unused
NPC #347 is unused
NPC #348 is unused
NPC #349 is unused
NPC #350 is unused
NPC #351 is unused
NPC #352 is unused
NPC #353 is unused
NPC #354 is unused
NPC #355 is unused
Created Pipe for Exult Server
Cheats enabled.
Path_walking_actor_action::open_door()
ireg object
Und sched. opcode 0x00
Und sched. opcode 0x00
Und sched. opcode 0x00
-------------------------------------------
than application halted, music dont stop... ingame cursor of mouse dont move

Re: 2 developers

Posted: Fri Apr 11, 2003 12:15 am
by wjp
Hm, maybe the usecode debugging info is in stderr.txt instead?

Re: 2 developers

Posted: Fri Apr 11, 2003 12:17 am
by Quester
no, stderr clear

Re: 2 developers

Posted: Fri Apr 11, 2003 12:18 am
by wjp
Hm, did you compile exult with debugging enabled?

Re: 2 developers

Posted: Fri Apr 11, 2003 12:19 am
by Quester
no :) I must?

Re: 2 developers

Posted: Fri Apr 11, 2003 12:30 am
by wjp
yes :-)

Re: 2 developers

Posted: Fri Apr 11, 2003 8:22 pm
by Quester
-----------------------stdout.txt---------------------------
Returning ("milord") from usecode 0909
...back into usecode 0401
001E: pop [0003] = 0000
0021: callis _is_pc_female@0 ; 005A
0025: pop [0004] = 0000
0028: push eventid
0029: pushi 0003H ; 3
002C: cmpeq
002D: jne 0173 (jump taken)
0173: pushf flag:[003B] = unset
0176: push false
0177: cmpeq
0178: push eventid
0179: pushi 0002H ; 2
017C: cmpeq
017D: and
017E: jne 0268 (jump not taken)
0181: pushi 0000H ; 0
0184: pushi FFFFH ; -1
0187: calli _show_npc_face@2 ; 0003
018B: addsi L00AF ; A rather large, f...
018E: addsv [0000] = "Quester"
0191: addsi L0151 ; ! If I did not tr...
0194: addsv [0000] = "Quester"
0197: addsi L0254 ; , that it hath be...
019A: say
019B: addsi L02B1 ; Iolo winks conspi...
019E: say
019F: pushi 0000H ; 0
01A2: pushi FFF5H ; -11
01A5: calli _show_npc_face@2 ; 0003
01A9: push [0004] = 0000
01AC: jne 01B8 (jump taken)
01B8: pushs L0433 ; hi

---------------------------stderr.txt-------------------------------------
Setting Shape to 721
Setting Shape to 721
Setting Shape to 721
Setting Shape to 721
Setting Shape to 721
Setting Shape to 721
Setting Shape to 721
Playing SFX: 30
Playing SFX: 31
Setting Shape to 721

Re: 2 developers

Posted: Sat Apr 12, 2003 12:51 am
by wjp
hm, the stdout.txt output got cut-off somewhere. Maybe because of stdout buffering. This is about 5 lines before "the stables" show up, btw.

Re: 2 developers

Posted: Sun Apr 13, 2003 11:29 pm
by Quester
and...??? :)