Commit graph

32 commits

Author SHA1 Message Date
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
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
ce965a2643 character: add ability to set character destructor to free custom data 2018-07-05 16:43:13 +02:00
Sebastian Krzyszkowiak
ce131e50a0 character: fix switched names in CharacterCallback macro 2018-06-28 04:25:56 +02:00
Sebastian Krzyszkowiak
40df27640c character: add CharacterCallback macro for defininig animation callbacks 2018-06-27 19:30:35 +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
b0d2c59596 add SwitchSpritesheet 2018-04-26 14:34:00 +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
c3adf398b1 character: support non-repeating animations (stopping at the last frame) 2018-04-13 03:00:54 +02:00
Sebastian Krzyszkowiak
df536baa32 character: save transform to character struct for easier handling by auxiliary helpers 2018-03-21 02:15:34 +01:00
Sebastian Krzyszkowiak
d88162cab4 spritesheets: support for predecessors and reversed animations 2018-03-21 02:05:22 +01:00
Sebastian Krzyszkowiak
b31d093e8c New spritesheets 2018-03-20 21:39:37 +01:00
Sebastian Krzyszkowiak
c85381644c rumina hacks 3 2018-03-15 00:46:52 +01:00
Sebastian Krzyszkowiak
aa1f7f3ab9 General Characters refactor 2018-03-15 00:42:24 +01:00
Sebastian Krzyszkowiak
f0417b09f6 rumina hacks 2 2018-03-15 00:42:24 +01:00
Sebastian Krzyszkowiak
ae70770f77 rumina hacks 2018-03-15 00:42:24 +01:00
Sebastian Krzyszkowiak
749bb1ef50 character: add ability to set the size of the confines
Useful when the size of the canvas being drawn to is different
than the size of the viewport (default confine).
2018-02-03 03:17:36 +01:00
Sebastian Krzyszkowiak
c34c13739d add SetCharacterPivotPoint function 2017-09-15 23:44:44 +02:00
Sebastian Krzyszkowiak
2b1248ce14 clang-tidy support; clang-tidy and clang-format fixes 2017-09-10 21:35:14 +02:00
Sebastian Krzyszkowiak
e9bd4eefa5 update license to GPLv3+ 2017-07-22 18:22:28 +02:00
Sebastian Krzyszkowiak
31f173f2a8 character: add support for repeating animation with successor
plus update README
2017-03-04 19:54:48 +01:00
Sebastian Krzyszkowiak
ca2f26e9ff add DrawScaledCharacter(F) 2016-12-06 02:54:31 +01:00
Sebastian Krzyszkowiak
2e1a7e73fd add IsOnCharacter helper function 2016-08-29 23:44:15 +02:00
Sebastian Krzyszkowiak
04db328028 refine Character API
BREAKING CHANGES: character->x and character->y now refer to position relative
to screen width and height (0.0,0.0 being top left; 1.0,1.0 being bottom right).
Use GetCharacterX and GetCharacterY to get position in pixels.
For consistency, it's also recommended to use GetCharacterAngle.
SetCharacterPosition/MoveCharacter still accept pixels.
To use relative positions, call SetCharacterPositionF/MoveCharacterF instead.

Also, DrawCharacter now casts the position to integer, effectively disabling
Allegro's subpixel precision. To disable casts, use DrawCharacterF.
2016-08-26 23:52:32 +02:00
Sebastian Krzyszkowiak
617f9c0270 reorganize source files a bit 2016-07-04 00:56:45 +02:00