Commit Graph
118 Commits
Author SHA1 Message Date
Einar Johan Trøan Sømåen afc09057ab TINSEL: Refactor Notebook and System reels to follow naming conventions 2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen 5b2a8fea37 TINSEL: Rename IsConvAndNotMove -> isConvAndNotMove 2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen 50eb3bb542 TINSEL: Rename the public methods in Dialogs to follow convention 2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen c2e94a0cf5 TINSEL: Rename the private methods in Dialogs to follow convention
Changing from PascalCase to camelCase
2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen bc178e9784 TINSEL: Add debug commands to add all clues, as well as listing them.
At the same time, name the NOTEBOOK_CLUE attribute appropriately
2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen 1f1f97c745 TINSEL: Implement pointer handling for Notebook 2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen a0e5f431de TINSEL: Add initial event support to Notebook.
For now this should be enough to flip pages.
2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen ec6835dac7 TINSEL: Implement Notebook logic for adding clues and showing pages. 2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen de164c168d TINSEL: Implement InventoryOrNotebookActive 2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen 9ebe1cd31b TINSEL: Replace LockMem with GetFrame for FRAME 2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen 72aa757d2c TINSEL: Replace LockMem with GetMultiInit for MULTI_INIT 2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen 18668bd218 TINSEL: Further refactor InventoryObjects
So that we don't need vtables for the InventoryObject-objects, only
for the container.
2022-06-10 23:12:34 +03:00
Einar Johan Trøan Sømåen 51b2994659 Revert TINSEL refactors that happened too close to code freeze.
Revert "TINSEL: Fix int32 discrepancy"
- This reverts commit a640e6b489.

Revert "TINSEL: Refactor Notebook and System reels to follow naming conventions"
- This reverts commit 2cfc3b4ed2.

Revert "TINSEL: Rename IsConvAndNotMove -> isConvAndNotMove"
- This reverts commit 5ba099f408.

Revert "TINSEL: Rename the public methods in Dialogs to follow convention"
- This reverts commit 8ef52754a1.

Revert "TINSEL: Rename the private methods in Dialogs to follow convention"
- This reverts commit a3d0b5206b.

Revert "TINSEL: Add debug commands to add all clues, as well as listing them."
- This reverts commit fdfede64ca.

Revert "TINSEL: Implement pointer handling for Notebook"
- This reverts commit 195b04c9cf.

Revert "TINSEL: Implement polygon-handling for Notebook"
- This reverts commit 10cce703dc.

Revert "TINSEL: Add initial event support to Notebook."
- This reverts commit 61c94379cd.

Revert "TINSEL: Close Inventories when switching between them."
- This reverts commit 337aed1915.

Revert "TINSEL: Implement library function CROSSCLUE"
- This reverts commit 9519288acd.

Revert "TINSEL: Implement Notebook logic for adding clues and showing pages."
- This reverts commit 3580c17cc5.

Revert "TINSEL: Implement InventoryOrNotebookActive"
- This reverts commit 89aefb7794.

Revert "TINSEL: Minor style-fixes"
- This reverts commit e92fafb955.

Revert "TINSEL: Refactor IsInPolygon to be partially a member-function"
- This reverts commit fa7d448051.

Revert "TINSEL: Replace LockMem with GetFrame for FRAME"
- This reverts commit ec9c630fc5.

Revert "TINSEL: Replace LockMem with GetMultiInit for MULTI_INIT"
- This reverts commit fa8e3c506b.

