gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 62b5ef10b0ff2de8791e6f11df4d122c4d9f2863 parent 2e435bf7c0f0403e300e5add3237e51448f3313d Author: bbbbbr <bbbbbr@users.noreply.github.com> Date: Tue, 3 Oct 2023 00:01:29 -0700 Merge pull request #583 from bbbbbr/docs_4_2_next Docs: minor changes to merged PR, add some warning notes to FAQ Diffstat:
| M | docs/pages/08_faq.md | 9 | ++++++++- |
| M | gbdk-lib/include/gb/gb.h | 4 | ++-- |
| M | gbdk-lib/include/nes/nes.h | 3 | +-- |
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/docs/pages/08_faq.md b/docs/pages/08_faq.md @@ -34,7 +34,7 @@ - How do I set the ROM @ref MBC type, and what MBC values are available to use with the `-yt` @ref makebin flag? - See @ref setting_mbc_and_rom_ram_banks <!-- --> -# Errors +# Errors and Warnings @anchor faq_gbz80_sm83_old_port_name_error - What does the error `old "gbz80" SDCC PORT name specified (in "-mgbz80:gb"). Use "sm83" instead. You must update your build settings.` mean? - The `PORT` name for the Game Boy and related clones changed from `gbz80` to `sm83` in the SDCC version used in GBDK-2020 4.1.0 and later. You must change your Makefile, Build settings, etc to use the new name. Additional details in the @ref console_port_plat_settings "Console Port and Platform Settings" section. <!-- --> @@ -76,6 +76,13 @@ - This may happen if you have large initialized arrays declared without the `const` keyword. It's important to use the const keyword for read-only data. See @ref const_gbtd_gbmb and @ref const_array_data - It can also happen if C source files are `#included` into other C source files, or if there is a very large source file. <!-- --> + - What does `warning 283: function declarator with no prototype` mean? + - Function forward declarations and definitions which have no arguments should be changed from `func()` to `func(void)`. + - In C `func()` and `func(void)` do not mean the same thing. `()` means any number of parameters, `(void)` means no parameters. For example if a function with no arguments is declared with `()` then there may not be an error or warning when mistakenly trying to pass arguments to it. <!-- --> + + - What do the warnings `warning 126: unreachable code` and `warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG` mean? + - There is source code which the compiler has determined will never get executed based on the input values. So either a warning is omitted, or in some cases the optimizer has changed the program so that it skips code that will never run. <!-- --> + @anchor faq_macos_security_warning - On macOS, what does `... developer cannot be verified, macOS cannot verify that this app is free from malware` mean? - It does not mean that GBDK is malware. It just means the GBDK toolchain binaries are not signed by Apple, so it won't run them without an additional step. diff --git a/gbdk-lib/include/gb/gb.h b/gbdk-lib/include/gb/gb.h @@ -1851,10 +1851,10 @@ inline uint8_t get_sprite_tile(uint8_t nb) { \code{.c} // Load palette data into the first palette set_sprite_palette(4, 1, exampleSprite_palettes) + // Set the OAM value for the sprite // These flags tell the sprite to flip both vertically and horizontally. - set_sprite_prop(0, 0b01500000); - set_sprite_prop(0, S_FLIPY + S_FLIPX); + set_sprite_prop(0, S_FLIPY | S_FLIPX); \endcode @see S_PALETTE, S_FLIPX, S_FLIPY, S_PRIORITY diff --git a/gbdk-lib/include/nes/nes.h b/gbdk-lib/include/nes/nes.h @@ -1051,8 +1051,7 @@ inline uint8_t get_sprite_tile(uint8_t nb) { // Set the OAM value for the sprite // These flags tell the sprite to use the first sprite palette (palette 4) and to flip the sprite both vertically and horizontally. - set_sprite_prop(0, 0b11000000); - set_sprite_prop(0, S_FLIPY + S_FLIPX); + set_sprite_prop(0, S_FLIPY | S_FLIPX); \endcode @see S_PALETTE, S_FLIPX, S_FLIPY, S_PRIORITY
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.