Commit graph

606 commits

Author SHA1 Message Date
Corwin Kuiper 8b206ba40c changed to use rotation directly
as was previously written, this would not do anything as integer rotation is an identity.
2021-06-08 19:12:25 +01:00
Corwin Kuiper a5f4673806 set position with vector 2021-06-08 19:08:45 +01:00
Corwin Kuiper 4f21b40cfc make multiply and divide more generic 2021-06-08 17:18:44 +01:00
Corwin Kuiper 301a22d93a add type for making unit vector from angle 2021-06-08 17:10:27 +01:00
Corwin Kuiper 1ac9e54296 fix sin implementation 2021-06-08 17:08:05 +01:00
Corwin Kuiper 81db1b861c multiplication and division by constant 2021-06-08 16:46:13 +01:00
Corwin Kuiper 0ea0f1df3f implement base changing 2021-06-08 15:54:25 +01:00
Corwin Kuiper 527729f5ba I am aware this uses too many arguments, but it's private so I don't care too much 2021-06-08 12:34:24 +01:00
Corwin Kuiper 4aa2a18058 remove unused imports 2021-06-08 12:32:51 +01:00
Corwin Kuiper 9952771bd4 use new tuple implementation 2021-06-08 12:32:23 +01:00
Corwin Kuiper d6eff37b8a add from for tuple 2021-06-08 12:31:27 +01:00
Corwin Kuiper 2163a3b490 fix examples 2021-06-08 12:31:20 +01:00
Corwin Kuiper df954505bf update tiled functions to use new vector2d 2021-06-08 12:31:06 +01:00
Corwin Kuiper 77f6512ba9 give access to underlying coordinates 2021-06-08 12:25:10 +01:00
Corwin Kuiper 161a429320 should not be public 2021-06-08 12:23:13 +01:00
Corwin Kuiper 0283790185 a vector implementation 2021-06-08 12:22:25 +01:00
Corwin Kuiper b0329bdcea fix examples and tests 2021-06-07 13:38:18 +01:00
Corwin Kuiper c106efa8b9 change to system where drawing must provide the map 2021-06-07 13:38:11 +01:00
Corwin Kuiper 86d5c7ca35 optimise getting reference and allow for updating a specific area 2021-06-06 23:27:40 +01:00
Corwin Kuiper 6b725e90ad stop using references 2021-06-06 18:30:42 +01:00
Corwin Kuiper 900b594039 use easily optimisable division for truncate 2021-06-06 18:27:15 +01:00
Corwin Kuiper 87bace3584 let user decide whether to use slice or refcell 2021-06-06 16:35:38 +01:00
Corwin 342aac005c
Merge pull request #63 from corwinkuiper/split-object
move object out of tiled0
2021-06-06 16:18:18 +01:00
Corwin Kuiper 7e837fc3e8 move object out of tiled0 2021-06-06 15:56:01 +01:00
Gwilym Kuiper 40f7975f46 Loop if requested 2021-06-06 15:48:52 +01:00
Gwilym Kuiper 86ba309377 Add ability to set that a channel should loop 2021-06-06 15:47:57 +01:00
Gwilym Kuiper 0875e640de Handle sounds of length not exactly a multiple of SOUND_BUFFER_SIZE 2021-06-06 14:48:01 +01:00
Gwilym Kuiper 333797332e Fix the example after rebase 2021-06-06 14:21:03 +01:00
Gwilym Kuiper 3f3b34c250 Fix clippy warning 2021-06-06 14:17:08 +01:00
Gwilym Kuiper e181f7a751 Refactor to make it a bit more obvious what the write buffer is 2021-06-06 12:58:31 +01:00
Gwilym Kuiper 106e53f917 Use the new mixer in the example 2021-06-06 12:58:31 +01:00
Gwilym Kuiper f126c7f4f4 Make SoundChannel public 2021-06-06 12:58:31 +01:00
Gwilym Kuiper d7a8928955 Add should_loop option 2021-06-06 12:58:31 +01:00
Gwilym Kuiper 46683e42c8 Probably too much in 1 commit 2021-06-06 12:58:31 +01:00
Gwilym Kuiper 72dbf2ef9c Add simple double buffer 2021-06-06 12:58:31 +01:00
Gwilym Kuiper 334472f749 Add a comment explaining where the frequency and buffer size come from 2021-06-06 12:58:31 +01:00
Gwilym Kuiper 9d1aeea077 Make it easier for the user to provide sound samples 2021-06-06 12:58:31 +01:00
Gwilym Kuiper df7a72d618 Fix the sound frequency to 10512Hz 2021-06-06 12:58:31 +01:00
Gwilym Kuiper 8d980697bb Add attribution for the music 2021-06-06 12:58:31 +01:00
Gwilym Kuiper 6ab61b6eb0 Add really basic sound mixer that can play simple tunes 2021-06-06 12:58:31 +01:00
Gwilym Kuiper c2ba8d835a Move old sound code to the dmg module 2021-06-06 12:58:30 +01:00
Corwin Kuiper b0c4a8fd80 satisfy linter 2021-06-06 11:14:50 +01:00
Corwin Kuiper 20c06536e4 clear affine matrix on drop 2021-06-06 11:14:50 +01:00
Corwin Kuiper 006b05ceda move commit to attributes, similar to object 2021-06-06 11:14:50 +01:00
Corwin Kuiper a26732e1fa clear object when dropped 2021-06-06 11:14:50 +01:00
Gwilym Kuiper 13dc368d18 Add basic noise channel support 2021-06-06 10:37:17 +01:00
Gwilym Kuiper 1bb05560cb Make it so that multiplication doesn't overflow so easily 2021-06-06 00:25:45 +01:00
Gwilym Kuiper 026dad0773 Change base can change between convertable integer types too 2021-06-06 00:25:29 +01:00
Gwilym Kuiper 0b41e9e917 Sweep works backwards 2021-06-05 22:53:51 +01:00
Corwin aa10a893f4
Merge pull request #54 from corwinkuiper/object-hidden-by-default
Object hidden by default
2021-06-05 22:42:20 +01:00
Corwin Kuiper be963611ce affine starts at position 9 2021-06-05 22:41:34 +01:00
Corwin Kuiper 4cc7650ddc objects are hidden by default
no need to do it twice
2021-06-05 22:14:47 +01:00
Corwin Kuiper eb352085f1 have objects be hidden by default 2021-06-05 22:14:08 +01:00
Gwilym Kuiper 3357a4b69d Put brackets around nine / forty to ensure that we don't divide where we don't have to 2021-06-05 21:58:32 +01:00
Gwilym Kuiper aa39b2b6ad Make to_raw take self by value rather than reference 2021-06-05 21:49:36 +01:00
Gwilym Kuiper 54e28f5dd4 Add a Number type for i32 2021-06-05 21:47:04 +01:00
Gwilym Kuiper 174517fbb1 Fix tests 2021-06-05 21:47:04 +01:00
Gwilym Kuiper 508f33facd Add support for all the integer widths 2021-06-05 21:47:03 +01:00
Gwilym Kuiper de47dbc5dd Make number generic on i32 2021-06-05 21:30:02 +01:00
Corwin ec87adceb2
Merge pull request #52 from corwinkuiper/number-trig
implement trig functions
2021-06-05 21:10:38 +01:00
Corwin Kuiper 9176e668a1 implement trig functions 2021-06-05 21:06:21 +01:00
Corwin 1807b0adc6
Merge pull request #51 from corwinkuiper/fix-affine
fix index for affine matrix
2021-06-05 20:55:12 +01:00
Corwin Kuiper 36903a0a65 fix index for affine matrix 2021-06-05 20:48:02 +01:00
Gwilym Kuiper 46562e275c Update test for new interface 2021-06-05 20:31:04 +01:00
Gwilym Kuiper 6ab644cf71 Mark affine matrix input as C and packed 2021-06-05 20:29:16 +01:00
Gwilym Kuiper e7edaa1a27 Accept more sensible arguments in affine_matrix 2021-06-05 20:29:12 +01:00
Gwilym Kuiper ceb1b97df8 Use image-converter 0.2.0 2021-06-05 18:13:03 +01:00
Corwin Kuiper 93b0b757bd make all const functions 2021-06-05 17:53:07 +01:00
Corwin Kuiper e55ef4d152 add from and to raw 2021-06-05 17:40:41 +01:00
Gwilym Kuiper 363a16ce33 Add implementation of rem_euclid stolen from f32's implementation and add a test 2021-06-05 17:27:00 +01:00
Gwilym Kuiper cdaef51d76 Add tests for % 2021-06-05 17:23:43 +01:00
Gwilym Kuiper 56cf16def4 Fix int() method to return as-if this was a float 2021-06-05 17:23:28 +01:00
Gwilym Kuiper 8b1ad400a7 Include fix length in debug string 2021-06-05 17:23:06 +01:00
Gwilym Kuiper 8b2dfdffc1 Add proper implementation of debug for Num 2021-06-05 17:22:23 +01:00
Gwilym Kuiper e78c9abcec Add basic definition of rem and remassign 2021-06-05 16:53:07 +01:00
Gwilym Kuiper 34981ea3dd Make change_base function public 2021-06-05 16:35:58 +01:00
Gwilym Kuiper fe0e9f8196 Add the ability to change the base of a fixnum 2021-06-05 16:34:31 +01:00
Corwin Kuiper 18e017ae73 expose number module 2021-06-05 16:15:43 +01:00
Corwin Kuiper ec161d9161 fix chicken example 2021-06-05 16:14:48 +01:00
Corwin Kuiper a39363b6ae add similar treatment to sprite palettes as background palettes 2021-06-05 16:14:41 +01:00
Corwin a3874e7140
Merge pull request #41 from gwilymk/improve-fixnum
Improve fixnum
2021-06-05 16:08:46 +01:00
Gwilym Kuiper 0099dfa688 Get implementation of AddAssign correct 2021-06-05 15:58:56 +01:00
Gwilym Kuiper 0b8eda336d Use better trait bounds for numbers 2021-06-05 15:54:50 +01:00
Gwilym Kuiper 1b5a6421fd Add some more division tests 2021-06-05 15:46:33 +01:00
Gwilym Kuiper 8b2f3f14bb Use more precise implementations 2021-06-05 15:46:13 +01:00
Corwin Kuiper 2a9788d26f remove lifetime specifier 2021-06-05 14:41:39 +01:00
Corwin Kuiper eea0e6d3b3 fix chicken example 2021-06-05 00:27:13 +01:00
Corwin Kuiper 3b9231ef6e fix coordinates 2021-06-05 00:26:10 +01:00
Corwin Kuiper 225d0aca9f set 1d mapping 2021-06-05 00:16:44 +01:00
Corwin Kuiper 1d8ac652f1 fix sprite size ordering 2021-06-05 00:16:31 +01:00
Corwin Kuiper b1ff352623 use lifetimes to prevent affine matrix dropping 2021-06-04 22:39:10 +01:00
Corwin Kuiper 33738c0f93 add test for affine matrix getting 2021-06-04 22:29:27 +01:00
Corwin Kuiper 8867c5c9f1 satisfy linter 2021-06-04 19:43:09 +01:00
Corwin Kuiper 1c779e3c31 fix example 2021-06-04 19:37:45 +01:00
Corwin Kuiper 95407e11f6 add test and fix implementation 2021-06-04 19:37:41 +01:00
Corwin Kuiper 72662cff5a update documentation 2021-06-04 19:29:21 +01:00
Corwin Kuiper cd602d69a4 add allocation for objects and matricies 2021-06-04 19:28:43 +01:00
Corwin Kuiper 3cdb966dd9 fix implementation 2021-06-04 19:15:58 +01:00
Corwin Kuiper a17b37c2b7 add new test 2021-06-04 19:15:25 +01:00
Corwin Kuiper a7cb7ea7b4 keep track of which objects have been assigned 2021-06-04 18:36:23 +01:00
Corwin Kuiper 9fad597844 fix faulty implementation 2021-06-04 18:36:08 +01:00
Corwin Kuiper c208b6528a add tests 2021-06-04 18:35:49 +01:00
Corwin Kuiper 8bf59e0f20 add bitarray implementation 2021-06-04 18:31:28 +01:00
Corwin Kuiper 9286378a36 add sprite sizes 2021-06-04 17:58:06 +01:00
Corwin Kuiper 363e032119 prevent unwanted creation 2021-06-04 11:45:04 +01:00
Corwin Kuiper 91bb5c0774 add helper function for asserting output 2021-06-04 10:42:45 +01:00
Corwin Kuiper 12406fc952 test the test logo 2021-06-04 10:30:25 +01:00
Corwin Kuiper ba80dbefd1 add documentation for object functions and structs 2021-06-03 19:22:26 +01:00
Corwin Kuiper b023807bc0 add documentation for submodules 2021-06-03 19:22:16 +01:00
Corwin Kuiper 6eb13473bb add documentation for submodules 2021-06-03 19:22:08 +01:00
Corwin Kuiper a98a0d0362 fix warnings 2021-05-31 07:34:09 +01:00
Corwin Kuiper 2b28199570 affine matrix calculation 2021-05-31 07:34:09 +01:00
Corwin Kuiper 100b69a4f3 fix chicken with name change 2021-05-31 07:34:09 +01:00
Corwin Kuiper eb596decfc affine object is gettable 2021-05-31 07:34:09 +01:00
Corwin Kuiper 4a74d88530 affine is gettable 2021-05-31 07:34:09 +01:00
Corwin Kuiper 4e10e231a7 expose attributes publically 2021-05-31 07:34:09 +01:00
Corwin Kuiper fbfdd360db remember to add affine id to self 2021-05-31 07:34:09 +01:00
Corwin Kuiper dc4bead590 write affine to oam 2021-05-31 07:34:09 +01:00
Corwin Kuiper 02de6af625 set affine to affine object 2021-05-31 07:34:09 +01:00
Corwin Kuiper 0202c51c77 add affine object 2021-05-31 07:34:09 +01:00
Corwin Kuiper bade37f363 redo object in terms of set_bits 2021-05-31 07:34:09 +01:00
Corwin Kuiper 5cdcfcc0b3 add set bits function 2021-05-31 07:34:09 +01:00
Corwin Kuiper 353fa23876 update chicken example to match 2021-05-31 07:34:09 +01:00
Corwin Kuiper 7aa213936e object attributes in terms of three separate parameters 2021-05-31 07:34:09 +01:00
Corwin Kuiper c3b81a4585 don't touch highest 16 bits 2021-05-31 07:34:09 +01:00
Corwin Kuiper 2c14a8454a remove unneeded non_exhaustive 2021-05-31 07:34:09 +01:00
Corwin Kuiper f3c89cea9c correct spelling 2021-05-31 07:34:09 +01:00
Corwin Kuiper 06210591e9 object attribute for all object modes 2021-05-31 07:34:09 +01:00
Corwin Kuiper 300aafd665 add show / hide implementations 2021-05-31 07:34:09 +01:00
Corwin Kuiper 118b6e9a85 load zeros to correspond to argc and argv 2021-05-29 12:18:34 +01:00
Corwin Kuiper e0e3cdb403 add explicit version 2021-05-23 06:15:32 +01:00
Corwin Kuiper 537bd69998 bump version to 0.2.0 2021-05-23 06:04:35 +01:00
Corwin Kuiper 5f5cdf5871 add target for docs.rs 2021-05-23 06:03:23 +01:00
Corwin Kuiper 9355ef3cc2 add clippy component 2021-05-23 02:20:32 +01:00
Corwin Kuiper 1a7d31d11a add rust-toolchain.toml 2021-05-23 02:16:15 +01:00
Corwin Kuiper c14dd2cd33 change entrypoint signature of all examples 2021-05-22 21:22:44 +01:00
Corwin 5d4565b81e
Merge pull request #26 from corwinkuiper/gdb-debug
gdb-debug
2021-05-20 07:35:59 +01:00
Corwin Kuiper 5bf6635153 move launch.json to parent 2021-05-20 07:25:51 +01:00
Corwin Kuiper 6508885193 fix object in opt-level 0
not sure why it didn't work before
2021-05-20 07:20:29 +01:00
Corwin Kuiper f00e9e58ca add chicken debugger launch.json 2021-05-20 07:20:00 +01:00
Corwin Kuiper 0ba57ea6d0 include debug information in elf 2021-05-20 07:19:38 +01:00
Corwin Kuiper 94a0f87209 build with debug information and zero optimisation 2021-05-20 07:18:54 +01:00
Corwin Kuiper 734a337d07 assemble with debug information 2021-05-20 07:18:33 +01:00
Corwin Kuiper 8b55a63ca9 further satisfy linter 2021-04-28 20:11:36 +01:00
Corwin Kuiper 298fbfb4be satisfy linter 2021-04-28 20:02:04 +01:00
Corwin Kuiper b7150722db remove unused import 2021-04-28 19:32:59 +01:00
Corwin Kuiper 20e588a898 remove unused enum 2021-04-28 19:32:52 +01:00
Corwin Kuiper d85590bff6 added documentation 2021-04-28 19:32:06 +01:00
Corwin Kuiper 0b2472484f update chicken example 2021-04-28 03:15:26 +01:00
Corwin Kuiper f240f60013 use new api for backgrounds 2021-04-28 03:10:10 +01:00
Corwin Kuiper 12e01d6e01 add good map support 2021-04-28 03:09:08 +01:00
Gwilym Kuiper ba2813f927 Add example for the logo and ensure that it gets included in the library 2021-04-20 22:58:53 +01:00
Gwilym Kuiper 62e0c346c5 End-to-end logo working 2021-04-20 22:52:23 +01:00
Gwilym Kuiper 74544374a5 Add a test logo with a chicken and a whale 2021-04-20 21:56:04 +01:00
Gwilym Kuiper 4daafdec20 Actually output some rust code 2021-04-20 20:41:41 +01:00
Gwilym Kuiper 8fd4186f0f Move everything to the agb directory 2021-04-19 22:47:43 +01:00