Difference between revisions of "Gob/TODO"

Jump to navigation Jump to search
38 bytes added ,  16:55, 21 February 2016
Use Tracker template instead of BugTrackSF
(Update status. One bug is gone.)
(Use Tracker template instead of BugTrackSF)
(131 intermediate revisions by 12 users not shown)
Line 1: Line 1:
== Status ==
{{Infobox_TODO|
Game is completable. There are occasonal minor graphical glitches. The code is not endian-safe, JoostP is looking into this as time permits.
taskname=Gob Engine TODO|
techcontact=[[Gob]] Engine Team|
subsystem=Engine|
}}


== Problematic places ==
== Bugs, glitches and ToDos ==
* map_loadDataFromAvo() in map.cpp. These are plain calls to memcpy() so all read data is not endian safe and moreover it could read wrong size if sizeof(structure) is used in length calcualtion. All structures should be unwind, i,e, read element by element and FROM_LE_XX wraps applied.
=== Script bugs ===
* Bargon Attack: Graphical glitch when loading a save made on the Bargon bridge after transforming self (the original actor appears as well).
* Fascination: Some versions have incorrect timing in several places as they used loading time. Fixing the scripts is required in those cases (before entering the lab was the most visible example) - '''Now fixed in Amiga and Atari versions'''
* Fascination: The game sometimes hangs in the parking lot when the card is used directly, without the code. - '''This also occurs in the original exe'''
* Gobliins 2: Leaving Vivalzart's screen and returning after putting the mushroom into the machine yields another mushroom in the inventory. Letting Winkle use that one with the machine locks him up.
* Gobliins 2: In music land, trying to switch the screen should be prohibited by the scripts, but isn't. A workaround keeps ScummVM from crashing and shows a dialog box instead. {{Tracker|id=3155}}
* Gobliins 2: In the bubble screen, the game lets you try to release the prince before acquiring the safety pin, leaving you in an unfinishable state. {{Tracker|id=3392}}
* Goblins 3: 'A Bell' button hotspot disappears. {{Tracker|id=3805}}
* Goblins 3: Chessboard scene reloads after the rat is first used. {{Tracker|id=3986}}
* Goblins 3: Unable to enter the Battlefield. {{Tracker|id=4022}}
* Goblins 3: Unable to progress through queen's throne room. {{Tracker|id=4016}}
* Lost in Time: sprite gets corrupted during a dialogue. {{Tracker|id=3839}}
* Woodruff: Infinite hypnotic CDs. {{Tracker|id=3750}}
* Woodruff: Access to the Laboratory. {{Tracker|id=3751}}
* Woodruff: Wrong code for safe in temple. {{Tracker|id=3777}}
* Woodruff: Bluxtre nut not drawn after leaving it on the ground. {{Tracker|id=3742}}


* data_readData(). Same as above.
=== General ===
* Mouse cursor sometimes shown when it shouldn't and vice versa. (Introduced when I changed cursor handling to the CursorManager; my solution isn't all that great, apparently.)
* The number of used jokers isn't saved correctly: you'll always have 5 to spend again after loading. This is a result of using individual files for each save slot and letting the user exit with CTRL-Q (the number of jokers is saved globally for the whole game and only when exiting using the menu).


* int32 *gob_curGobStateVarPtr and all gob_*Ptr variables. They all map directly into data, and have to be fixed.
=== Graphics ===


* 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.
* A few graphical glitches remain:
** Goblins 3: double sprite glitch in the queen level {{Tracker|id=3401}}
** Lost in Time: sprite gets corrupted during a dialogue {{Tracker|id=3839}}
** Lost in Time: palette issue with sprites {{Tracker|id=3838}}
** Woodruff: Palette glitch {{Tracker|id=3768}} (Also happens in the original)
** Woodruff: Graphic glitches {{Tracker|id=3848}} (2 of 3 also happens in the original)
** Woodruff: GFX Glitches {{Tracker|id=4491}} (Also happens in the original)


