Commit graph

642 commits

Author SHA1 Message Date
Gwilym Kuiper dd5aad0de5 Make HashMap struct public 2022-03-19 23:08:45 +00:00
Gwilym Kuiper 05b8accaec Make the hash_map mod public 2022-03-19 23:08:45 +00:00
Gwilym Kuiper a459a4811c Add test for iterating through all entries 2022-03-19 23:08:45 +00:00
Gwilym Kuiper bfebba1ec1 Implement remove 2022-03-19 23:08:45 +00:00
Gwilym Kuiper 019872b8cc Really basic hash map which you can only add stuff to 2022-03-19 23:08:45 +00:00
Corwin 82922abddb
Merge pull request #188 from corwinkuiper/crate-version-numbers
be less specific in version numbers
2022-03-19 15:19:28 +00:00
Gwilym Kuiper 60657126ad Add comment about the #[allow] 2022-03-18 22:02:07 +00:00
Gwilym Kuiper ccdb0e4921 Add an allow for the clippy bug 2022-03-18 22:01:02 +00:00
Gwilym Kuiper 7ae565b2c3 Remove unused import 2022-03-18 21:53:30 +00:00
Corwin 9d0fa2f40e even less specific 2022-03-18 21:35:32 +00:00
Gwilym Kuiper add3ccd5fb
Merge pull request #186 from gwilymk/fail-build-if-there-is-an-error
Fail build if there is an error
2022-03-13 20:22:45 +00:00
Gwilym Kuiper ec8d692029
Merge pull request #185 from gwilymk/use-dma-in-objects
Use dma in objects
2022-03-13 20:14:23 +00:00
Gwilym Kuiper b88ad5cba5 VRamManager should definitely not have a public new 2022-03-13 20:12:49 +00:00
Gwilym Kuiper 5bf78f6274 Also for raw copy 2022-03-13 19:53:55 +00:00
Gwilym Kuiper ef8b2edc63 Also dma the palette in backgrounds 2022-03-13 19:53:07 +00:00
Gwilym Kuiper 989fcea1d0 Fix typo in exception 2022-03-13 19:43:03 +00:00
Gwilym Kuiper ea3d3d4936 Rename dma_copy to dma_copy16 2022-03-13 19:37:27 +00:00
Gwilym Kuiper 056a38703d Use dma in objects 2022-03-13 19:37:08 +00:00
Gwilym Kuiper 50ce96ac82 Delete library cargo.locks 2022-03-12 23:39:58 +00:00
Gwilym Kuiper 3710d9ad1c
Merge pull request #182 from gwilymk/better-backgrounds-gwilym
Improve background management
2022-03-12 23:26:42 +00:00
Corwin 44c7a93fa3 use new api 2022-03-12 17:36:38 +00:00
Corwin e2bb5cc5c9 add panicing and try variants of api 2022-03-12 17:36:30 +00:00
Gwilym Kuiper 87c5d6ca6a Use the new allocator 2022-03-11 21:49:23 +00:00
GBA bot 3482697a25 Update lockfiles 2022-03-08 00:28:19 +00:00
Renovate Bot ba0ce97e5a
Update Rust crate rustc-hash to 1.1 2022-03-08 00:27:15 +00:00
Gwilym Kuiper cdd77afe22 Merge remote-tracking branch 'origin/master' into better-backgrounds-gwilym 2022-03-07 22:41:11 +00:00
Corwin eb6b2ac5a8 initialise to correct values 2022-03-07 22:03:49 +00:00
Corwin 8c2931aca5 remove unused import 2022-03-07 20:40:53 +00:00
Corwin 40c4a26cb1 update example 2022-03-07 20:38:13 +00:00
Corwin 8f7e7748e2 Graphics 2022-03-07 20:38:06 +00:00
Corwin 6f064b0d99 update lock files 2022-03-06 13:45:16 +00:00
Corwin 4c57f85acd Inline the modulos 2022-03-06 13:37:09 +00:00
Corwin 900cd007df pull out constants 2022-03-06 13:37:07 +00:00
Corwin c55ff3f714 const fnify 2022-03-06 13:36:50 +00:00
Corwin 8a6f341421 update hat chooses wizard 2022-03-06 13:36:26 +00:00
Corwin 4780b8525d remove unused import 2022-03-06 13:31:56 +00:00
Corwin 592a0814f8 non optional feature alloc 2022-03-06 13:31:56 +00:00
Corwin 84e6af5d2f load aseprite files directly with asefile 2022-03-06 13:31:56 +00:00
Corwin 02e6194073 make fields private 2022-03-06 13:31:56 +00:00
Corwin 6bafa3ebab use public api 2022-03-06 13:31:56 +00:00
Corwin ecf31fa833 load multiple 2022-03-06 13:31:56 +00:00
Corwin b3db55330a sprites example 2022-03-06 13:31:56 +00:00
Corwin 25da2a2711 expose the inner proc macro in a macro rules 2022-03-06 13:31:56 +00:00
Corwin efe67423c1 use the types 2022-03-06 13:31:56 +00:00
Corwin 16ff9b8ec1 types for nice sprite import and usage 2022-03-06 13:31:54 +00:00
Corwin 80e53d4716 volatile writes 2022-03-06 13:31:36 +00:00
Corwin c1901819af unblank screen on object init 2022-03-06 13:31:36 +00:00
Corwin 45823273ac satisfy linter 2022-03-06 13:31:36 +00:00
Corwin da9a15402e use more efficient hash function 2022-03-06 13:31:36 +00:00
Corwin 8792146ddb use correct copys 2022-03-06 13:31:36 +00:00
Corwin ae681019bb set palette location on sprite change 2022-03-06 13:31:36 +00:00
Corwin 2a7b350f57 objects now exist and work 2022-03-06 13:31:36 +00:00
Corwin a1b67e107f object controller implementations 2022-03-06 13:31:36 +00:00
Corwin 836143e1f4 copy the sprite and palette data 2022-03-06 13:31:36 +00:00
Corwin d764ff9900 allocate palettes too 2022-03-06 13:31:36 +00:00
Corwin 6a2c9d8826 add some sprite allocation 2022-03-06 13:31:36 +00:00
Corwin 93d994360e make alloc and dealloc public 2022-03-06 13:31:36 +00:00
Corwin 1849571344 sprite allocator 2022-03-06 13:31:34 +00:00
Corwin beb9abbb7e allocator methods pulled out of global alloc trait 2022-03-06 13:30:47 +00:00
Corwin 475edadcb9 extend to also supporting the end 2022-03-06 13:30:47 +00:00
Corwin 3c6c7efc79 allocator that can have a custom start point 2022-03-06 13:30:47 +00:00
Gwilym Kuiper 39a8b5a64f Update lockfiles 2022-03-05 20:52:26 +00:00
Gwilym Kuiper 803527be23 Fix warning in release mode 2022-03-05 19:52:57 +00:00
Gwilym Kuiper ba1c2e3eaf Remove unused import 2022-03-05 19:45:01 +00:00
Gwilym Kuiper d97ceca647 Remove unused function 2022-03-05 19:44:21 +00:00
Gwilym Kuiper 09f6736497 Extract dma_copy to its own module 2022-03-05 19:43:48 +00:00
Gwilym Kuiper 068bc95fe7 Fix warning with non-constant string 2022-03-05 19:35:19 +00:00
Gwilym Kuiper a3e5187457 Use DMA to copy the entire internal map in one go 2022-03-05 19:35:07 +00:00
Gwilym Kuiper 7b43debd3e WIP: Try removing the hashmap 2022-03-05 19:25:55 +00:00
Gwilym Kuiper aa7823232b Try using a vec of vecs rather than a hashmap 2022-03-05 19:25:09 +00:00
Gwilym Kuiper ceb17a0186 Update hat chooses wizard and purple night 2022-03-05 19:25:09 +00:00
Gwilym Kuiper 22c6e37c88 Finally extract InfiniteScrolledMap 2022-03-05 19:25:09 +00:00
Gwilym Kuiper 6b492c5956 Extract more to new files 2022-03-05 19:25:09 +00:00
Gwilym Kuiper 78fb706c9a Extract map to its own file 2022-03-05 19:25:09 +00:00
Gwilym Kuiper e88602b570 Get my brackets correct 2022-03-05 19:25:09 +00:00
Gwilym Kuiper a35119fdbd Fix hat chooses the wizard 2022-03-05 19:25:09 +00:00
Gwilym Kuiper 742231fbc5 Try a different transparent tile then 0 2022-03-05 19:25:09 +00:00
Gwilym Kuiper ed2af0d57e Extract VRamManager to the tiled module 2022-03-05 19:25:09 +00:00
Gwilym Kuiper f1bc09d6cd Avoid crackle on load 2022-03-05 19:25:09 +00:00
Gwilym Kuiper d896adfad5 Clear the backgrounds once they aren't used any more 2022-03-05 19:25:09 +00:00
Gwilym Kuiper de594ad362 Make init take an impl Fn rather than a Box<dyn Fn()> 2022-03-05 19:25:09 +00:00
Gwilym Kuiper 3a913f142a Remove pop while loading a level 2022-03-05 19:25:09 +00:00
Gwilym Kuiper b0b8ec55c4 Remove unused TILE_BACKGROUND 2022-03-05 19:25:09 +00:00
Gwilym Kuiper 63dd837518 Tiny performance improvement with dma to copy the tile data 2022-03-05 19:25:09 +00:00
Gwilym Kuiper 08aeb56f1e Update background and foreground independentently 2022-03-05 19:25:06 +00:00
Gwilym Kuiper 3941117aa7 Switch to rustc-hash 2022-03-05 19:24:28 +00:00
Gwilym Kuiper 06901b3543 Move post-work to pre-work 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 530b71e0df Copy slightly too much 2022-03-05 19:23:53 +00:00
Gwilym Kuiper a365c14917 Small fixes 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 3a795fea8f Handle moving up to 10 tiles at once 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 610be70b92 Correctly set the initial offset value in init() 2022-03-05 19:23:53 +00:00
Gwilym Kuiper a998ae31a4 Correctly use the map width and not the display width 2022-03-05 19:23:53 +00:00
Gwilym Kuiper ebf21f4add Avoid pointless copies 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 66a61e33e6 More correctly special case tile 0 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 666867e933 Track the generation along with the tile data 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 10c97f48d8 Introduce the MapLoan to infinite scrolled map 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 2c8fce40d3 Store the used backgrounds in a bit array 2022-03-05 19:23:53 +00:00
Gwilym Kuiper cd05fee360 Use a concrete type for the TileReference 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 5793d6b6ab Introduce methods for increasing and decreasing the reference 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 2a04ebd884 Rename TileReference to VRamState 2022-03-05 19:23:53 +00:00