Gered
9e8727c02b
replace TARGET_AUDIO_SPEC with separate constants for freq and channels
2022-05-29 14:27:04 -04:00
Gered
94922caf71
minor updates to audio_playback example
...
using Audio's AudioSpec property to get the target format to convert to
2022-05-29 13:53:35 -04:00
Gered
03950c8d3e
formatting
2022-05-29 13:52:53 -04:00
Gered
7ee256e12e
add Audio struct to wrap underlying SDL AudioDevice
...
doesn't provide much value currently, but serves as a base for future
extension (e.g. queuing play commands, global volume changes, etc)
2022-05-29 13:51:55 -04:00
Gered
c5b2e216cf
formatting
2022-05-29 13:22:03 -04:00
Gered
23f2d4da02
update audio_playback example with varied wav file formats to convert
2022-05-29 13:18:51 -04:00
Gered
00eb6fcb20
support loading 16-bit wav files
2022-05-29 13:18:15 -04:00
Gered
dd6178ca1f
improve wav file loading. handle buggy/naive cases better
2022-05-29 12:54:02 -04:00
Gered
b28c0f6555
add stream_size method
...
this is just a temporary alternative to the currently unstable
stream_len method, because i don't currently want to depend on unstable
rust versions if i don't need to.
2022-05-29 12:52:58 -04:00
Gered
9c35d670fa
some AudioSpec usage cleanups and minor improvements
2022-05-29 11:19:57 -04:00
Gered
e4a90e7f10
play_buffer now enforces matching AudioSpecs
2022-05-29 10:57:04 -04:00
Gered
3d3f46417d
change audio channel methods to return options in places. add comments
...
i figure the option return types help clarify intent a bit instead of
using 0's as a default.
2022-05-28 20:57:14 -04:00
Gered
3bf69d651d
add audio_playback example
2022-05-28 20:29:40 -04:00
Gered
342e2a3877
add initial audio playback and wav file support
2022-05-28 20:29:17 -04:00
Gered
bc03961a49
bitmap font/char rendering now requires a FontRenderOpts
...
this is more flexible for future font types, which may not require
only a simple u8 color value (e.g. bitmap fonts)
2022-05-27 17:52:23 -04:00
Gered
51cb8a5bf5
add template_complicated example
2022-05-26 21:18:45 -04:00
Gered
0afc7e822a
add template_minimal example
2022-05-26 18:43:22 -04:00
Gered
246367b50b
remove push/pusher components from dead slime corpses
2022-05-23 20:32:12 -04:00
Gered
1f80c9943e
attribute original artists
2022-05-23 18:17:53 -04:00
Gered
4f3928cf56
add READMEs and screenshots for examples
2022-05-23 17:45:22 -04:00
Gered
1ab1d8e0ad
add "slimed" example
2022-05-23 17:43:38 -04:00
Gered
3ac0adea69
add method for transparent blit with visible pixels all a single color
2022-05-23 14:47:37 -04:00
Gered
2bb4365e08
add some derivations for BlitMethod enum
2022-05-23 14:46:58 -04:00
Gered
41c37fe874
add helper method for testing if a vector is almost the zero vector
2022-05-23 14:14:34 -04:00
Gered
9072879f4f
fix incorrect return type. mutable component should be returned
2022-05-22 17:50:16 -04:00
Gered
db261d2356
add 'Resume' state that game states go through when they wake up again
...
this is to provide an easy way for game states to react to the specific
scenario where they were previously paused and then are re-awakened and
may want to perform (re-)initialization like they may have done in a
previous 'Pending' state (which is only set when states are first
created)
2022-05-22 10:50:12 -04:00
Gered
2c2ba24e6b
add method to create Palettes with specific initial color RGB value
...
for all colors, instead of always initializing new palettes to black
2022-05-21 20:09:27 -04:00
Gered
264c71677b
add helper/debug method to draw a palette to a bitmap
2022-05-21 16:40:09 -04:00
Gered
a4e98ce108
"clean up" imports, re-export under separate top-level crates
2022-05-20 22:12:55 -04:00
Gered
f0930c90d7
allow for multiple states to be popped at once
2022-05-16 20:36:42 -04:00
Gered
4d7f84281b
cleanup. return errors instead of panics
...
the panics were originally added to aid with testing during some rework.
i'm 99% certain these two scenarios cannot occur anymore anyway
2022-05-16 19:00:48 -04:00
Gered
ee9474b231
add state swapping support
2022-05-16 18:59:38 -04:00
Gered
af09c61796
fix state transitions for dead/pending so they happen faster
...
this removes some "dead" frames when pushing/popping states during the
transition between them where there would be at least 1 tick where
no update/render would be called because the top state would be still
in a "dead" or "pending" state
2022-05-15 20:43:54 -04:00
Gered
e2888ca710
formatting
2022-05-15 20:39:56 -04:00
Gered
340dd445d7
minor adjustments
2022-05-15 19:31:56 -04:00
Gered
7c8e1dc21c
add balls_v2 example
2022-05-15 16:34:25 -04:00
Gered
2f23bc5ce1
add is_empty method to States
...
this is intended to allow a game loop to determine if the state
manager is actually doing anything or not, allowing the game loop to
exit out when it determines if there are no states and no more pending
states.
2022-05-15 14:41:23 -04:00
Gered
4e291f33dc
add contains_key convenience component store method
2022-05-15 14:40:06 -04:00
Gered
2470919d17
ComponentSystems update/render functions now only take context argument
...
most apps would almost certainly want to add an Entities instance
to whatever context they were going to be passing in to these functions,
but removing the explicit dependency directly to ComponentSystems itself
removes some ownership issues.
2022-05-15 12:27:12 -04:00
Gered
a05be17821
update gitignore
2022-05-15 12:14:12 -04:00
Gered
4c5c397d9e
add "balls" example
2022-05-15 12:13:29 -04:00
Gered
38e6826440
initial commit
2022-05-15 12:11:46 -04:00