Converted car code to C++.. when rather changed compiler, about to change the code to match.

This commit is contained in:
Truls Alexander Tangstad 2005-12-05 19:08:23 +00:00
parent 7a870c4ade
commit f7519ad939
2 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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);