Commit Graph
28 Commits
Author SHA1 Message Date
Johannes Schickel 6563171e7b NEVERHOOD: Make GPL headers consisten in themselves. 2014-02-18 02:39:36 +01:00
D G Turner d81f6450c9 NEVERHOOD: Silence noisy compiler warning.
This is due to NULL being used. Switching to nullptr which is equivalent
i.e. 0 should silence this.
2013-07-30 21:18:01 +01:00
Sven Hesse 989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02: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 b2934eb166 NEVERHOOD: Fix Klaymen "grow" animation after drinking the potion
- Remove static sprite 0x50C027A8 Scene2803/Scene2803Small because the resource doesn't exist!
- Remove some old comments
- Fix resource extData handling which fixes some crashes
- Enable reusing deleted sound/music slots in SoundMan (was disabled for debugging)
2013-05-08 20:47:38 +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 2c4f0b70fe NEVERHOOD: Add Entity::setSoundPan and use it in the DiskplayerScene 2013-05-08 20:47:31 +02:00
johndoe123 3651d982c4 NEVERHOOD: Change sound stuff in Module2200
- Add Entity::stopSound
2013-05-08 20:43:45 +02:00
johndoe123 0a1a228a88 NEVERHOOD: Change sound stuff in Module1700
- Add Entity::setSoundVolume
2013-05-08 20:43:44 +02:00
johndoe123 7adc1d312e NEVERHOOD: Change sound stuff in Module1100
- Implement Entity::isSoundPlaying
2013-05-08 20:43:44 +02:00
johndoe123 0f04a01338 NEVERHOOD: Change sound playing
Sounds can now be loaded/played by an entity without declaring/initializing a SoundResource which is a little nicer. I implemented this so far for Module1000 only, rest will follow.
2013-05-08 20:43:44 +02:00
johndoe123 6160ee3cf2 NEVERHOOD: Move code from entity.h to new entity.cpp 2013-05-08 20:43:44 +02:00
johndoe123 fc0e40db30 NEVERHOOD: Implement the actual audio code
Sounds and music play now in some scenes
(I didn't change the comments to code in all modules yet)

- Fix calcHash to ignore non-alphanumeric characters, this fixes at least
  one animation glitch (when inserting tapes into the player)
- Move SoundResource to sound.cpp
2013-05-08 20:43:42 +02:00
johndoe123 3872efe2a5 NEVERHOOD: Start with Module1100 and add Scene1105 2013-05-08 20:39:40 +02:00
johndoe123 2f670690bc NEVERHOOD: Add Scene::setPalette for simpled palette creation and use it 2013-05-08 20:39:40 +02:00
johndoe123 b757e22f88 NEVERHOOD: Multiple changes to make the game logic code cleaner (hopefully :)
- Introduce Scene::insertStaticSprite to create static sprites instead of the old "addSprite(new StaticSprite" (not used everywhere yet)
- Introduce macro InsertKlayman to create the Klayman object
- Change sendMessage semantics from "receiver->sendMessage(num,arg,sender)" to "sendMessage(receiver,num,arg)", the sender is always the sending object ("this")
- Similar changes using macros will follow
- And fixed a bug in the elevator
2013-05-08 20:39:38 +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 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 6d81ef0199 NEVERHOOD: Implement game vars 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 c694ce8505 NEVERHOOD: More work on Klayman
- Rename Scene::_playerSprite to _klayman
- Send mouse clicks to the scene object (has not effect yet)
2013-05-08 20:30:59 +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 aded2a104b NEVERHOOD: Start with Scene and Sprite classes 2013-05-08 20:30:57 +02:00
johndoe123 ce4ef688b3 NEVERHOOD: Add skeleton for Module1500 (the intro module) 2013-05-08 20:30:57 +02:00
johndoe123 4a01a69e37 NEVERHOOD: Start with Module and GameModule classes 2013-05-08 20:30:57 +02:00
johndoe123 108368e9b5 NEVERHOOD: Add more
- SpriteResource and PaletteResource resource classes
- Extend BaseSurface to be able to draw SpriteResources onto it
- Implement Entity base class (this may need some work concerning the update/message callbacks later since I'm not sure if the way it's done now is portable)
2013-05-08 20:30:57 +02:00