Commit Graph

9 Commits (7c86e0b3c57a307ecdbd295952b40b0e6262c12e)

Author SHA1 Message Date
En Yi 7c86e0b3c5 Implement initial particle system
Changelog:
- Can only to one-shot burst emitter
- Add test for it
2023-10-21 14:37:54 +08:00
En Yi 7dc66945da Add in engine configuration
All engine constants now sits in a single header file for easy tweaking
Also, SFX list fields is now an array rather than a pointer instead.
2023-10-13 21:55:30 +08:00
En Yi b9b0c11524 Separate out engine from scenes
This creates stronger separation the engine stuff from game
implementations.

way overdue tbh
2023-10-13 21:26:42 +08:00
En Yi 7b3685b792 Refactor for better separation of concern
Changelog:
- Separate out engine-specific stuff vs game-specific stuff
2023-05-16 21:09:38 +08:00
En Yi 64c3532305 Replace method to get Scene specific data
Changelog:
- Use CONTAINER_OF macros to get scene specific data
- Remove unnecessary scene_data from Scene_t
- Still use pointer to scene specific data as these data could be
  quite heavy on memory
2023-05-07 21:04:24 +08:00
En Yi dc760bf8db Attempt to apply code style consitency
Squashed commit of the following:

commit 249fb96c63f68913ef632b8d1006e8a2d1c1b6d3
Author: En Yi <en.yi@tutanota.com>
Date:   Sat Apr 15 22:51:08 2023 +0800

    Ensure 120 column width limit

    Changelog:
    - this is just to avoid overly long line of code

commit 4b1ffa8fc89f17418de15f5fc3f0e73040f1d40c
Author: En Yi <en.yi@tutanota.com>
Date:   Sat Apr 15 20:05:07 2023 +0800

    Ensure style consistency in For loop

commit dcb41960407224592f78278313e97c2cc4bf66a5
Author: En Yi <en.yi@tutanota.com>
Date:   Sat Apr 15 17:26:20 2023 +0800

    Ensure consistency in code style

    Internal Changelog:
    - Use char* var instead of char *var. Preference
2023-04-15 22:52:38 +08:00
En Yi ac6d93565b Add Sprite Component
Changelog:
- Move Sprite struct into components
- Add asset field in engine
- Update scene test code to add engine for assets
    - This fixes the crash when q is pressed
- Add sprite component to player
- Update render function to draw the sprite
2023-03-13 21:12:37 +08:00
En Yi 399c78c200 Implement basic scene switching
Changelog:
- Add confirm and exit actions
    - Exit action used in editor scene
    - Confirm action for menu scene
- Hardcode scene switching in editor and menu scene
- Implement scene change function
    - Scene is not resetted on switch
- Incorporate scene switchin into main function
2023-02-13 23:05:24 +08:00
En Yi 1612b4f648 Refactor and prepare for scene changing
Changelog:
- Rename scene.* to engine.* as the game engine is tied to the
  base scene struct
- Combine *_impl.h into a single header
- Rename scene implementation source code file
- Add GameEngine struct and SceneState enum
2023-02-12 23:30:55 +08:00