#8359 closed patch
Some basics for the Kyra Engine
Reported by: | lordhoto | Owned by: | SF/ender |
---|---|---|---|
Priority: | normal | Component: | Engine: Kyra |
Version: | Keywords: | ||
Cc: | Game: |
Description
Currently I reimplementated form the FreeKyra code. I did some improvments to the fontloader/-renderer and to the CPS loader. The WSA Loader is still buggy, but the WSA renderer works a bit better than in FreeKyra.
At next i'm looking at the Scriptfiles (.EMC).
Currently i know of these fileformats: .CPS - Image files (only supported without own palettes) .WSA - Movies (only version 1 is supported) .COL - Palette files (uncompressed an compressed are supported) .FNT - Font files (all versions should be supported) .PAK - Package files (I know only of uncompressed) .MSC - Room Mask Files (same format as .CPS)
now not supported files: .EMC - Script files .SND - Some kind of Soundformat .XMI - Should be a format from Miles .ADL - Should be a format for AdLib .DAT - don't know for what this files are used. They should have always a string for a room mask file but don't know of the rest.
.VRM - used by Kyrandia 1 CD version should be a package file format ( maybe the same as .PAK? )
CREDITS.TXT - should have some extra information about text color
currently the 'engine' will only show the ITEMS.CPS and draws a text string with 8FAT.FNT.
Supported games: Legend of Kyrandia - floopy disk version
Not supported: Legend of Kyrandia - CD version Legend of Kyrandia 2 and newer
TODO: - improve game detection - fix bugs with WSA movies - maybe some code cleanups - better documentation of the code - and add many other things
BUGS: - WSA loader doesn't work well
I hope you can understand my english =)
Ticket imported from: #1046538. Ticket imported from: patches/464.
Attachments (4)
Change History (20)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
Couple notes.
o strcmpi -> scumm_stricmp. First is not portable o max() -> MAX(). Same thing
Preferably use Unix line endings for you files if you can.
Also some fonts use FontHeader_Magic4 = 0x1010. particularly my localized version. When I change it, font shows up correctly.
Another thing is to modify your loop as following:
while(true) { OSystem::Event event;
updateScreen(); while (g_system->pollEvent(event)) { switch (event.event_code) { case OSystem::EVENT_QUIT: g_system->quit(); break; } } _system->delayMillis(10); }
So it will not be a CPU hog and quitting will be possible.
comment:3 by , 20 years ago
Owner: | set to |
---|
comment:4 by , 20 years ago
what version have you got? I have a german version and in it it's 0x0x1011.
comment:5 by , 20 years ago
Russian, both Floppy and CD versions which obviously are dervied from English.
comment:6 by , 20 years ago
The VRM files only contain .VOC voices and as such are not yet important. If you just patch in the right resource names for the Cd version (intro1.pak and startup.pak I believe) then your test code runs fine.
I'm replacing some of the code in my current tree with some of this, and it'll be in my next commit. Great work. Sorry, it's 2:30am and I'm tired so I'm being a bit abrupt :)
comment:7 by , 20 years ago
i don't know if you know it but the decode40 function is buggy. and now i got out that XMI files are XMIDI files but we won't work with the XMIDI parser from scummvm so well. (i got this warning: "Can only handle 32 tracks but was handed 40"). And i implemented a script interpreter for the EMC files. It loades all files but when the command is 14 (execute) in _STARTUP.EMC the argument is 0x69 and in FreeKyra this 'opcode' isn't implemented so it will shutdown :)
comment:8 by , 20 years ago
ups in the newest code i forgot to comment delete movie; in file kyra/kyra.cpp line: 180
by , 20 years ago
Attachment: | kyra_cpp.tar added |
---|
real working files, some error on unix systems have been corrected
comment:9 by , 20 years ago
_error is unitialized in VMContext class, which prevents any scripts from running.
comment:10 by , 20 years ago
I've just committed some of this code to CVS, with a splattering of changes.
I have various other work of my own that I still need to merge in and commit (I've just decided to use your base classes as the framework, since mine are messier atm :)
As far as the language flag goes, I'm calling it version at the moment since it seems to be related to the engine version more than the language.
Right now I'm trying to work out why loadScript segfaults kyracd loading the _NPC script from startup.pak.. Once I get that fixed, I'll poke around the opcodes.
Hopefully we'll meet up on IRC sometime this weekend and be able to discuss this more.
comment:11 by , 20 years ago
I did some bugfixes in the cps blitter and in the decompression. Here is my newest code.
comment:12 by , 20 years ago
I think it's usually better to open a new tracker item for a new patch, lordhoto.
comment:13 by , 20 years ago
Furthermore, this isn't a proper patch (generated via "cvs diff -u"), rather it's a set of "modified" files. That makes reviewing the patches somewhat more difficult, so please submit patches as patches from now on, thanks :-)
comment:14 by , 20 years ago
The patch has some obvious mistakes in it (easily revealed by turning on more compiler warnings), like mixing up "=" and "==" in at least two places. And since I recently changed code formatting in the kyra/ dir, this set of changed files isn't any longer acceptable either (another reason why real patches are to be prefered -- they don't decay as quickly).
So, please submit a new tracker item. Thanks!
comment:15 by , 20 years ago
Status: | new → closed |
---|
comment:16 by , 6 years ago
Component: | → Engine: Kyra |
---|
You have to add --enable-kyra to ./configure and then it will work.