mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
Merge branch 'unstable' of github.com:sm64ex-coop-dev/sm64ex-coop into unstable
This commit is contained in:
commit
2cf7a87ab4
3 changed files with 25 additions and 15 deletions
30
Makefile
30
Makefile
|
@ -2,9 +2,6 @@
|
|||
|
||||
include util.mk
|
||||
|
||||
# Dynos
|
||||
include dynos.mk
|
||||
|
||||
# Default target
|
||||
default: all
|
||||
|
||||
|
@ -96,10 +93,10 @@ $(eval $(call validate-option,COMPILER,ido gcc))
|
|||
|
||||
ifeq ($(WINDOWS_AUTO_BUILDER),1)
|
||||
export SHELL=sh.exe
|
||||
EXTRA_INCLUDES := ../include/1 ../include/2 ../include/3 ../include/4
|
||||
EXTRA_INCLUDES := -I ../include/1 -I ../include/2 -I ../include/3 -I ../include/4
|
||||
EXTRA_CFLAGS := -Wno-expansion-to-defined
|
||||
|
||||
EXTRA_CPP_INCLUDES := ../include/cpp
|
||||
EXTRA_CPP_INCLUDES := -I ../include/cpp
|
||||
EXTRA_CPP_FLAGS := -Wno-class-conversion -Wno-packed-not-aligned
|
||||
else
|
||||
EXTRA_INCLUDES ?=
|
||||
|
@ -389,12 +386,15 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
|
|||
endif
|
||||
|
||||
# Make tools if out of date
|
||||
$(info Building tools...)
|
||||
#DUMMY != $(MAKE) -s -C $(TOOLS_DIR) $(if $(filter-out ido0,$(COMPILER)$(USE_QEMU_IRIX)),all-except-recomp,) >&2 || echo FAIL
|
||||
DUMMY != $(MAKE) -C $(TOOLS_DIR) >&2 || echo FAIL
|
||||
ifeq ($(DUMMY),FAIL)
|
||||
$(error Failed to build tools)
|
||||
endif
|
||||
ifeq ($(WINDOWS_AUTO_BUILDER),0)
|
||||
$(info Building tools...)
|
||||
#DUMMY != $(MAKE) -s -C $(TOOLS_DIR) $(if $(filter-out ido0,$(COMPILER)$(USE_QEMU_IRIX)),all-except-recomp,) >&2 || echo FAIL
|
||||
DUMMY != $(MAKE) -C $(TOOLS_DIR) >&2 || echo FAIL
|
||||
ifeq ($(DUMMY),FAIL)
|
||||
$(error Failed to build tools)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(info Building Game...)
|
||||
|
||||
endif
|
||||
|
@ -473,6 +473,9 @@ GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
|
|||
# File dependencies and variables for specific files
|
||||
include Makefile.split
|
||||
|
||||
# Dynos
|
||||
include dynos.mk
|
||||
|
||||
# Source code files
|
||||
LEVEL_C_FILES := $(wildcard levels/*/leveldata.c) $(wildcard levels/*/script.c) $(wildcard levels/*/geo.c)
|
||||
C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) $(LEVEL_C_FILES)
|
||||
|
@ -591,7 +594,10 @@ ifeq ($(OSX_BUILD),1)
|
|||
AS := i686-w64-mingw32-as
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILER),gcc)
|
||||
ifeq ($(WINDOWS_AUTO_BUILDER),1)
|
||||
CC := cc
|
||||
CXX := g++
|
||||
else ifeq ($(COMPILER),gcc)
|
||||
CC := $(CROSS)gcc
|
||||
CXX := $(CROSS)g++
|
||||
else ifeq ($(TARGET_WEB),1) # As in, web PC port
|
||||
|
|
|
@ -188,12 +188,16 @@ endef
|
|||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(MAKECMDGOALS),distclean)
|
||||
ifeq ($(WINDOWS_AUTO_BUILDER),1)
|
||||
include $(BUILD_DIR)/level_rules.mk
|
||||
else
|
||||
$(BUILD_DIR)/level_rules.mk: levels/level_rules.mk levels/level_defines.h
|
||||
@$(PRINT) "$(GREEN)Preprocessing level make rules: $(BLUE)$@ $(NO_COL)\n"
|
||||
@$(CPP) $(VERSION_CFLAGS) -I . $(EXTRA_INCLUDES) -o $@ $<
|
||||
$(V)$(CPP) $(VERSION_CFLAGS) -I . $(EXTRA_INCLUDES) -o $@ $<
|
||||
include $(BUILD_DIR)/level_rules.mk
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# --------------------------------------
|
||||
# Extra Level Rules
|
||||
|
|
|
@ -337,8 +337,8 @@ static bool smlua_field_valid(struct LuaObjectField* data, enum LuaObjectType lo
|
|||
size_t length = maximum - minimum;
|
||||
size_t maxlength = sizeof(void*) + sizeof(u32);
|
||||
|
||||
if (length < maxlength) {
|
||||
return (data->lot == lot) && (data->valueOffset == offset) && (lot != LOT_NONE);
|
||||
if (length >= maxlength) {
|
||||
return (data->lot == lot) && (lot != LOT_NONE);
|
||||
}
|
||||
|
||||
return (length >= maxlength);
|
||||
|
|
Loading…
Reference in a new issue