TheoryOfNekomata
afa8fcce02
Abstract SDL event handling
Delegate the event handling solely in input state.
vor 2 Jahren
TheoryOfNekomata
52fb193b83
Cover all input methods on tests
Add tests for initialization and teardown for all input methods.
vor 2 Jahren
TheoryOfNekomata
bac32963ff
Group player input tests
Specify describe block for each player tests.
vor 2 Jahren
TheoryOfNekomata
25eefd8173
Update macros for list find function
Allow current item pointer to have custom type.
vor 2 Jahren
TheoryOfNekomata
bfc290567b
Fix list and pool errors
Change the pool list initializations.
vor 2 Jahren
TheoryOfNekomata
bc4593d806
Add memory-related code
Add memory and data-related implementations for handling game data.
vor 2 Jahren
TheoryOfNekomata
1095a92c61
Update mock int types
Use consistent integer types for mocks.
vor 2 Jahren
TheoryOfNekomata
5caae74ebc
Update video tests
Properly mock video function dependencies.
vor 2 Jahren
TheoryOfNekomata
259780cdb2
Fix multi player support
Correctly dereference pointers.
vor 2 Jahren
TheoryOfNekomata
e4d4441b07
Update tests
Update input tests.
vor 2 Jahren
TheoryOfNekomata
effcd08fcb
Optimize MIDI events handling
Declare memory before processing.
vor 2 Jahren
TheoryOfNekomata
464e013a46
Update loops
Declare variables early on.
vor 2 Jahren
TheoryOfNekomata
d1999f7667
Add convenience typedefs
Use short names for int types.
vor 2 Jahren
TheoryOfNekomata
9417a20d9a
Improve initialization logic
Provide default states for input and output.
vor 2 Jahren
TheoryOfNekomata
7454c41463
Add channel config
Allow MIDI input to be filtered through MIDI channels.
vor 2 Jahren
TheoryOfNekomata
1f7f00e39b
Adapt messages to receive from any channel
Use higher bits of first message byte to get notes from all channels.
vor 2 Jahren
TheoryOfNekomata
f6e8f3e7db
Update default controls
Restrict Yes/No actions in same 2-octave span.
vor 2 Jahren
TheoryOfNekomata
6f3950a598
Update reference config
The file has been updated upon introducing MIDI controller input
support.
vor 2 Jahren
TheoryOfNekomata
9012772322
Add experimental MIDI controller input support
The game now uses MIDI support for alternative input methods.
vor 2 Jahren
TheoryOfNekomata
81549f3616
Encapsulate I/O
Put I/O values to their respective structs.
vor 2 Jahren
TheoryOfNekomata
ca36ea018d
Refactor structure
Isolate input items into their own directory.
vor 2 Jahren
TheoryOfNekomata
e53b96adb3
Rename joystick directions
Ensure joystick direction enum names are consistent.
vor 2 Jahren
TheoryOfNekomata
0cee207138
Implement abstractions
Ensure each initialization method is in its own source.
vor 2 Jahren
TheoryOfNekomata
627e2a8f28
Update tests
Ensure correct arguments are passed.
vor 2 Jahren
TheoryOfNekomata
3c3c971726
Optimize config loading
Determine config path only once.
vor 2 Jahren
TheoryOfNekomata
33cc6e5edb
Add Spine dependency
Add spine-runtimes to dependencies
vor 2 Jahren
TheoryOfNekomata
b8f5131fb9
Implement geometry methods
Add geometry methods for point, vector, and rectangle.
vor 2 Jahren
TheoryOfNekomata
0ae822976a
Organize tests
Ensure one type of test can only be handled at a time.
vor 2 Jahren
TheoryOfNekomata
881b415d60
Implement joystick tests
Implement tests for joystick axis, hat, and button events.
vor 2 Jahren
TheoryOfNekomata
13bc81c018
Organize CMakeLists
Order files from order of includes.
vor 2 Jahren
TheoryOfNekomata
d9cb1483d0
Organize test fixtures
Add third-party mocks, specify mock files.
/? Do we need first-party mocks in their own files, or can we provide a
mock flag in the implementation files already?
vor 2 Jahren
TheoryOfNekomata
656bcf0260
Isolate input/output handling
Make device handling opt-in.
vor 2 Jahren
TheoryOfNekomata
6a0e71faef
Update mocks
Use types from header file.
vor 2 Jahren
TheoryOfNekomata
093653d1e6
Define call count type
Use call count type to contextualize call counts.
vor 2 Jahren
TheoryOfNekomata
6d6c35d557
Define mock macros
Use macros for syntactic sugar.
vor 2 Jahren
TheoryOfNekomata
498051b454
Add mocks and stubs
Include mocks and stubs implementation in config unit tests.
vor 2 Jahren
TheoryOfNekomata
123ccffa2b
Define constants
Use #define instead of const for constants.
vor 2 Jahren
TheoryOfNekomata
d320b66402
Add unit tests
Use bdd-for-c for unit tests.
vor 2 Jahren
TheoryOfNekomata
3f1757574a
Reorganize game loop
Honor the FPS cap with updating video. Now the update occurs after
processing all the input actions.
vor 2 Jahren
TheoryOfNekomata
cc63e9e338
Add gamepad/joystick support
Implement event handling for gamepads and joysticks.
In addition, the events are ordered according to SDL compatibility.
vor 2 Jahren
TheoryOfNekomata
e5b0e5129d
Refactor structure
Extract config-related code to their own source files.
vor 2 Jahren
TheoryOfNekomata
f3d50bcd99
Save config upon loading
Ensure that initial loading of the config saves the values back to the
config file, in order to account for fallback values.
vor 2 Jahren
TheoryOfNekomata
aa41c57db6
Add ini parser, setup custom config
We use minIni to parse ini files instead of implementing our own. This
is useful for config modifiable by the user, such as controls.
However, we haven't implemented a fault-tolerant config that writes to
the config when the existing file is corrupted or non-existent. We will
have to define a "save" as soon as we have all values defined for our
in-memory config, regardless if we have retrieved the values
successfully or provided default hardcoded values.
Since we use an external dependency to manage our configs, the CMake
config must be modified and the source files included in the build. How
do we organize the dependencies from other Git repositories moving forward?
vor 2 Jahren
TheoryOfNekomata
d5bdd3c101
Update CMake config, add events demo
Make CMake load dependencies relative to project directory.
vor 2 Jahren