Sebastian Krzyszkowiak
7cb7c361f0
character: Add ability for a streamed frame bitmap to be owned by API user
...
In such case we won't try to free it.
2020-03-18 06:16:34 +01:00
Sebastian Krzyszkowiak
b592a3382f
character: use calloc instead of malloc
2020-01-16 03:02:44 +01:00
Sebastian Krzyszkowiak
11c49a786d
character: fix unset scale when using RegisterSpritesheetFromBitmap
2020-01-16 03:01:58 +01:00
Sebastian Krzyszkowiak
c74fbc2be8
character: store image scale as spritesheet property
...
This allows streamed spritesheets to not be mistakenly rescaled.
2019-11-18 12:56:46 +01:00
Sebastian Krzyszkowiak
9ec64c46b3
character: introduce streamed spritesheets
...
Streamed spritesheets can be generated on-the-go and don't need to be
loaded from any file (or loading can be handled manually). Streamed
spritesheet can also be "preloaded", that is - converted to regular
spritesheet by preemptively reading the stream and storing the results.
2019-11-18 12:04:23 +01:00
Sebastian Krzyszkowiak
332c668717
character: don't call character callback indefinitely after animation finishes
...
This could happen when the repeats counter went down to 0 with
no successor - the callback would then be called every frame.
2019-11-18 09:47:13 +01:00
Sebastian Krzyszkowiak
11267cd3b1
character: fix stopping of non-repeating reversed spritesheets
2019-10-06 08:06:53 +02:00
Sebastian Krzyszkowiak
29e38ac04c
character: add detailedProgress property for progress report on each frame
2019-08-28 04:18:20 +02:00
Sebastian Krzyszkowiak
94de1c5975
character: mark spritesheets loaded from bitmaps as shared, so the bitmaps don't get destroyed
2019-06-25 05:12:04 +02:00
Sebastian Krzyszkowiak
0f3a5ca25e
character: add RegisterSpritesheetFromBitmap helper
2019-06-03 03:43:35 +02:00
Sebastian Krzyszkowiak
a4147d2e61
character: transparently support ImgToWebp scaling factor
2019-05-06 04:06:58 +02:00
Sebastian Krzyszkowiak
9e0a1ddb36
IsOnCharacter: properly support subbitmaps (for instance spritesheets)
2019-02-01 05:45:26 +01:00
Sebastian Krzyszkowiak
4da588cbb2
API consistency tweaks
2018-12-16 15:35:53 +01:00
Sebastian Krzyszkowiak
df1790d242
doxygen tweaks
2018-12-16 15:15:38 +01:00
Sebastian Krzyszkowiak
b9b231a438
put debug config into public config struct
2018-12-15 01:09:44 +01:00
Sebastian Krzyszkowiak
fe23d33273
character: support advanced atlases in spritesheets
2018-12-12 01:46:16 +01:00
Sebastian Krzyszkowiak
d17a927a82
tween: add HasTweenEnded function
2018-12-10 21:24:59 +01:00
Sebastian Krzyszkowiak
91180024a1
add CopyCharacter util function
2018-11-27 04:43:58 +01:00
Sebastian Krzyszkowiak
9ecd29a7c3
include allegro_color and platform specific headers already in libsuperderpy.h, clean up
2018-11-26 01:40:19 +01:00
Sebastian Krzyszkowiak
de46cff0a4
character: add an ability to tint subcharacters by their parent's color
2018-11-25 05:00:42 +01:00
Sebastian Krzyszkowiak
63f7ae39b9
character: support custom frame duration
2018-11-25 04:49:26 +01:00
Sebastian Krzyszkowiak
a74aa55409
character: allow creating characters with NULL name
...
Useful for shared characters that are going to be swapped between
their archetypes.
2018-11-25 04:17:00 +01:00
Sebastian Krzyszkowiak
a7d2ed55c0
character: don't log destroying shared characters
...
Usually leads to too much noise for no value.
2018-11-25 04:09:41 +01:00
Sebastian Krzyszkowiak
d20b81d104
update clang-tidy diagnostics
2018-10-10 21:37:54 +02:00
Sebastian Krzyszkowiak
b3a9186c6a
character: don't include frame offset in character's transform
...
Fixes handling of subcharacters.
2018-08-05 04:27:26 +02:00
Sebastian Krzyszkowiak
0c5fee3cbb
character: apply spritesheet offset after scaling and rotating
...
I'm not 100% sure yet, but I think this makes more sense.
2018-08-04 03:21:55 +02:00
Sebastian Krzyszkowiak
341aa1d823
character: add ability to specify per-frame color tint
2018-08-03 05:26:28 +02:00
Sebastian Krzyszkowiak
093a808dc2
character: reuse already loaded bitmaps
2018-08-03 05:02:44 +02:00
Sebastian Krzyszkowiak
b60bcfda54
character: support sub-characters (characters positioned relatively to parent character)
2018-08-02 23:32:03 +02:00
Sebastian Krzyszkowiak
c337e3435f
character: add ability to specify spritesheet wide pixel offset
2018-07-29 00:41:14 +02:00
Sebastian Krzyszkowiak
49628de381
LoadSpritesheets: call progress function after each spritesheet
2018-07-05 19:38:31 +02:00
Sebastian Krzyszkowiak
ab8dc0f143
character: fix predecessor memory leak
2018-07-05 16:57:03 +02:00
Sebastian Krzyszkowiak
ce965a2643
character: add ability to set character destructor to free custom data
2018-07-05 16:43:13 +02:00
Sebastian Krzyszkowiak
dcf1375e6f
LoadSpritesheets: decrease the verboseness of logs in non-debug mode
2018-07-05 01:03:45 +02:00
Sebastian Krzyszkowiak
a29c7b4d2c
fix clang-tidy issues
2018-07-04 19:08:39 +02:00
Sebastian Krzyszkowiak
4d5fdcffbb
character: add more logging on spritesheet loading
2018-07-04 06:55:48 +02:00
Sebastian Krzyszkowiak
88ea60dd7b
add missing symbol exports for ShowCharacter and HideCharacter
...
Fixes MinGW
2018-07-04 06:55:12 +02:00
Sebastian Krzyszkowiak
81488f9390
character: rework IsOnCharacter to work properly regardless of pivot, rotation and scale
2018-06-04 19:10:29 +02:00
Sebastian Krzyszkowiak
897aa8b52f
character: honor x/y values from frames when calculating animation size
2018-06-03 03:39:11 +02:00
Sebastian Krzyszkowiak
b0d2c59596
add SwitchSpritesheet
2018-04-26 14:34:00 +02:00
Sebastian Krzyszkowiak
34a36c2038
DrawCenteredScaled
2018-04-24 05:01:59 +02:00
Sebastian Krzyszkowiak
08d2e544b7
character: read width/height values from ini file
2018-04-18 23:13:31 +02:00
Sebastian Krzyszkowiak
60b960ab2c
character: use Spritesheet structs instead of strings with names in callbacks
2018-04-15 23:00:53 +02:00
Sebastian Krzyszkowiak
c77c91e570
character: add GetSpritesheet for getting struct by name
2018-04-15 23:00:17 +02:00
Sebastian Krzyszkowiak
c9efd7afe2
character: don't animate hidden characters
2018-04-15 22:59:42 +02:00
Sebastian Krzyszkowiak
c3adf398b1
character: support non-repeating animations (stopping at the last frame)
2018-04-13 03:00:54 +02:00
Sebastian Krzyszkowiak
4240b47380
DestroyCharacter: print to console when the destroyed character is shared
2018-04-10 14:05:03 +02:00
Sebastian Krzyszkowiak
d017956442
IsOnCharacter: support flipped characters
2018-04-10 05:18:29 +02:00
Sebastian Krzyszkowiak
88b4399cae
character: fix character placement and flipping when drawing
2018-04-08 01:35:31 +02:00
Sebastian Krzyszkowiak
7f420f62ad
Fixes for spritesheet handling
2018-04-08 01:34:06 +02:00