This commit is contained in:
Lior Halphon 2019-06-22 18:16:55 +03:00
parent f1b578fd2e
commit 970a5f562b
2 changed files with 17 additions and 5 deletions

View File

@ -1,6 +1,10 @@
#include <assert.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdio.h>
#ifdef _WIN32
#include <io.h>
#include <fcntl.h>
#endif
void pair(size_t count, uint8_t byte)
{
@ -35,7 +39,12 @@ int main(int argc, char *argv[])
size_t count = 1;
uint8_t byte = getchar();
int new;
size_t position = 0;
size_t position = 0;
#ifdef _WIN32
_setmode(0,_O_BINARY);
_setmode(1,_O_BINARY);
#endif
while ((new = getchar()) != EOF) {
if (byte == new) {

View File

@ -13,8 +13,11 @@ ifneq ($(findstring MSYS,$(PLATFORM)),)
PLATFORM := windows32
endif
LOGO_COMPRESS := build/logo-compress
ifeq ($(PLATFORM),windows32)
_ := $(shell chcp 65001)
LOGO_COMPRESS := build/logo-compress.exe
endif
ifeq ($(PLATFORM),Darwin)
@ -326,10 +329,10 @@ $(OBJ)/%.1bpp: %.png
-@$(MKDIR) -p $(dir $@)
rgbgfx -d 1 -h -o $@ $<
$(OBJ)/BootROMs/SameBoyLogo.rle: $(OBJ)/BootROMs/SameBoyLogo.1bpp build/logo-compress
./build/logo-compress < $< > $@
$(OBJ)/BootROMs/SameBoyLogo.rle: $(OBJ)/BootROMs/SameBoyLogo.1bpp $(LOGO_COMPRESS)
$(realpath $(LOGO_COMPRESS)) < $< > $@
build/logo-compress: BootROMs/logo-compress.c
$(LOGO_COMPRESS): BootROMs/logo-compress.c
$(CC) $< -o $@
$(BIN)/BootROMs/agb_boot.bin: BootROMs/cgb_boot.asm