Re: translate kolibri
Posted: Fri May 31, 2013 12:27 am
http://it.wikipedia.org/wiki/ELIZA - sorry, I can't provide any details because I don't know them.
Code: Select all
rep28a: db "OH, DO YOU LIKE CARS?",0
rep28b: db "MY FAVORITE CAR IS A LAMBORGINI COUNTACH. WHAT IS YOUR FAVORITE CAR?",0
rep28c: db "MY FAVORITE CAR COMPANY IS FERRARI. WHAT IS YOURS?",0
Code: Select all
; ..................
mov eax, 4
if lang eq it
mov ebx, 7 shl 16 + 22 + topbuttonsbarheight/2 - 4
else
mov ebx, 20 shl 16 + 22 + topbuttonsbarheight/2 - 4
end if
mov ecx, [syscolors.work_button_text]
mov edx, new_game
mov esi, new_game_len
mcall
; ..................
; <--- initialised data --->
if lang eq ru
title db 'Солитер',0
new_game: db "Новая игра"
new_game_len = $ - new_game
exit: db "Выход"
exit_len = $ - exit
s: db "10"
else if lang eq it
title db 'Freecell',0
new_game: db "Nuova partita"
new_game_len = $ - new_game
exit: db "Esci"
exit_len = $ - exit
s: db "10"
else
title db 'Freecell',0
new_game: db "New game"
new_game_len = $ - new_game
exit: db "Exit"
exit_len = $ - exit
s: db "10"
end ifCode: Select all
@echo lang fix it >lang.inc
@fasm freecell.asm freecell
@erase lang.inc
@pauseYes, this is one of the response of eliza, and I have translated it, the problem is that I ca not figure out where in the source code eliza reads what I've written and get the word car...SoUrcerer wrote:There is word "CAR" in "OH, DO YOU LIKE CARS?".
Code: Select all
g++ -c checkers.cpp
In file included from checkers.cpp:250:0:
player.h:53:27: error: default arguments are only permitted for function parameters
checkers.cpp: In member function ‘int TPlayArray::OpenFile(const char*, int)’:
checkers.cpp:529:37: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:530:48: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp: In constructor ‘TMainDraw::TMainDraw()’:
checkers.cpp:797:57: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp: In member function ‘void TMainDraw::InitButton()’:
checkers.cpp:854:35: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:855:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:856:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:858:35: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:859:35: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:861:35: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:865:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:867:32: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:871:40: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:873:36: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:874:35: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:875:35: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:876:35: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:877:36: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
checkers.cpp:880:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
In file included from checkers.cpp:250:0:
player.h: In instantiation of ‘tvalue TBaseCompPlayer<tvalue>::FindBMove(TBaseCompPlayer<tvalue>::Z&, int, TBaseCompPlayer<tvalue>::PMvv*, int, tvalue, tvalue) [with tvalue = long int]’:
player.h:879:3: required from ‘int TBaseCompPlayer<tvalue>::Move(TChPlayer::PMv&) [with tvalue = long int; TChPlayer::PMv = PlayWrite::PMv]’
checkers.cpp:1352:1: required from here
player.h:789:25: error: too few arguments to function
make: *** [checkers.o] Error 1
I don't sure if it is about cross-compiling, or "Windows", "Linux" and "Kolibri" are target OSes for this code, so I suggest to use first way. Obviously, it's for cross-compiling from DOS/Windows/DosBox.1. Kolibri
You need Borland C++ and FASM 1.64 (NOT newer)
cpp2asm.bat will compile C++ to tasm, then convert tasm to fasm.
Then you need to add Kolibri header to f_checkers.asm
2. Linux
Type "make". It should works, but if not you have to fix it somehow.
3. DOS/Windows
You'll need Borland C++. You need to add checkers.cpp to project. In Windows you need to add win-chk.rc. For DOS you need to link it to egavga.bgi
It's not that bad as idea, the problem is I have no idea about assembly, fasm, c-- and other languages (I have only programmed in C, delphi, java and a little of c++, and I've only done simple programs).If I were you I would have focused in translation system applications first of all.
Code: Select all
char *ITEMS_LIST[]={
//"Old HTMLv F12",255,
"View in Tinypad F3",52,
"WIN F5",54,
"DOS Ctrl+D",04,
"KOI Ctrl+K",11,
"UTF Ctrl+U",21,
"Line breaks ON" ,03,
"Free image cache" ,02,
//"TrueType fonts" ,05,
0};
To make it easier to help you - you have to show your code here.fedesco wrote:I have no idea how the code works, so please help me