Makefile correction/cleanup, force 16 bpp. boots to dos prompt now.

This commit is contained in:
dborth 2009-05-03 17:25:29 +00:00
parent b82d8c6374
commit 3cab57dc64
7 changed files with 36 additions and 96 deletions

View File

@ -26,21 +26,15 @@ INCLUDES := include src/platform/wii
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) \
-DNGC -DNO_SOUND -DUSE_VM -DWORDS_BIGENDIAN \
-DC_CORE -D__ppc__ -D__POWERPC__ -DFINAL_VERSION \
-DSDL -DNO_PNG -DHAVE_ZUTIL_H \
-D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ \
-fomit-frame-pointer -fexceptions \
-Wno-unused-parameter -Wno-strict-aliasing
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \
-DWORDS_BIGENDIAN
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with
#---------------------------------------------------------------------------------
LIBS := -lSDL_mixer -ljpeg -lpng -lz -lSDL -lfreetype \
-lpngu -lmxml -lmetaphrasis -lfat -lz -logc
LIBS := -lSDL -lfat -logc
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
@ -69,9 +63,6 @@ CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
TTFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ttf)))
PNGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.png)))
PCMFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcm)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
@ -83,9 +74,7 @@ else
endif
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(TTFFILES:.ttf=.ttf.o) $(PNGFILES:.png=.png.o) \
$(PCMFILES:.pcm=.pcm.o)
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o)
#---------------------------------------------------------------------------------
# build a list of include paths
@ -93,7 +82,7 @@ export OFILES := $(addsuffix .o,$(BINFILES)) \
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
-I$(LIBOGC_INC) -I$(LIBOGC_INC)/SDL
#---------------------------------------------------------------------------------
# build a list of library paths
@ -123,7 +112,6 @@ run:
reload:
psoload -r $(OUTPUT).dol
#---------------------------------------------------------------------------------
else
@ -135,23 +123,6 @@ DEPENDS := $(OFILES:.o=.d)
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with .ttf and .png extensions
#---------------------------------------------------------------------------------
%.ttf.o : %.ttf
@echo $(notdir $<)
$(bin2o)
%.png.o : %.png
@echo $(notdir $<)
$(bin2o)
%.pcm.o : %.pcm
@echo $(notdir $<)
$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

View File

@ -26,13 +26,8 @@ INCLUDES := include src/platform/wii
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) \
-DNGC -DWORDS_BIGENDIAN \
-DC_CORE -D__ppc__ -D__POWERPC__ -DFINAL_VERSION \
-DSDL -DNO_PNG -DHAVE_ZUTIL_H \
-D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ \
-fomit-frame-pointer -fexceptions \
-Wno-unused-parameter -Wno-strict-aliasing
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) \
-DWORDS_BIGENDIAN
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref
@ -68,10 +63,6 @@ CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
TTFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ttf)))
PNGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.png)))
OGGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ogg)))
PCMFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcm)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
@ -83,9 +74,7 @@ else
endif
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(TTFFILES:.ttf=.ttf.o) $(PNGFILES:.png=.png.o) \
$(OGGFILES:.ogg=.ogg.o) $(PCMFILES:.pcm=.pcm.o)
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o)
#---------------------------------------------------------------------------------
# build a list of include paths
@ -93,7 +82,7 @@ export OFILES := $(addsuffix .o,$(BINFILES)) \
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
-I$(LIBOGC_INC) -I$(LIBOGC_INC)/SDL
#---------------------------------------------------------------------------------
# build a list of library paths
@ -123,7 +112,6 @@ run:
reload:
wiiload -r $(OUTPUT).dol
#---------------------------------------------------------------------------------
else
@ -135,25 +123,6 @@ DEPENDS := $(OFILES:.o=.d)
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with .ttf and .png extensions
#---------------------------------------------------------------------------------
%.ttf.o : %.ttf
@echo $(notdir $<)
$(bin2o)
%.png.o : %.png
@echo $(notdir $<)
$(bin2o)
%.ogg.o : %.ogg
@echo $(notdir $<)
$(bin2o)
%.pcm.o : %.pcm
@echo $(notdir $<)
$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------

View File

