Gered
88f8cbe1ad
lzw encoding/decoding now reads/writes the min_code_size byte
...
as such, lzw_decode now no longer needs min_code_size as a function
parameter since it just reads it from the source bytes
2022-12-30 11:47:13 -05:00
Gered
803b31d8c8
fix lzw encoding code bit increment and max code value checks
...
this fixes it so that the full 12 bits for codes will be used instead
of only 11. whoops
2022-12-30 10:51:30 -05:00
Gered
0c1f50e63e
initial stab at gif load/save bitmap support
...
the lzw encode / decode algorithm seems to work well enough, but could
be optimized and i'm worried there are still some lingering issues ...
2022-12-29 22:19:35 -05:00
Gered
8cb1d82b49
add support for loading/saving palettes with fewer than 256 colors
2022-12-29 22:17:44 -05:00
Gered
5e65d63540
use a rect for the destination area
...
this isn't strictly needed now, but will be useful in a future change
that changes how clipping works in rotozoom blits
2022-11-08 14:15:41 -05:00
Gered
acbf36ee28
adjust rotozoom internal transformed destination rect coord calculation
...
maybe marginally better/simpler, but also some minor cleanups and a
semi-hackfix for minor destination blit corners being cutoff slightly
for some rotation angles
2022-11-07 13:21:45 -05:00
Gered
a59bfc5511
update rotozoom blit algorithm to something a little bit better
...
but there are still performance improvements we can make. but at least
now we're not doing some silly double-pixel draw as a band-aid over
missing/gap pixels. and we no longer sometimes have missing scanlines
due to floating-point rounding issues.
2022-11-06 22:20:17 -05:00
Gered
018aeef6ed
use position argument
2022-08-10 00:23:43 -04:00
Gered
eb801d996a
commit a whole bunch of test assets that were missed previously. oops!
2022-07-23 15:09:41 -04:00
Gered
2203035401
add a bunch of debug impls. switch some debug derives over too
...
mainly switching #[derive(Debug)] to manual std::fmt::Debug impls to
remove debug strings that would otherwise contain long strings of
byte arrays which most of the time isn't so useful to see in any kind
of debug logging
2022-07-23 15:08:36 -04:00
Gered
cf02471aa8
fix compiler warning
2022-07-20 18:27:54 -04:00
Gered
9316f09e09
added blended drawing operation visual comparison tests
2022-07-20 18:27:27 -04:00
Gered
0dd90e48b4
fix clipping issues with some more blended blit method variants
...
jeez!
2022-07-20 18:25:22 -04:00
Gered
63ac007207
fix clipping issues with some blended blit method variants
2022-07-20 18:11:55 -04:00
Gered
0c9418aaa5
fix blendmap loading issue where the map had a full 256 source color set
2022-07-20 17:36:08 -04:00
Gered
c4e0a11259
add loading and saving support to BlendMap
2022-07-20 16:32:19 -04:00
Gered
d6e05c7e3a
add new_colored_luminance_map method
2022-07-18 21:36:28 -04:00
Gered
9cac8d2500
add better (and significantly slower) new_translucency_map method
2022-07-18 21:22:50 -04:00
Gered
3265388d9d
rename to new_colorized_map. maybe a better name?
2022-07-18 21:22:18 -04:00
Gered
fb101db0ac
stop searching for color matches if this color is an exact match
...
probably very rarely ever an optimization in real-world use, but it
still seems like the logical thing to do
2022-07-18 21:21:40 -04:00
Gered
d9739b4e3e
fix compile issues
2022-07-18 18:27:25 -04:00
Gered
380a0b5655
add blended blit method variants
2022-07-18 18:06:20 -04:00
Gered
c9e32dfca5
add some inlines
...
these help undo some of the previous blit performance regressions.
mostly, anyway.
2022-07-17 20:49:59 -04:00
Gered
08bcb7f5a6
clean up rotozoom blit variants a bit
2022-07-17 15:41:53 -04:00
Gered
195fcea4c6
refactor blits, less copy+paste with slight modifications
...
this might still need to be tweaked still as benchmarks are showing
some performance loses (though, also, some minor performance gains?)
so i guess the lambda functions may not always be inlined, or if they
are, the optimizer isn't able to do the same level of optimizations as
it was before? unsure as of yet, so need to investigate further.
however, none of the performance regressions were huge, so i think this
is acceptable to me for now.
libretrogd was never intended to push performance boundaries anyway :-)
2022-07-17 15:18:01 -04:00
Gered
1b477d2731
Merge remote-tracking branch 'origin/master'
2022-07-17 14:44:02 -04:00
Gered
b4b5cfb02b
update BlendMap derive's
2022-07-17 14:43:26 -04:00
Gered
57ff0b26ae
add helper for constructing BlendMaps suitable for translucency overlays
2022-07-17 14:43:05 -04:00
Gered
db408a3b06
added helper functions for computing rgb color luminance and "grey"ness
2022-07-17 14:42:04 -04:00
Gered
23c7c448b7
add visual comparison tests for most graphics functionality
2022-07-17 14:12:53 -04:00
Gered
d36f0aa9e6
fix clipping issues with certain rotozoom blit methods
2022-07-17 13:37:49 -04:00
Gered
d06ae1837b
add some extra derive's to various structs
2022-07-16 16:52:43 -04:00
Gered
5b2a3c9cb6
added benchmarks for all blit methods
...
in advance of doing a bit of refactoring work
2022-07-16 16:03:38 -04:00
Gered
e72628f9b1
fix broken benchmarks
2022-07-16 14:55:58 -04:00
Gered
884e13032f
add blended variants of primitive rendering
...
except circles for now, there is a little issue to be resolved yet that
i've just been too lazy to figure out for now.
2022-07-13 07:35:55 -04:00
Gered
7ee6df7d7c
add BlendMap
2022-07-13 07:34:53 -04:00
Gered
100c02fc58
add doc comments for entity and event functionality
2022-07-10 15:23:30 -04:00
Gered
e8cbe1debe
add some inline's
2022-07-10 15:15:59 -04:00
Gered
881fe1d2fd
the take_queue function was not intended to be public
2022-07-10 15:14:09 -04:00
Gered
b856ab2fc6
add doc comments for audio functionality
2022-07-10 14:31:23 -04:00
Gered
44984c716c
add "apply" method variant that handles device locking itself
...
rename the old "apply" to "apply_to_device". meh. naming is hard.
i expect that most of the time i'd want to use the "apply" method i'm
adding here that handles device locking internally, so that is why i've
chosen to let it be called "apply" and to rename the other one.
2022-07-10 14:21:52 -04:00
Gered
253e70463e
better method name
...
i guess "from" implies it is converting one thing to another, but that
is not what this method was doing really.
2022-07-10 13:18:59 -04:00
Gered
cbfd66d42e
return index of the audio channel instead of the channel itself
...
this is more useful because playing/stopping can be done on a specific
channel more easily by specifying a channel index. and the index can
obviously also be used to get the channel itself when/if needed, but
it's not super convenient to get the index of a channel when you only
have the channel itself
2022-07-10 12:58:14 -04:00
Gered
06d3d927fe
return true/false based on if playback was actually started or not
2022-07-10 12:55:09 -04:00
Gered
b4e641ed41
forgot to commit necessary test asset for previously added tests
...
another oopsie.
2022-07-10 11:52:11 -04:00
Gered
933811f705
address some compiler warnings. oopsie
2022-07-10 11:51:05 -04:00
Gered
6b7b525597
add font string measurement
2022-07-10 11:49:36 -04:00
Gered
67005faa7b
mark some getter methods inline
2022-07-09 18:19:01 -04:00
Gered
0ccc37420d
add blit_atlas method
...
for some additional convenience when blitting BitmapAtlas tiles
2022-07-09 18:17:28 -04:00
Gered
6a730ed70c
remove redundant clones
2022-07-01 16:29:47 -04:00