Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
WINTERMUTE: Wintermute subengine for FoxTail game #1319
FoxTail is a point-and-click adventure game by Gingertips Game Studio, featuring extended and hacked WinterMute engine fork with closed sources. Most features are added by introducing new API methods and properties, but some are just hardcoded to be different from normal WME stuff.
I'd like to get some feedback on how I implemented those features while I look if I can do anything with known issues and re-test everything. Most arguable things are:
At the number of places this violates our code formatting conventions (http://wiki.scummvm.org/index.php/Code_Formatting_Conventions). Could you please address those? I could mark those spots if you struggling with locating them.
As to how to properly detect the game, I recommend checking against _gameDescription.adDesc. gameId. Normally, there would be a recommendation to add another GID (gameid), but as I see, Wintermute engine does not use that functionality. This will assure that you're not relying on the game data but have a consistent game id to check against.
Sorry for being missing for such a long time... Anyway, 2nd chapter of FoxTail was released and here I am again, with a new bunch of changes...
2nd chapter's engine is a bit different not only from original WME Lite, but it's different from 1st chapter's FoxTail engine as well. So, I had to add engine versioning (see a39d89a). Commit c629f1f features example of version-depending addition to WME.
There are still some glitches (I don't know how to fix saveload progress bar with dirtyrects), there are still some drawing related bugs posted to bugs.scummvm.org that affects FoxTail), but this pull request allows to play FoxTail, and I'd like to continue work on subengine after reviewing and merging this.
Game is not playable with standard Wintermute, so we should stop player from even trying to run it if ENABLE_FOXTAIL is off.
There are two new methods: immidiate stop and changing walking speed For stopping, I'm reusing turnTo() code to finalize moving. I talked to FoxTail devs about what SetSpeedWalkAnim actually does and answer was to set animation delays with given number of milliseconds.
FoxTail have flexible cursor settings system that require things like toggling visability of inventory items.
FoxTail requires access to SubFrame's pixels to set actor.AlphaColor with lighting map pixel value at x,y of actor's position.
Game.Split(str,sep) is added to split string into array of substrings with separator array.Delete(index) is added to delete an array item by index
FoxTail code is hacked to use key codes from different from usual WME. Got correct mapping using script decompiling, verified with sample game.
FoxTail use 2x, 3x, 4x, etc so-called "screen modes", that are switched between in Options menu. Current implementation makes FoxTail no choice but to think that 640x360 is the only option avaliable, since we don't want game engine to mess with ScummVM's render filter settings.
FoxTail requires Game.GetSaveSlotDescriptionTimestamp for getting information about saved games. Engine 1.2.362 and below returns object with Description and Timestamp fields. Engine 1.2.527 and above returns array with Description and Timestamp as items.
FoxTail fork of WME seems to have hard-coded modifications for getting inter-line and inter-character spaces smaller.
FoxTail fork of WME seems to have hard-coded modifications for dialogue UI. Buttons are ignoring hover-font and pressed-font settings. Buttons also have hard-coded-path scripts attached to them.
Some FoxTail versions have bitmap fonts with white letters and COLOR properties. Alpha value of subframe can be used to recolor white letters to desired color.
FoxTail require SCENE's ENTITY to support additional HINT_X and HINT_Y properties. Those properties are accessed by scripts to display hints: node_object.HintX.
FoxTail reloads in-hand items and cursor during AfterLoad by calling wrapped Game.LoadItems() method. This does not work in WME, as WME explicitly disables methods call at "AfterLoad" event. Somehow, everything seems to work fine without it. Let's supress this error by now... TODO: inspect actor.TakeItem and SetItemCursor for possible effects TODO: make a fake game that calls some methods on AfterLoad, test with FoxTail engine
Wintermute games usually display save/load progress bar as a rectangle drawn above an image. FoxTail's progress bar is drawn below semitransparent image instead. TODO: I have no idea how to make this work with "dirty_rect=true" mode.
Changes since Summer 2019:
I discovered, that difference in key mappings between FoxTail and usual games is not due to FoxTail's engine differences from WME Lite, but were made in WME Lite itself! WME 1.x is using "Virtual-Key Codes" mapping and WME Lite and FoxTail are using "SDL_Keycode" mapping. So, here is total refactoring of keycode handling. Why nobody noticed this earlier? Because there are only 4 currently known series that are based on WME Lite (J.U.L.I.A. series, Reversion series, FoxTail and Securanote) and because most WME games, both 1.x-based and Lite-based are using Keyboard class only for handling Enter and Escape keys, which are the same in both mappings (Backspace, Space and Tab are also the same).