Fix #183
This commit is contained in:
parent
f1b578fd2e
commit
970a5f562b
@ -1,6 +1,10 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <inttypes.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)
|
void pair(size_t count, uint8_t byte)
|
||||||
{
|
{
|
||||||
@ -37,6 +41,11 @@ int main(int argc, char *argv[])
|
|||||||
int new;
|
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) {
|
while ((new = getchar()) != EOF) {
|
||||||
if (byte == new) {
|
if (byte == new) {
|
||||||
count++;
|
count++;
|
||||||
|
9
Makefile
9
Makefile
@ -13,8 +13,11 @@ ifneq ($(findstring MSYS,$(PLATFORM)),)
|
|||||||
PLATFORM := windows32
|
PLATFORM := windows32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LOGO_COMPRESS := build/logo-compress
|
||||||
|
|
||||||
ifeq ($(PLATFORM),windows32)
|
ifeq ($(PLATFORM),windows32)
|
||||||
_ := $(shell chcp 65001)
|
_ := $(shell chcp 65001)
|
||||||
|
LOGO_COMPRESS := build/logo-compress.exe
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),Darwin)
|
ifeq ($(PLATFORM),Darwin)
|
||||||
@ -326,10 +329,10 @@ $(OBJ)/%.1bpp: %.png
|
|||||||
-@$(MKDIR) -p $(dir $@)
|
-@$(MKDIR) -p $(dir $@)
|
||||||
rgbgfx -d 1 -h -o $@ $<
|
rgbgfx -d 1 -h -o $@ $<
|
||||||
|
|
||||||
$(OBJ)/BootROMs/SameBoyLogo.rle: $(OBJ)/BootROMs/SameBoyLogo.1bpp build/logo-compress
|
$(OBJ)/BootROMs/SameBoyLogo.rle: $(OBJ)/BootROMs/SameBoyLogo.1bpp $(LOGO_COMPRESS)
|
||||||
./build/logo-compress < $< > $@
|
$(realpath $(LOGO_COMPRESS)) < $< > $@
|
||||||
|
|
||||||
build/logo-compress: BootROMs/logo-compress.c
|
$(LOGO_COMPRESS): BootROMs/logo-compress.c
|
||||||
$(CC) $< -o $@
|
$(CC) $< -o $@
|
||||||
|
|
||||||
$(BIN)/BootROMs/agb_boot.bin: BootROMs/cgb_boot.asm
|
$(BIN)/BootROMs/agb_boot.bin: BootROMs/cgb_boot.asm
|
||||||
|
Loading…
Reference in New Issue
Block a user