diff --git a/gba/cartest/Makefile b/gba/cartest/Makefile index b6ceaee..297d799 100644 --- a/gba/cartest/Makefile +++ b/gba/cartest/Makefile @@ -27,11 +27,12 @@ ARCH := -mthumb -mthumb-interwork CFLAGS := -g -Wall -O0\ -mcpu=arm7tdmi -mtune=arm7tdmi\ - -fomit-frame-pointer\ + -fomit-frame-pointer\ -ffast-math \ $(ARCH) CFLAGS += $(INCLUDE) +CXXFLAGS := $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS := $(ARCH) LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $@).map diff --git a/gba/cartest/src/cartest.c b/gba/cartest/src/cartest.cpp similarity index 94% rename from gba/cartest/src/cartest.c rename to gba/cartest/src/cartest.cpp index 88fdfdb..8823845 100644 --- a/gba/cartest/src/cartest.c +++ b/gba/cartest/src/cartest.cpp @@ -72,22 +72,22 @@ int main(void) REG_IME = 1; // screen mode, background and objects to display - SetMode( MODE_4 | BG2_ON | OBJ_ON | OBJ_1D_MAP ); + SetMode((LCDC_BITS)(MODE_4 | BG2_ON | OBJ_ON | OBJ_1D_MAP )); u32 white = 0x10101010; CpuFastSet(&white, (void*)VRAM, FILL | 240*160/4); - FadeToPalette((void*)car_pal_bin, 1); + FadeToPalette((const u16*)car_pal_bin, 1); - void* free_space = BITMAP_OBJ_BASE_ADR; - CpuFastSet(car_bin, free_space, COPY32 | car_bin_size/4); + u32 free_space = (u32)BITMAP_OBJ_BASE_ADR; + CpuFastSet(car_bin, (void*)free_space, COPY32 | car_bin_size/4); free_space += car_bin_size; - CpuFastSet(car_blue_bin, free_space, COPY32 | car_bin_size/4); + CpuFastSet(car_blue_bin, (void*)free_space, COPY32 | car_bin_size/4); free_space += car_blue_bin_size; CpuFastSet(car_pal_bin, OBJ_COLORS, COPY32 | car_pal_bin_size/4); // load smoke - CpuFastSet(smoke_bin, free_space, COPY32 | smoke_bin_size/4); + CpuFastSet(smoke_bin, (void*)free_space, COPY32 | smoke_bin_size/4); free_space += smoke_bin_size; red_car->attr2 = OBJ_CHAR(512);