Open main menu

Difference between revisions of "Gob/TODO"

1,536 bytes removed ,  22:11, 11 April 2005
Update several issues, describe new bugs
(Two bugs are fixed)
(Update several issues, describe new bugs)
Line 11: Line 11:
* All structs directly mapped to memory that are not trivially replaced (such as 'scen_animations'). Currently use (or should use - this is still WIP) READ_LE_* functions to read most member variables which are known to be in LE format and only read from - NOT written to. Later, when the data is hopefully converted to native format during loading, these READ_LE_* calls should obviously go.
* All structs directly mapped to memory that are not trivially replaced (such as 'scen_animations'). Currently use (or should use - this is still WIP) READ_LE_* functions to read most member variables which are known to be in LE format and only read from - NOT written to. Later, when the data is hopefully converted to native format during loading, these READ_LE_* calls should obviously go.


== Showstoppers/Overall bugs ==
== Bugs ==
* Currently only VGA floppy is supported so we should add MD5-based detection before it will go to CVS
* It hangs on "please wait" screen in EGA version when screen is completed or switched by code
* Keyboard input is buggy as some keypressed get ignored. Particularly noticeable when entering screen code
* When game calls delay() screen doesn't get redrawn. Noticeable at "please wait" screen and especially cutscenes (try screen #5 FTWKFEN)
* Demo doesn't handle last screen properly. It hangs instead of printing ordering info
* Demo doesn't handle last screen properly. It hangs instead of printing ordering info
== More on Endianness and Alignment ==
'''Assignee:''' Carthag.
''I am going to work on this, this Sunday. I will initlally confine myself to game.cpp, and then start migrating the changes to wherever the files are accessed.''
It crashes now in game.cpp function game_loadExtTable() at
data_readData().
This is all bad. Whole game tries to read structures directly without parsing them.
Problems which it arises:
* sizeof(struct) is bigger than sum of sizes of its elements on most systems due to alignment. This is why it crashes now
* Endianness is not honoured
What we should do here is get rid of both data_openData and data_readData()
and write function with this prototype (give it proper name):
  MemoryReadStream data_getData(const char *filename, const char *chunkname);
It will read whole named chunk and return a stream of it. So code using it
will look as follow:
  chunk = new data_getData("intro.stk", "intro.tot");
  foo.a = chunk.readUint32LE();
  chunk.read(foo.b, 20);
  delete chunk;
MemoryReadStream will track end of chunk by itself, so no additional code is needed.
All places should be revisited and rewritten as every one will cause problems.
This will let us get rid of file_open() too which is an implementation of
an ugly idea.
==== Update ====
''sev:'' As a temporary solution I fixed that with such code:
  data_readData(game_extHandle, (char *)&game_extTable->items[i].offset, 4);
  game_extTable->items[i].offset = FROM_LE_32(game_extTable->items[i].offset);
  data_readData(game_extHandle, (char *)&game_extTable->items[i].size, 2);
  game_extTable->items[i].size = FROM_LE_16(game_extTable->items[i].size);
which is ugly, difficult to read but feasible until proper object-oriented implementation will be done


== Main and long-term goals ==
== Main and long-term goals ==
Line 65: Line 24:
=== gob.cpp ===
=== gob.cpp ===
* Write proper game detection. (MD5-based?)
* Write proper game detection. (MD5-based?)
=== interp.cpp ===
* Since neither VGA nor CD versions have protection screen we may skip it in EGA version too


=== map.cpp ===
=== map.cpp ===
Line 71: Line 33:
=== sound.cpp ===
=== sound.cpp ===
* Has yet to be written from sound.asm
* Has yet to be written from sound.asm
* Support Red Book audio in CD versions


=== text.cpp ===
=== text.cpp ===
Line 80: Line 43:
=== video.cpp ===
=== video.cpp ===
'''Assignee:''' JoostP is working on these
'''Assignee:''' JoostP is working on these
* Implement <strike>pDrawSprite</strike>, <strike>pFillRect</strike>, pDrawLine, <strike>pPutPixel</strike>, <strike>pDrawletter</strike>, pDrawPackedSprite functions from the VGA driver (lvga.gdr)
* Implement <strike>pDrawSprite</strike>, <strike>pFillRect</strike>, pDrawLine, <strike>pPutPixel</strike>, <strike>pDrawletter</strike>, <strike>pDrawPackedSprite</strike> functions from the VGA driver (lvga.gdr)
* Classify
* Add support for other rendering modes (EGA/CGA/Hercules) lega.gdr, l360.gdr, lcga.gdr
* Add support for other rendering modes (EGA/CGA/Hercules) - the EGA version of Gobliiins works with gobreverse, so vid_spriteUncompressor needs to be adjusted and/or the packedSprite drawing routine from the driver need to be implemented.