Revert "TINSEL: Further refactor InventoryObjects"
- This reverts commit 1a2f18e421.
2022-05-27 19:55:36 +02:00
Einar Johan Trøan Sømåen 2cfc3b4ed2 TINSEL: Refactor Notebook and System reels to follow naming conventions 2022-05-27 10:39:56 +02:00
Einar Johan Trøan Sømåen 5ba099f408 TINSEL: Rename IsConvAndNotMove -> isConvAndNotMove 2022-05-27 10:29:38 +02:00
Einar Johan Trøan Sømåen 8ef52754a1 TINSEL: Rename the public methods in Dialogs to follow convention 2022-05-27 10:25:33 +02:00
Einar Johan Trøan Sømåen a3d0b5206b TINSEL: Rename the private methods in Dialogs to follow convention
Changing from PascalCase to camelCase
2022-05-27 08:59:44 +02:00
Einar Johan Trøan Sømåen fdfede64ca TINSEL: Add debug commands to add all clues, as well as listing them.
At the same time, name the NOTEBOOK_CLUE attribute appropriately
2022-05-26 23:08:35 +02:00
Einar Johan Trøan Sømåen 195b04c9cf TINSEL: Implement pointer handling for Notebook 2022-05-26 22:29:36 +02:00
Einar Johan Trøan Sømåen 61c94379cd TINSEL: Add initial event support to Notebook.
For now this should be enough to flip pages.
2022-05-26 22:09:31 +02:00
Einar Johan Trøan Sømåen 3580c17cc5 TINSEL: Implement Notebook logic for adding clues and showing pages. 2022-05-26 21:48:17 +02:00
Einar Johan Trøan Sømåen 89aefb7794 TINSEL: Implement InventoryOrNotebookActive 2022-05-26 21:07:21 +02:00
Einar Johan Trøan Sømåen ec9c630fc5 TINSEL: Replace LockMem with GetFrame for FRAME 2022-05-26 21:04:41 +02:00
Einar Johan Trøan Sømåen fa8e3c506b TINSEL: Replace LockMem with GetMultiInit for MULTI_INIT 2022-05-26 21:04:36 +02:00
Einar Johan Trøan Sømåen 1a2f18e421 TINSEL: Further refactor InventoryObjects
So that we don't need vtables for the InventoryObject-objects, only
for the container.
2022-05-26 21:02:05 +02:00
Filippos Karapetis 022906fb86 TINSEL: Remove unused defines 2022-05-12 01:25:18 +03:00
Einar Johan Trøan Sømåen 757aea8ed6 TINSEL: Implement basic menu support (NOIR) 2022-05-11 08:59:07 +03:00
Einar Johan Trøan Sømåen 1839780513 TINSEL: Convert inventory object attributes to enum class. 2022-05-11 08:59:07 +03:00
Einar Johan Trøan Sømåen dd1ba7c85c TINSEL: Implement a container for accessing the INV_OBJECTs
This way we encapsulate the iteration, thus making sure that
the appropriate stride is used (Noir has more fields).
2022-05-11 08:59:07 +03:00
Filippos Karapetis 760547eb52 TINSEL: Remove redundant cast 2022-05-08 15:08:33 +03:00
Einar Johan Trøan Sømåen 60ee470a88 TINSEL: Implement ADDINV3 (Noir) 2022-05-07 21:58:39 +02:00
Einar Johan Trøan Sømåen 102a90cfd9 TINSEL: Implement DECINV2 for NOIR 2022-05-07 21:57:34 +02:00
Einar Johan Trøan Sømåen 0c908cd1db TINSEL: Use scoped enum for system reels.
Also map a few more of them.
2022-05-07 21:25:32 +02:00
Einar Johan Trøan Sømåen 58fa9fa6da TINSEL: Implement WhichInventoryOpen for Noir. 2022-05-07 21:25:23 +02:00
Einar Johan Trøan Sømåen 30b7ab77f8 TINSEL: Add a MultiBounds function
We'll need to query all 4 corners of a multi-object a few times in Noir,
so we might as well put that in a single function.
2022-05-07 20:44:05 +03:00
Einar Johan Trøan Sømåen 36c7cab071 TINSEL: Add a MultiSetAniXYZ function to simplify some X,Y,Z setting 2022-05-07 20:44:05 +03:00
Einar Johan Trøan Sømåen b3dee3c147 TINSEL: Replace guarded MultiDeleteObject with MultiDeleteObjectIfExists
This behaves closer to how free() and delete works, in that it's a no-op
for nullptr. Also to be slightly safer, it will set the pointer to nullptr
afterwards.

The application is slightly indiscriminate, so a few extra nullptr
writes are added, even where the pointer would be immediately assigned
a new value afterwards.
2022-05-07 20:44:05 +03:00
Einar Johan Trøan Sømåen 8a5c567d7c TINSEL: Enable the language scene.
It depended on INVPLAY to be mapped.
2022-05-06 19:39:24 +02:00
Jakob Wagner 99c1ea5ea0 TINSEL: Implement DECINVMAIN libcall
DECINVMAIN does not hail the loadingscreen scene yet because playing
it produces an incorrect corotine stack.
2022-04-27 00:33:15 +03:00
Jakob Wagner b71545857b TINSEL: Remap special inv indexes for v3
V3 requires discerning between NOOBJECT and INV_NOICON as the values
associated to these special indexes now differ.
2022-04-27 00:33:15 +03:00
Jakob Wagner a40cc7053d TINSEL: Implement HELDOBJECTORTOPIC libcall 2022-04-27 00:33:15 +03:00
Jakob Wagner 467706cbd8 TINSEL: Implement v3 path in HoldItem 2022-04-27 00:33:15 +03:00
Jakob Wagner 7fc6499264 TINSEL: Replace TinselV0 checks with comparisons 2022-04-21 20:34:17 +03:00
Jakob Wagner 67c3bce30e TINSEL: Replace TinselV2 checks with comparisons
Until now, the TinselV* defines were used for discerning between
engine versions. The define TinselV2 was true for both v2 and v3.
Sticking to the old scheme would lead to confusion when more
special paths for v3 are implemented.
2022-04-21 20:34:17 +03:00
Filippos Karapetis e90b45b226 TINSEL: Remove superfluous (and a bit confusing) pointer typedefs
This helps align tinsel with our code and type formatting  guidelines
2022-01-16 13:20:40 +02:00
Filippos Karapetis effed966dd TINSEL: Resolve FIXMEs
We already verify the data read for the hopper screen via stream err().
Also, LockMem() has no side-effects when removing unused references.
Thanks to @digitall for spotting the unused variables
2022-01-10 01:51:02 +02:00
D G Turner 1cd05f701d TINSEL: Fix GCC Compiler Warnings 2022-01-09 22:58:05 +00:00
Filippos Karapetis a3f7609de3 TINSEL: Refactor and simplify scene hopper data
This also allows us to remove struct packing, since the raw data is no
longer cast to the hopper structs
2022-01-09 22:38:43 +02:00
Filippos Karapetis 0221bc5c02 TINSEL: Refactor and simplify image handling
This allows us to merge different code paths for Tinsel V1 - V3 and
simplify the relevant code.

- Images are now obtained as a copy via GetImage(), which handles
  endianess internally
- The GetImageFromFilm() / GetImageFromReel() wrappers have been removed
- Direct setting of the image palette has been removed in favor of
  PokeInPalette(). This allows us to make image pointers const
- Struct packing has been removed from the IMAGE class, as we no
  longer cast raw data to image pointers
- There is now a single IMAGE class for all Tinsel versions
2022-01-09 17:07:46 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00