36 Commits

Author SHA1 Message Date
Vladimir Serbinenko
750e2060bf NEVERHOOD: Fix crash on expiring animated sprite backref
Thanks a lot to -=CHE@TER=- for discovering this and excellent debugging
work.
2023-01-29 07:19:36 +01:00
Vladimir Serbinenko
1289b71437 NEVERHOOD: Fix crash on expiring surfaces.
We postpone actual drawing until the frame finishes. At this point some of
the surfaces might have been freed and the pointers are no longer valid.
Use reference counting to ensure that queue surfaces are still valid

Thanks to -=CHE@TER=- for reporting and providing the triggering save
and instructions.
2023-01-19 19:29:40 +03:00
Vladimir Serbinenko
5d6ba18008 NEVERHOOD: Support subtitles for sprites 2022-12-31 20:47:10 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Bastien Bouclet
29cf8e0b43 NEVERHOOD: Add override keywords 2020-02-09 12:43:15 +01:00
Johannes Schickel
6563171e7b NEVERHOOD: Make GPL headers consisten in themselves. 2014-02-18 02:39:36 +01:00
Torbjörn Andersson
f7099c57d1 NEVERHOOD: Made multi-line function-line macros safer
Wrapped the code in the SetUpdateHandler(), SetMessageHandler(),
SetSpriteUpdate(), SetFilterX(), SetFilterY() and NextState()
macros in "do { ... } while (0)". Otherwise you may fool yourself
because in "if (condition) macro();" the "if" will only cover the
first statement of the macro.

CID 1022340, 1022341, 1022342, 1022343
2013-05-31 19:30:36 +02:00
johndoe123
1589e4fe7d NEVERHOOD: Add new method StaticSprite::loadSprite and use it instead of setting stuff "manually" 2013-05-08 20:47:34 +02:00
johndoe123
9ba7a7f1a1 NEVERHOOD: Rename stuff in Sprite:
- processDelta() to updateBounds()
- getRect() to getCollisionBounds()
- _drawRect to _drawOffset
- _rect to _collisionBounds
- _deltaRect to _collisionBoundsOffset
2013-05-08 20:47:33 +02:00
johndoe123
126a306c89 NEVERHOOD: Some cleanup:
- Remove _name field from Entity (wasn't really maintained by me and
  became useless)
- Remove obsolete TODOs
- Add STICK_LAST_FRAME constant for better readability
- Remove commented out callbackList TODOs (these were so far never
  used with over 90% of the game implemented)
2013-05-08 20:47:32 +02:00
johndoe123
d1d1596fd1 NEVERHOOD: Add support for shadow sprites, used only for the shadow of the car/vehicle thing 2013-05-08 20:43:41 +02:00
johndoe123
0683ed9eee NEVERHOOD: Rename SetSpriteCallback to SetSpriteUpdate
- Started replace message numbers with constants
- Add NRect::contains
- Some cleanup
2013-05-08 20:43:38 +02:00
johndoe123
dac95f3f73 NEVERHOOD: More renaming (mostly in Klayman and AnimatedSprite) 2013-05-08 20:40:03 +02:00
johndoe123
9cf2c83e5e NEVERHOOD: Major renaming:
- Give better names to animation callback functions/vars
- Give better names to animation functions (previously known as subXXXX - not completed yet)
- Add dumpAllResources (which is a lie, since it only dumps animations for now)
- More renaming to come
2013-05-08 20:39:43 +02:00
johndoe123
9aff6337bc NEVERHOOD: Try to cleanup sprite creation with a templated insertSprite function (only in Module1000 so far) 2013-05-08 20:39:40 +02:00
johndoe123
1b2d496d18 NEVERHOOD: Try to clean up the clipRect stuff a little 2013-05-08 20:39:40 +02:00
johndoe123
fa695229be NEVERHOOD: Add Sprite::setVisible and use it instead of direct access to the surface member 2013-05-08 20:39:40 +02:00
johndoe123
fad64afa44 NEVERHOOD: Remove unused resource preloading stuff (probably resource preloading is not needed since the original game ran off slow double/quad-speed cd drives and preloading reduced stuttering while playing back then)
- Add Klayman animation speedup
2013-05-08 20:39:39 +02:00
johndoe123
c30e16628e NEVERHOOD: Add Module::updateChild and use it (in most places) 2013-05-08 20:39:39 +02:00
johndoe123
30ff790a07 NEVERHOOD: Add Scene1306 2013-05-08 20:39:38 +02:00
johndoe123
d88836596d NEVERHOOD: More work on Module3000 and Scene3009 (incomplete) 2013-05-08 20:39:34 +02:00
johndoe123
d7dd4b4356 NEVERHOOD: Implement Scene1403, Scene1404 and Scene1405 (memory minigame)
- Move GameModule::startup call into engine instead of the game module constructor
- Reduce debug output
2013-05-08 20:39:34 +02:00
johndoe123
bfd71cff6e NEVERHOOD: New modules Module1200, Module1400, Module1700 and Module1800
- Implement CollisionMan::removeSprite
2013-05-08 20:39:34 +02:00
johndoe123
71da221507 NEVERHOOD: Implement Scene1004
- Module1000 is now almost complete
2013-05-08 20:38:48 +02:00
johndoe123
db9e45706c NEVERHOOD: More work on Scene1002
- Implement NavigationMouse and NavigationLists
- Some renaming
2013-05-08 20:38:48 +02:00
johndoe123
8a5c4a84d0 NEVERHOOD: Implement color replace in AnimatedSprite
(used to disable a color in sprite drawing)
2013-05-08 20:38:47 +02:00
johndoe123
436f8952bb NEVERHOOD: More work on Scene1002, Klayman and the rest
- Add "heavy debug" output to Entity (display which update/message handler is called)
- Also add more debug output
- Error out when a StaticData resource could not be found
2013-05-08 20:38:47 +02:00
johndoe123
92e08f21ed NEVERHOOD: Start with Scene1002 (a lot incomplete) 2013-05-08 20:38:47 +02:00
johndoe123
222cd4a651 NEVERHOOD: More work on Scene1001 and Klayman
- Fix a bug in Klayman's walking
- The lever can now be used
- Other stuff is still missing
- Remove entity.cpp since it's not needed
2013-05-08 20:38:46 +02:00
johndoe123
5c69ae21dd NEVERHOOD: More work on Klayman (still eye cancerous code)
- Start to implement KmScene1001
- Implement queryPositionSprite and queryPositionRectList
- Implement message list related code (setting and running them)
- Access to message params now with accessors (so compatible types can be converted)
2013-05-08 20:38:46 +02:00
johndoe123
88d2759f85 NEVERHOOD: Start with the Klayman class (this is quite some horrible code, also, it doesn't work yet and isn't used yet) 2013-05-08 20:30:58 +02:00
johndoe123
97f319c945 NEVERHOOD: More work on Scene1001, implement Class509 (yes, will be renamed later) and AnimResource related stuff 2013-05-08 20:30:58 +02:00
johndoe123
056b69f0c8 NEVERHOOD: Module1000 and Scene1001 skeletons
- Implement BaseSurface::drawSpriteResourceEx
- Use CollisionMan in Scene
- Some cleanup
2013-05-08 20:30:58 +02:00
johndoe123
f01f9343c8 NEVERHOOD: Start with AnimatedSprite and AnimResource 2013-05-08 20:30:57 +02:00
johndoe123
0614b288cf NEVERHOOD: Add default parameters to StaticSprite constructors 2013-05-08 20:30:57 +02:00
johndoe123
aded2a104b NEVERHOOD: Start with Scene and Sprite classes 2013-05-08 20:30:57 +02:00