== Showstoppers/Overall bugs ==
=== Sound ===
[[Image:GobClickGlitch.png|Screenshot from first screen|right|frame|Click at shown spot to see the glitch]]
* Ween: Wrong speaker sound when putting away items on some machines.
* Screen is not wiped out properly between fade in/fade outs
* Fascination: The duration of short sounds is sometimes incorrect. The most obvious problem is the sound of the keys of the phone: the sound is not played for each key (first room). This may be similar to the Ween sound issue.
* Fade out leaves yellow background
* Currently only VGA floppy is supported so we should add MD5-based detection before it will go to CVS
* There is a glitch when you use 'put' action on edge of collision area. See screenshots on the right for a good example. It doesn't happen all the time, i.e. goblin should do some walking to reach that point so glitch will appear.
* Demo doesn't handle last screen properly. It hangs instead of printing ordering info


== More on Endianness and Alignment ==
== File-specific tasks ==
'''Assignee:''' Carthag.
=== video.cpp ===
''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.''
* Add support for other rendering modes (EGA/CGA/Hercules) lega.gdr, l360.gdr, lcga.gdr.
 
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);
=== music.cpp ===
* Gobliiins Mac: musmac1.adl isn't played correctly at all.


It will read whole named chunk and return a stream of it. So code using it
== Game-specific tasks ==
will look as follow:
=== Fascination ===
* Add support to the [[RAC file]], which is used by the protection of the CD version. (not really required, the game works with extracted STKs)


  chunk = new data_getData("intro.stk", "intro.tot");
=== Inca 2 ===
  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.
* The (hard-coded) space shooter isn't yet implemented.
* A few graphic glitches remain.


All places should be revisited and rewritten as every one will cause problems.
=== Little Red Riding Hood ===


This will let us get rid of file_open() too which is an implementation of
* Handle direction keys, so that the arcade part is playable
an ugly idea.


==== Update ====
=== Playtoons ===
''sev:'' As a temporary solution I fixed that with such code:


  data_readData(game_extHandle, (char *)&game_extTable->items[i].offset, 4);
* Creation tool is not working properly.
  game_extTable->items[i].offset = FROM_LE_32(game_extTable->items[i].offset);
* Clicking on a word should spell it, not the first word of the sentence
  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
=== The Last Dynasty ===


== Main and long-term goals ==
* Space shooter is hard-coded there, too.
* Convert it to C++ classes. This should be done on per-file basis and keep in mind that we should make it to resemble original code al little as possible.
* The game currently loops strangely, thanks to the faked shooter return code.
* Endianness fixes


== File-specific tasks ==
=== Urban Runner ===
=== gob.cpp ===
* Write proper game detection. (MD5-based?)


=== map.cpp ===
* When mousing over the register in the hotel action sequence, the inventory pops up.
* See FIXME comment. All calls to map_loadDataFromAvo() should be made endianness and alignment-safe.
* Corrupt encoded frames in videos are skipped or masked by original interpreter. Need to do the same.
** Most of these are now detected and corrected masked, but three cases still remain as of 2011-04-26:
*** < 1sec white glitch in video triggered when Max approaches Door in Basement ("mxport2").
*** ~1sec white glitch in video as Adda escapes from warehouse.
*** Large red/orange glitch in Inspector Van Dell video shown after Max complete Pool Hall entry ("sn6").


=== sound.cpp ===
=== Woodruff ===
* Has yet to be written from sound.asm


=== text.cpp ===
* Crash while loading the "Game over" screen for the Rummy game: {{Tracker|id=3749}}
* This file should be removed and is not currently required for compilation but we need to inspect which variables does it set and to which values and convert them to our Config Manager. We should support all video outputs and at least PC speaker and Adlib.
 
=== util.cpp ===
* Get rid of rand() and use RandomSource
 
=== video.cpp ===
'''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)
* Classify
* 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.
TrustedUser
2,147

edits

Navigation menu