diff --git a/misc/switch/Makefile b/misc/switch/Makefile index dfa55e094..9d1b3a8c3 100644 --- a/misc/switch/Makefile +++ b/misc/switch/Makefile @@ -90,7 +90,7 @@ export DEPSDIR := $(CURDIR)/$(BUILD) CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) -export LD := $(CC) +export LD := $(CXX) export OFILES_BIN := $(addsuffix .o,$(BINFILES)) export OFILES_SRC := $(CFILES:.c=.o) $(SFILES:.s=.o) diff --git a/src/Graphics_SoftGPU.c b/src/Graphics_SoftGPU.c index 7bb57a776..15fe9013a 100644 --- a/src/Graphics_SoftGPU.c +++ b/src/Graphics_SoftGPU.c @@ -389,13 +389,13 @@ static void DrawTriangle(Vertex* frag1, Vertex* frag2, Vertex* frag3) { BitmapCol tColor = curTexPixels[texIndex]; int a1 = PackedCol_A(color), a2 = BitmapCol_A(tColor); - A = ( a1 * a2 ) / 255; + A = ( a1 * a2 ) >> 8; int r1 = PackedCol_R(color), r2 = BitmapCol_R(tColor); - R = ( r1 * r2 ) / 255; + R = ( r1 * r2 ) >> 8; int g1 = PackedCol_G(color), g2 = BitmapCol_G(tColor); - G = ( g1 * g2 ) / 255; + G = ( g1 * g2 ) >> 8; int b1 = PackedCol_B(color), b2 = BitmapCol_B(tColor); - B = ( b1 * b2 ) / 255; + B = ( b1 * b2 ) >> 8; } else { R = PackedCol_R(color); G = PackedCol_G(color); diff --git a/src/Menus.c b/src/Menus.c index 3880e631c..db79d142a 100644 --- a/src/Menus.c +++ b/src/Menus.c @@ -2898,13 +2898,7 @@ void EnvSettingsScreen_Show(void) { *--------------------------------------------------GraphicsOptionsScreen--------------------------------------------------* *#########################################################################################################################*/ static void GraphicsOptionsScreen_CheckLightingModeAllowed(struct MenuOptionsScreen* s) { - struct Widget** widgets = s->widgets; - cc_bool disabled = Lighting_ModeLockedByServer; - struct ButtonWidget* btn = (struct ButtonWidget*)widgets[4]; - - MenuOptionsScreen_Update(s, btn); - Widget_SetDisabled(widgets[4], disabled); - MenuInputOverlay_CheckStillValid(s); + Widget_SetDisabled(s->widgets[4], Lighting_ModeLockedByServer); } static void GraphicsOptionsScreen_GetViewDist(cc_string* v) { String_AppendInt(v, Game_ViewDistance); } @@ -2916,6 +2910,7 @@ static void GraphicsOptionsScreen_SetSmooth(const cc_string* v) { Builder_ApplyActive(); MapRenderer_Refresh(); } + static void GraphicsOptionsScreen_GetLighting(cc_string* v) { String_AppendConst(v, LightingMode_Names[Lighting_Mode]); } static void GraphicsOptionsScreen_SetLighting(const cc_string* v) { cc_uint8 mode = Utils_ParseEnum(v, 0, LightingMode_Names, LIGHTING_MODE_COUNT);