@ -173,7 +173,7 @@ ScalerLineBlock_t ScalerCache = {
ScalerSimpleBlock_t ScaleNormal1x = {
"Normal",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
GFX_CAN_16,
1,1,{
{ Normal1x_8_8_L, Normal1x_8_15_L , Normal1x_8_16_L , Normal1x_8_32_L },
{ 0, Normal1x_15_15_L, Normal1x_15_16_L, Normal1x_15_32_L},
@ -190,7 +190,7 @@ ScalerSimpleBlock_t ScaleNormal1x = {
ScalerSimpleBlock_t ScaleNormalDw = {
"Normal",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
GFX_CAN_16,
2,1,{
{ NormalDw_8_8_L, NormalDw_8_15_L , NormalDw_8_16_L , NormalDw_8_32_L },
{ 0, NormalDw_15_15_L, NormalDw_15_16_L, NormalDw_15_32_L},
@ -207,7 +207,7 @@ ScalerSimpleBlock_t ScaleNormalDw = {
ScalerSimpleBlock_t ScaleNormalDh = {
"Normal",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
GFX_CAN_16,
1,2,{
{ NormalDh_8_8_L, NormalDh_8_15_L , NormalDh_8_16_L , NormalDh_8_32_L },
{ 0, NormalDh_15_15_L, NormalDh_15_16_L, NormalDh_15_32_L},
@ -224,7 +224,7 @@ ScalerSimpleBlock_t ScaleNormalDh = {
ScalerSimpleBlock_t ScaleNormal2x = {
"Normal2x",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
GFX_CAN_16,
2,2,{
{ Normal2x_8_8_L, Normal2x_8_15_L, Normal2x_8_16_L, Normal2x_8_32_L },
{ 0, Normal2x_15_15_L, Normal2x_15_16_L, Normal2x_15_32_L},
@ -241,7 +241,7 @@ ScalerSimpleBlock_t ScaleNormal2x = {
ScalerSimpleBlock_t ScaleNormal3x = {
"Normal3x",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
GFX_CAN_16,
3,3,{
{ Normal3x_8_8_L, Normal3x_8_15_L , Normal3x_8_16_L , Normal3x_8_32_L },
{ 0, Normal3x_15_15_L, Normal3x_15_16_L, Normal3x_15_32_L},
@ -259,7 +259,7 @@ ScalerSimpleBlock_t ScaleNormal3x = {
#if RENDER_USE_ADVANCED_SCALERS>0
ScalerSimpleBlock_t ScaleTV2x = {
"TV2x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
2,2,{
{ 0, TV2x_8_15_L , TV2x_8_16_L , TV2x_8_32_L },
{ 0, TV2x_15_15_L, TV2x_15_16_L, TV2x_15_32_L},
@ -276,7 +276,7 @@ ScalerSimpleBlock_t ScaleTV2x = {
ScalerSimpleBlock_t ScaleTV3x = {
"TV3x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
3,3,{
{ 0, TV3x_8_15_L , TV3x_8_16_L , TV3x_8_32_L },
{ 0, TV3x_15_15_L, TV3x_15_16_L, TV3x_15_32_L},
@ -293,7 +293,7 @@ ScalerSimpleBlock_t ScaleTV3x = {
ScalerSimpleBlock_t ScaleScan2x = {
"Scan2x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
2,2,{
{ 0, Scan2x_8_15_L , Scan2x_8_16_L , Scan2x_8_32_L },
{ 0, Scan2x_15_15_L, Scan2x_15_16_L, Scan2x_15_32_L},
@ -310,7 +310,7 @@ ScalerSimpleBlock_t ScaleScan2x = {
ScalerSimpleBlock_t ScaleScan3x = {
"Scan3x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
3,3,{
{ 0, Scan3x_8_15_L , Scan3x_8_16_L , Scan3x_8_32_L },
{ 0, Scan3x_15_15_L, Scan3x_15_16_L, Scan3x_15_32_L},
@ -327,7 +327,7 @@ ScalerSimpleBlock_t ScaleScan3x = {
ScalerSimpleBlock_t ScaleRGB2x = {
"RGB2x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
2,2,{
{ 0, RGB2x_8_15_L , RGB2x_8_16_L , RGB2x_8_32_L },
{ 0, RGB2x_15_15_L, RGB2x_15_16_L, RGB2x_15_32_L},
@ -344,7 +344,7 @@ ScalerSimpleBlock_t ScaleRGB2x = {
ScalerSimpleBlock_t ScaleRGB3x = {
"RGB3x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
3,3,{
{ 0, RGB3x_8_15_L , RGB3x_8_16_L , RGB3x_8_32_L },
{ 0, RGB3x_15_15_L, RGB3x_15_16_L, RGB3x_15_32_L},
@ -366,7 +366,7 @@ ScalerSimpleBlock_t ScaleRGB3x = {
#if RENDER_USE_ADVANCED_SCALERS>2
ScalerComplexBlock_t ScaleAdvMame2x ={
"AdvMame2x",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
GFX_CAN_16,
2,2,
{ AdvMame2x_8_L,AdvMame2x_16_L,AdvMame2x_16_L,AdvMame2x_32_L},
{ AdvMame2x_8_R,AdvMame2x_16_R,AdvMame2x_16_R,AdvMame2x_32_R}
@ -374,7 +374,7 @@ ScalerComplexBlock_t ScaleAdvMame2x ={
ScalerComplexBlock_t ScaleAdvMame3x = {
"AdvMame3x",
GFX_CAN_8|GFX_CAN_15|GFX_CAN_16|GFX_CAN_32,
GFX_CAN_16,
3,3,
{ AdvMame3x_8_L,AdvMame3x_16_L,AdvMame3x_16_L,AdvMame3x_32_L},
{ AdvMame3x_8_R,AdvMame3x_16_R,AdvMame3x_16_R,AdvMame3x_32_R}
@ -383,7 +383,7 @@ ScalerComplexBlock_t ScaleAdvMame3x = {
/* These need specific 15bpp versions */
ScalerComplexBlock_t ScaleHQ2x ={
"HQ2x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
2,2,
{ 0,HQ2x_16_L,HQ2x_16_L,HQ2x_32_L},
{ 0,HQ2x_16_R,HQ2x_16_R,HQ2x_32_R}
@ -391,7 +391,7 @@ ScalerComplexBlock_t ScaleHQ2x ={
ScalerComplexBlock_t ScaleHQ3x ={
"HQ3x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
3,3,
{ 0,HQ3x_16_L,HQ3x_16_L,HQ3x_32_L},
{ 0,HQ3x_16_R,HQ3x_16_R,HQ3x_32_R}
@ -399,7 +399,7 @@ ScalerComplexBlock_t ScaleHQ3x ={
ScalerComplexBlock_t ScaleSuper2xSaI ={
"Super2xSaI",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
2,2,
{ 0,Super2xSaI_16_L,Super2xSaI_16_L,Super2xSaI_32_L},
{ 0,Super2xSaI_16_R,Super2xSaI_16_R,Super2xSaI_32_R}
@ -407,7 +407,7 @@ ScalerComplexBlock_t ScaleSuper2xSaI ={
ScalerComplexBlock_t Scale2xSaI ={
"2xSaI",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
2,2,
{ 0,_2xSaI_16_L,_2xSaI_16_L,_2xSaI_32_L},
{ 0,_2xSaI_16_R,_2xSaI_16_R,_2xSaI_32_R}
@ -415,7 +415,7 @@ ScalerComplexBlock_t Scale2xSaI ={
ScalerComplexBlock_t ScaleSuperEagle ={
"SuperEagle",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
2,2,
{ 0,SuperEagle_16_L,SuperEagle_16_L,SuperEagle_32_L},
{ 0,SuperEagle_16_R,SuperEagle_16_R,SuperEagle_32_R}
@ -423,7 +423,7 @@ ScalerComplexBlock_t ScaleSuperEagle ={
ScalerComplexBlock_t ScaleAdvInterp2x = {
"AdvInterp2x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
2,2,
{ 0,AdvInterp2x_15_L,AdvInterp2x_16_L,AdvInterp2x_32_L},
{ 0,AdvInterp2x_15_R,AdvInterp2x_16_R,AdvInterp2x_32_R}
@ -431,7 +431,7 @@ ScalerComplexBlock_t ScaleAdvInterp2x = {
ScalerComplexBlock_t ScaleAdvInterp3x = {
"AdvInterp3x",
GFX_CAN_15|GFX_CAN_16|GFX_CAN_32|GFX_RGBONLY,
GFX_CAN_16,
3,3,
{ 0,AdvInterp3x_15_L,AdvInterp3x_16_L,AdvInterp3x_32_L},
{ 0,AdvInterp3x_15_R,AdvInterp3x_16_R,AdvInterp3x_32_R}

View File

@ -111,7 +111,7 @@ static GUI::ScreenSDL *UI_Startup(GUI::ScreenSDL *screen) {
old_unicode = SDL_EnableUNICODE(1);
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,SDL_DEFAULT_REPEAT_INTERVAL);
screenshot = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, GUI::Color::RedMask, GUI::Color::GreenMask, GUI::Color::BlueMask, 0);
screenshot = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 16, GUI::Color::RedMask, GUI::Color::GreenMask, GUI::Color::BlueMask, 0);
// create screenshot for fade effect
int rs = screenshot->format->Rshift, gs = screenshot->format->Gshift, bs = screenshot->format->Bshift, am = GUI::Color::AlphaMask;
@ -124,7 +124,7 @@ static GUI::ScreenSDL *UI_Startup(GUI::ScreenSDL *screen) {
}
}
background = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, GUI::Color::RedMask, GUI::Color::GreenMask, GUI::Color::BlueMask, GUI::Color::AlphaMask);
background = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 16, GUI::Color::RedMask, GUI::Color::GreenMask, GUI::Color::BlueMask, GUI::Color::AlphaMask);
// use a blurred and sepia-toned screenshot as menu background
for (int y = 0; y < h; y++) {
Bit32u *bg = (Bit32u*)(y*background->pitch + (char*)background->pixels);
@ -151,7 +151,7 @@ static GUI::ScreenSDL *UI_Startup(GUI::ScreenSDL *screen) {
mousetoggle = mouselocked;
if (mouselocked) GFX_CaptureMouse();
SDL_Surface* sdlscreen = SDL_SetVideoMode(w, h, 32, SDL_SWSURFACE|(fs?SDL_FULLSCREEN:0));
SDL_Surface* sdlscreen = SDL_SetVideoMode(w, h, 16, SDL_SWSURFACE|(fs?SDL_FULLSCREEN:0));
if (sdlscreen == NULL) E_Exit("Could not initialize video mode %ix%ix32 for UI: %s", w, h, SDL_GetError());
// fade out

View File

@ -2283,7 +2283,7 @@ void MAPPER_Run(bool pressed) {
/* Be sure that there is no update in progress */
GFX_EndUpdate( 0 );
mapper.surface=SDL_SetVideoMode(640,480,8,0);
mapper.surface=SDL_SetVideoMode(640,480,16,0);
if (mapper.surface == NULL) E_Exit("Could not initialize video mode for mapper: %s",SDL_GetError());
/* Set some palette entries */

View File

@ -980,9 +980,9 @@ static void GUI_StartUp(Section * sec) {
/* Set Icon (must be done before any sdl_setvideomode call) */
/* But don't set it on OS X, as we use a nicer external icon there. */
#if WORDS_BIGENDIAN
SDL_Surface* logos= SDL_CreateRGBSurfaceFrom((void*)logo,32,32,32,128,0xff000000,0x00ff0000,0x0000ff00,0);
SDL_Surface* logos= SDL_CreateRGBSurfaceFrom((void*)logo,32,32,16,128,0xff000000,0x00ff0000,0x0000ff00,0);
#else
SDL_Surface* logos= SDL_CreateRGBSurfaceFrom((void*)logo,32,32,32,128,0x000000ff,0x0000ff00,0x00ff0000,0);
SDL_Surface* logos= SDL_CreateRGBSurfaceFrom((void*)logo,32,32,16,128,0x000000ff,0x0000ff00,0x00ff0000,0);
#endif
SDL_WM_SetIcon(logos,NULL);
#endif

View File

@ -1566,7 +1566,7 @@ int main(int argc, char *argv[])
atexit(SDL_Quit);
screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE);
screen = SDL_SetVideoMode(640, 480, 16, SDL_SWSURFACE);
if (screen == NULL) {
fprintf(stderr, "Couldn't set 640x480x32 video mode: %s\n", SDL_GetError());
exit(1);