gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit c51b7c0d57ce3d5c5c9ec9834930d47d34fe248f parent d43d1308a4fe60df5574d99c2b1beaaa38478f08 Author: Zal0 <cebolleto@gmail.com> Date: Sat, 13 Nov 2021 12:28:36 +0100 Merge branch 'develop' of https://github.com/Zal0/gbdk-2020 into develop Diffstat:
20 files changed, 69 insertions(+), 71 deletions(-)
diff --git a/.github/workflows/gbdk_build_and_package.yml b/.github/workflows/gbdk_build_and_package.yml @@ -32,28 +32,33 @@ jobs: - name: Linux Depends if: matrix.name == 'Linux-x64' run: | - # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-official/sdcc-snapshot-amd64-unknown-linux2.5-20210711-12539.tar.bz2 # Use patched sms/gg z80 build: - curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-amd64-linux2.5-20210711-12539--sms-gg-patched.tar.bz2 + # For GBDK-2020 4.0.5 + # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-amd64-linux2.5-20210711-12539--sms-gg-patched.tar.bz2 + # For GBDK-2020 4.0.6 + curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-amd64-linux2.5-20211031-12539--sms-gg-patched.tar.bz2 bunzip2 sdcc.tar.bz2 tar xvf sdcc.tar - name: MacOS Depends if: matrix.name == 'MacOS-x64' run: | - # Note: patched sms/gg z80 build not available for macOS - curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-official/sdcc-snapshot-x86_64-apple-macosx-20210718-12548.tar.bz2 # Use patched sms/gg z80 build: - curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-apple-macosx-20210718-12548--sms-gg-patched.tar.bz2 + # For GBDK-2020 4.0.5 + # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-apple-macosx-20210718-12548--sms-gg-patched.tar.bz2 + # For GBDK-2020 4.0.6 + curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-x86_64-apple-macosx-20210718-12548--sms-gg-patched.tar.bz2 bunzip2 sdcc.tar.bz2 tar xvf sdcc.tar - name: Windows-x64 Depends if: matrix.name == 'Windows-x64' run: | - # curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-official/sdcc-snapshot-x86_64-w64-mingw32-20210711-12539.zip # Use patched sms/gg z80 build: - curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-w64-mingw32-20210711-12539--sms-gg-patched.zip + # For GBDK-2020 4.0.5 + # curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-w64-mingw32-20210711-12539--sms-gg-patched.zip + # For GBDK-2020 4.0.6: adds makebin -yN (also seems to trigger AV less) + curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-x86_64-w64-mingw32-20210711-12539--sms-gg-patched_makebin_yN.zip 7z x sdcc.zip - name: Windows Depends MSYS2/MinGW64 diff --git a/.github/workflows/gbdk_build_examples.yml b/.github/workflows/gbdk_build_examples.yml @@ -32,28 +32,33 @@ jobs: - name: Linux Depends if: matrix.name == 'Linux-x64' run: | - # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-official/sdcc-snapshot-amd64-unknown-linux2.5-20210711-12539.tar.bz2 # Use patched sms/gg z80 build: - curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-amd64-linux2.5-20210711-12539--sms-gg-patched.tar.bz2 + # For GBDK-2020 4.0.5 + # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-amd64-linux2.5-20210711-12539--sms-gg-patched.tar.bz2 + # For GBDK-2020 4.0.6 + curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-amd64-linux2.5-20211031-12539--sms-gg-patched.tar.bz2 bunzip2 sdcc.tar.bz2 tar xvf sdcc.tar - name: MacOS Depends if: matrix.name == 'MacOS-x64' run: | - # Note: patched sms/gg z80 build not available for macOS - curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-official/sdcc-snapshot-x86_64-apple-macosx-20210718-12548.tar.bz2 # Use patched sms/gg z80 build: - curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-apple-macosx-20210718-12548--sms-gg-patched.tar.bz2 + # For GBDK-2020 4.0.5 + # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-apple-macosx-20210718-12548--sms-gg-patched.tar.bz2 + # For GBDK-2020 4.0.6 + curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-x86_64-apple-macosx-20210718-12548--sms-gg-patched.tar.bz2 bunzip2 sdcc.tar.bz2 tar xvf sdcc.tar - name: Windows-x64 Depends if: matrix.name == 'Windows-x64' run: | - # curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-official/sdcc-snapshot-x86_64-w64-mingw32-20210711-12539.zip # Use patched sms/gg z80 build: - curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-w64-mingw32-20210711-12539--sms-gg-patched.zip + # For GBDK-2020 4.0.5 + # curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-w64-mingw32-20210711-12539--sms-gg-patched.zip + # For GBDK-2020 4.0.6: adds makebin -yN (also seems to trigger AV less) + curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-x86_64-w64-mingw32-20210711-12539--sms-gg-patched_makebin_yN.zip 7z x sdcc.zip - name: Windows Depends MSYS2/MinGW64 diff --git a/gbdk-lib/examples/cross-platform/logo/Makefile b/gbdk-lib/examples/cross-platform/logo/Makefile @@ -7,7 +7,7 @@ PNG2ASSETS = $(GBDK_HOME)bin/png2asset # Set platforms to build here, spaced separated. (These are in the separate Makefile.targets) # They can also be built/cleaned individually: "make gg" and "make gg-clean" # Possible are: gb gbc pocket megaduck sms gg -TARGETS=gb pocket megaduck sms gg +TARGETS=gb gbc pocket megaduck sms gg # Configure platform specific LCC flags here: LCCFLAGS_gb = -Wl-yt0x1B # Set an MBC for banking (1B-ROM+MBC5+RAM+BATT) @@ -23,12 +23,13 @@ LCCFLAGS += -Wl-j -Wm-yoA -Wm-ya4 -autobank -Wb-ext=.rel -Wb-v # MBC + Autobanki # LCCFLAGS += -debug # Uncomment to enable debug output # LCCFLAGS += -v # Uncomment for lcc verbose output -RESFLAGS_nintendo = -map -noflip -bpp 2 -max_palettes 1 -pack_mode gb -RESFLAGS_sega = -map -use_map_attributes -bpp 4 -max_palettes 2 -pack_mode sms +RESFLAGS_DMG = -map -noflip -bpp 2 -max_palettes 1 -pack_mode gb +RESFLAGS_CGB = -map -use_map_attributes -bpp 2 -max_palettes 1 -pack_mode gb +RESFLAGS_SEGA = -map -use_map_attributes -bpp 4 -max_palettes 2 -pack_mode sms RESFLAGS += $(RESFLAGS_$(TYP)) -CFLAGS += -Wf-I$(OBJDIR) +CFLAGS += -Wf-I$(OBJDIR) -DSYSTEM_$(TYP) # You can set the name of the ROM file here PROJECTNAME = logo diff --git a/gbdk-lib/examples/cross-platform/logo/Makefile.targets b/gbdk-lib/examples/cross-platform/logo/Makefile.targets @@ -16,35 +16,35 @@ clean-target: gb-clean: ${MAKE} clean-target EXT=gb gb: - ${MAKE} build-target PORT=gbz80 PLAT=gb EXT=gb TYP=nintendo + ${MAKE} build-target PORT=gbz80 PLAT=gb EXT=gb TYP=DMG gbc-clean: ${MAKE} clean-target EXT=gbc gbc: - ${MAKE} build-target PORT=gbz80 PLAT=gb EXT=gbc TYP=nintendo + ${MAKE} build-target PORT=gbz80 PLAT=gb EXT=gbc TYP=CGB pocket-clean: ${MAKE} clean-target EXT=pocket pocket: - ${MAKE} build-target PORT=gbz80 PLAT=ap EXT=pocket TYP=nintendo + ${MAKE} build-target PORT=gbz80 PLAT=ap EXT=pocket TYP=DMG megaduck-clean: ${MAKE} clean-target EXT=duck megaduck: - ${MAKE} build-target PORT=gbz80 PLAT=duck EXT=duck TYP=nintendo + ${MAKE} build-target PORT=gbz80 PLAT=duck EXT=duck TYP=DMG sms-clean: ${MAKE} clean-target EXT=sms sms: - ${MAKE} build-target PORT=z80 PLAT=sms EXT=sms TYP=sega + ${MAKE} build-target PORT=z80 PLAT=sms EXT=sms TYP=SEGA gg-clean: ${MAKE} clean-target EXT=gg gg: - ${MAKE} build-target PORT=z80 PLAT=gg EXT=gg TYP=sega + ${MAKE} build-target PORT=z80 PLAT=gg EXT=gg TYP=SEGA diff --git a/gbdk-lib/examples/cross-platform/logo/res/nintendo/logo.png b/gbdk-lib/examples/cross-platform/logo/res/CGB/logo.png Binary files differ. diff --git a/gbdk-lib/examples/cross-platform/logo/res/nintendo/logo.png b/gbdk-lib/examples/cross-platform/logo/res/DMG/logo.png Binary files differ. diff --git a/gbdk-lib/examples/cross-platform/logo/res/sega/logo.png b/gbdk-lib/examples/cross-platform/logo/res/SEGA/logo.png Binary files differ. diff --git a/gbdk-lib/examples/cross-platform/logo/src/main.c b/gbdk-lib/examples/cross-platform/logo/src/main.c @@ -4,10 +4,21 @@ void main() { fill_bkg_rect(0,0,DEVICE_SCREEN_WIDTH, DEVICE_SCREEN_HEIGHT, 0); -#if defined(SEGA) +#if defined(SYSTEM_SEGA) set_palette(0, 1, logo_palettes); +#elif defined(SYSTEM_CGB) + if (_cpu == CGB_TYPE) { + set_bkg_palette(0, 1, logo_palettes); + } #endif set_native_tile_data(0, logo_TILE_COUNT, logo_tiles); +#if defined(SYSTEM_CGB) + if (_cpu == CGB_TYPE) { + VBK_REG = 1; + set_tile_map(0, 0, logo_WIDTH >> 3, logo_HEIGHT >> 3, logo_map_attributes); + VBK_REG = 0; + } +#endif set_tile_map(0, 0, logo_WIDTH >> 3, logo_HEIGHT >> 3, logo_map); SHOW_BKG; } diff --git a/gbdk-lib/examples/cross-platform/metasprites/res/sprite.h b/gbdk-lib/examples/cross-platform/metasprites/res/sprite.h @@ -1,23 +0,0 @@ -//AUTOGENERATED FILE FROM png2asset -#ifndef METASPRITE_sprite_H -#define METASPRITE_sprite_H - -#include <stdint.h> -#include <gbdk/platform.h> - -#define sprite_TILE_H 16 -#define sprite_WIDTH 64 -#define sprite_HEIGHT 48 -#define sprite_PIVOT_X 32 -#define sprite_PIVOT_Y 24 -#define sprite_PIVOT_W 64 -#define sprite_PIVOT_H 48 - -BANKREF_EXTERN(sprite) - -extern const uint16_t sprite_palettes[4]; -extern const uint8_t sprite_tiles[960]; - -extern const metasprite_t* const sprite_metasprites[5]; - -#endif - diff --git a/gbdk-lib/examples/cross-platform/rle_map/Makefile.targets b/gbdk-lib/examples/cross-platform/rle_map/Makefile.targets @@ -20,9 +20,9 @@ gb: gbc-clean: - ${MAKE} clean-target EXT=gbc + ${MAKE} clean-target EXT=gbc gbc: - ${MAKE} build-target PORT=gbz80 PLAT=gb EXT=gbc + ${MAKE} build-target PORT=gbz80 PLAT=gb EXT=gbc pocket-clean: diff --git a/gbdk-lib/include/gb/gb.h b/gbdk-lib/include/gb/gb.h @@ -694,7 +694,7 @@ void display_off() __preserves_regs(b, c, d, e, h, l); /** Copies data from shadow OAM to OAM */ -void refresh_OAM(); +void refresh_OAM() __preserves_regs(b, c, d, e, h, l); /** Copies data from somewhere in the lower address space to part of hi-ram. diff --git a/gbdk-lib/include/gb/hardware.h b/gbdk-lib/include/gb/hardware.h @@ -157,6 +157,7 @@ __REG NR52_REG; /**< Sound Master on/off */ #define AUDENA_OFF 0b00000000 __BYTE_REG AUD3WAVE[16]; +__BYTE_REG PCM_SAMPLE[16]; __REG LCDC_REG; /**< LCD control */ #define rLCDC LCDC_REG diff --git a/gbdk-lib/libc/targets/gbz80/ap/crt0.s b/gbdk-lib/libc/targets/gbz80/ap/crt0.s @@ -102,10 +102,9 @@ __standard_VBL_handler:: RET _refresh_OAM:: - LD HL, #((.refresh_OAM_DMA - .start_refresh_OAM) + .refresh_OAM) WAIT_STAT LD A, #>_shadow_OAM - JP (HL) + JP .refresh_OAM + (.refresh_OAM_DMA - .start_refresh_OAM) .clear_WRAM: PUSH DE diff --git a/gbdk-lib/libc/targets/gbz80/ap/sfr.s b/gbdk-lib/libc/targets/gbz80/ap/sfr.s @@ -51,6 +51,7 @@ _NR50_REG = 0xFF24 ; Sound register _NR51_REG = 0xFF25 ; Sound register _NR52_REG = 0xFF26 ; Sound register _PCM_SAMPLE = 0xFF30 ; PCM wave pattern +_AUD3WAVE = 0xFF30 ; PCM wave pattern _LCDC_REG = 0xFF4E ; LCD control _STAT_REG = 0xFF41 ; LCD status _SCY_REG = 0xFF42 ; Scroll Y @@ -90,7 +91,7 @@ _IE_REG = 0xFFFF ; Interrupt enable .globl _NR30_REG, _NR31_REG, _NR32_REG, _NR33_REG, _NR34_REG .globl _NR41_REG, _NR42_REG, _NR43_REG, _NR44_REG .globl _NR50_REG, _NR51_REG, _NR52_REG -.globl _PCM_SAMPLE +.globl _PCM_SAMPLE, _AUD3WAVE .globl _LCDC_REG .globl _STAT_REG .globl _SCY_REG, _SCX_REG diff --git a/gbdk-lib/libc/targets/gbz80/duck/crt0.s b/gbdk-lib/libc/targets/gbz80/duck/crt0.s @@ -103,10 +103,9 @@ __standard_VBL_handler:: RET _refresh_OAM:: - LD HL, #((.refresh_OAM_DMA - .start_refresh_OAM) + .refresh_OAM) WAIT_STAT LD A, #>_shadow_OAM - JP (HL) + JP .refresh_OAM + (.refresh_OAM_DMA - .start_refresh_OAM) .clear_WRAM: PUSH DE diff --git a/gbdk-lib/libc/targets/gbz80/duck/sfr.s b/gbdk-lib/libc/targets/gbz80/duck/sfr.s @@ -63,7 +63,7 @@ _NR50_REG = 0xFF44 ; Sound register _NR52_REG = 0xFF45 ; Sound register _NR51_REG = 0xFF46 ; Sound register _PCM_SAMPLE = 0xFF30 ; PCM wave pattern - +_AUD3WAVE = 0xFF30 ; PCM wave pattern _KEY1_REG = 0xFF4D ; CPU speed _VBK_REG = 0xFF4F ; VRAM bank _HDMA1_REG = 0xFF51 ; DMA control 1 @@ -91,7 +91,7 @@ _IE_REG = 0xFFFF ; Interrupt enable .globl _NR30_REG, _NR31_REG, _NR32_REG, _NR33_REG, _NR34_REG .globl _NR41_REG, _NR42_REG, _NR43_REG, _NR44_REG .globl _NR50_REG, _NR51_REG, _NR52_REG -.globl _PCM_SAMPLE +.globl _PCM_SAMPLE, _AUD3WAVE .globl _LCDC_REG .globl _STAT_REG .globl _SCY_REG, _SCX_REG diff --git a/gbdk-lib/libc/targets/gbz80/gb/crt0.s b/gbdk-lib/libc/targets/gbz80/gb/crt0.s @@ -102,10 +102,9 @@ __standard_VBL_handler:: RET _refresh_OAM:: - LD HL, #((.refresh_OAM_DMA - .start_refresh_OAM) + .refresh_OAM) WAIT_STAT LD A, #>_shadow_OAM - JP (HL) + JP .refresh_OAM + (.refresh_OAM_DMA - .start_refresh_OAM) .clear_WRAM: PUSH DE diff --git a/gbdk-lib/libc/targets/gbz80/gb/sfr.s b/gbdk-lib/libc/targets/gbz80/gb/sfr.s @@ -51,6 +51,7 @@ _NR50_REG = 0xFF24 ; Sound register _NR51_REG = 0xFF25 ; Sound register _NR52_REG = 0xFF26 ; Sound register _PCM_SAMPLE = 0xFF30 ; PCM wave pattern +_AUD3WAVE = 0xFF30 ; PCM wave pattern _LCDC_REG = 0xFF40 ; LCD control _STAT_REG = 0xFF41 ; LCD status _SCY_REG = 0xFF42 ; Scroll Y @@ -90,7 +91,7 @@ _IE_REG = 0xFFFF ; Interrupt enable .globl _NR30_REG, _NR31_REG, _NR32_REG, _NR33_REG, _NR34_REG .globl _NR41_REG, _NR42_REG, _NR43_REG, _NR44_REG .globl _NR50_REG, _NR51_REG, _NR52_REG -.globl _PCM_SAMPLE +.globl _PCM_SAMPLE, _AUD3WAVE .globl _LCDC_REG .globl _STAT_REG .globl _SCY_REG, _SCX_REG diff --git a/gbdk-support/lcc/targets.c b/gbdk-support/lcc/targets.c @@ -45,7 +45,7 @@ CLASS classes[] = { "%bankpack% $1 $2", "%ld_gb% -n -i $1 %libs_include% $3 %crt0dir% $2", "%ihxcheck% $2 $1", - "%mkbin% -Z $1 $2 $3", + "%mkbin% -yN -Z $1 $2 $3", // -yN: Don't paste in the Nintendo logo bytes for gameboy and clones (-Z) llist0_defaults_gb, ARRAY_LEN(llist0_defaults_gb), }, // Analogue Pocket @@ -60,7 +60,7 @@ CLASS classes[] = { "%bankpack% $1 $2", "%ld_gb% -n -i $1 %libs_include% $3 %crt0dir% $2", "%ihxcheck% $2 $1", - "%mkbin% -Z $1 $2 $3", + "%mkbin% -yN -Z $1 $2 $3", // -yN: Don't paste in the Nintendo logo bytes for gameboy and clones (-Z) llist0_defaults_gb, ARRAY_LEN(llist0_defaults_gb), // Use GB linker list defaults }, // Megaduck @@ -75,7 +75,7 @@ CLASS classes[] = { "%bankpack% $1 $2", "%ld_gb% -n -i $1 %libs_include% $3 %crt0dir% $2", "%ihxcheck% $2 $1", - "%mkbin% -Z $1 $2 $3", + "%mkbin% -yN -Z $1 $2 $3", // -yN: Don't paste in the Nintendo logo bytes for gameboy and clones (-Z) llist0_defaults_gb, ARRAY_LEN(llist0_defaults_gb), // Use GB linker list defaults }, diff --git a/gbdk-support/png2asset/png2asset.cpp b/gbdk-support/png2asset/png2asset.cpp @@ -556,7 +556,7 @@ int main(int argc, char *argv[]) SetPal pal = GetPaletteColors(image32, x, y, 8, tile_h); if(pal.size() > pal_size) { - printf("Error: more than %d colors found on (%d, %d, %d, %d)\n", pal_size, x, y, 8, tile_h); + printf("Error: more than %d colors found on (%d, %d, %d, %d)\n", (unsigned int)pal_size, x, y, 8, tile_h); return 1; } @@ -580,7 +580,7 @@ int main(int argc, char *argv[]) //Palette not found, add a new one if(palettes.size() == max_palettes) { - printf("Error: more than %d palettes found\n", max_palettes); + printf("Error: more than %d palettes found\n", (unsigned int)max_palettes); return 1; } @@ -719,11 +719,11 @@ int main(int argc, char *argv[]) fprintf(file, "\n"); if(export_as_map) { - fprintf(file, "extern const unsigned char %s_map[%d];\n", data_name.c_str(), map.size()); + fprintf(file, "extern const unsigned char %s_map[%d];\n", data_name.c_str(), (unsigned int)map.size()); if(use_map_attributes) { if(map_attributes.size()) { - fprintf(file, "extern const unsigned char* %s_map_attributes[%d];\n", data_name.c_str(), (unsigned int)map_attributes.size()); + fprintf(file, "extern const unsigned char %s_map_attributes[%d];\n", data_name.c_str(), (unsigned int)map_attributes.size()); } } else fprintf(file, "extern const unsigned char* %s_tile_pals[%d];\n", data_name.c_str(), (unsigned int)tiles.size()); @@ -868,7 +868,7 @@ int main(int argc, char *argv[]) //Export map fprintf(file, "\n"); - fprintf(file, "const unsigned char %s_map[%d] = {\n", data_name.c_str(), map.size()); + fprintf(file, "const unsigned char %s_map[%d] = {\n", data_name.c_str(), (unsigned int)map.size()); size_t line_size = map.size() / (image.h / 8); for(size_t j = 0; j < image.h / 8; ++ j) { @@ -885,7 +885,7 @@ int main(int argc, char *argv[]) if(use_map_attributes && map_attributes.size()) { fprintf(file, "\n"); - fprintf(file, "const unsigned char %s_map_attributes[%d] = {\n", data_name.c_str(), map_attributes.size()); + fprintf(file, "const unsigned char %s_map_attributes[%d] = {\n", data_name.c_str(), (unsigned int)map_attributes.size()); for(size_t j = 0; j < image.h / 8; ++ j) { fprintf(file, "\t");
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.