Add global extension member suport
parent
8ca4833b68
commit
e4e6c07a7a
9
Makefile
9
Makefile
|
@ -1,6 +1,7 @@
|
||||||
## Copyright © 2017 Project Golan, all rights reserved.
|
## Copyright © 2017 Project Golan, all rights reserved.
|
||||||
GDCC_CC=gdcc-cc
|
GDCC_CC=gdcc-cc
|
||||||
GDCC_LD=gdcc-ld
|
GDCC_LD=gdcc-ld
|
||||||
|
GDCC_NTSC=gdcc-ntsc
|
||||||
GDCC_MAKELIB=gdcc-makelib
|
GDCC_MAKELIB=gdcc-makelib
|
||||||
|
|
||||||
CFLAGS += -O2 -g -c
|
CFLAGS += -O2 -g -c
|
||||||
|
@ -59,13 +60,16 @@ MISC_LIBOUTS=$(MISC_SOURCES:$(SRC)/%.c=$(BIN)/%.o)
|
||||||
MAPS_SOURCES=$(wildcard $(MAPSRC)/*.gmf9)
|
MAPS_SOURCES=$(wildcard $(MAPSRC)/*.gmf9)
|
||||||
MAPS_OUTPUTS=$(MAPS_SOURCES:$(MAPSRC)/%.gmf9=$(MAPBIN)/%.gmf0)
|
MAPS_OUTPUTS=$(MAPS_SOURCES:$(MAPSRC)/%.gmf9=$(MAPBIN)/%.gmf0)
|
||||||
|
|
||||||
|
NTSC_SOURCES=$(SRC)/extmem.nts
|
||||||
|
NTSC_BINARYS=$(CODEDEFS)/eikyo-extmem.bin
|
||||||
|
|
||||||
LIBC_OUTPUTS=$(IR)/libc.ir $(IR)/libGDCC.ir
|
LIBC_OUTPUTS=$(IR)/libc.ir $(IR)/libGDCC.ir
|
||||||
LIBC_BINARYS=$(CODEDEFS)/stdlib.bin
|
LIBC_BINARYS=$(CODEDEFS)/stdlib.bin
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
.SECONDARY: $(MISC_LIBOUTS)
|
.SECONDARY: $(MISC_LIBOUTS)
|
||||||
|
|
||||||
all: $(FOLDERS) $(GAME_BINARYS) $(INTR_BINARYS) $(MAIN_BINARYS) $(MFED_BINARYS) $(MISC_BINARYS) $(RNDR_BINARYS) $(LIBC_BINARYS) $(MAPS_OUTPUTS)
|
all: $(FOLDERS) $(GAME_BINARYS) $(INTR_BINARYS) $(MAIN_BINARYS) $(MFED_BINARYS) $(MISC_BINARYS) $(RNDR_BINARYS) $(LIBC_BINARYS) $(MAPS_OUTPUTS) $(NTSC_BINARYS)
|
||||||
|
|
||||||
$(GAME_BINARYS): $(GAME_OUTPUTS)
|
$(GAME_BINARYS): $(GAME_OUTPUTS)
|
||||||
$(GOL5_BINARYS): $(GOL5_OUTPUTS)
|
$(GOL5_BINARYS): $(GOL5_OUTPUTS)
|
||||||
|
@ -95,6 +99,9 @@ $(BIN)/%.o: $(SRC)/%.c $(MISC_HEADERS)
|
||||||
%.bin:
|
%.bin:
|
||||||
$(GDCC_LD) $(GDCC_LFLAGS) -o $@ $^
|
$(GDCC_LD) $(GDCC_LFLAGS) -o $@ $^
|
||||||
|
|
||||||
|
$(NTSC_BINARYS): $(NTSC_SOURCES)
|
||||||
|
$(GDCC_NTSC) -t CODEDEFS -o $@ $^
|
||||||
|
|
||||||
$(IR)/%.ir: $(SRC)/%.c $(GAME_HEADERS) $(INTR_HEADERS) $(MISC_HEADERS) $(RNDR_HEADERS) $(STRH_BINARYS)
|
$(IR)/%.ir: $(SRC)/%.c $(GAME_HEADERS) $(INTR_HEADERS) $(MISC_HEADERS) $(RNDR_HEADERS) $(STRH_BINARYS)
|
||||||
$(GDCC_CC) $(GDCC_CFLAGS) -DM_fileHash=$(shell bin/strh $<) -o $@ $<
|
$(GDCC_CC) $(GDCC_CFLAGS) -DM_fileHash=$(shell bin/strh $<) -o $@ $<
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
extmem Entity subtype 1;
|
|
@ -16,7 +16,7 @@ void G_Entity_Create(G_mfdat *info)
|
||||||
{
|
{
|
||||||
G_entty const *type = G_ObjDef_GetType(info->ent.name);
|
G_entty const *type = G_ObjDef_GetType(info->ent.name);
|
||||||
|
|
||||||
DGE_Entity ent = {DGE_Entity_Create(type ? type->ext : 0)};
|
G_entit ent = {DGE_Entity_Create(type ? type->ext : 0)};
|
||||||
|
|
||||||
ent.x = info->ent.x;
|
ent.x = info->ent.x;
|
||||||
ent.y = info->ent.y;
|
ent.y = info->ent.y;
|
||||||
|
|
|
@ -16,10 +16,18 @@
|
||||||
#define G_Entity_propMem(ofs, t, name) \
|
#define G_Entity_propMem(ofs, t, name) \
|
||||||
G_propMemExt(Entity, ofs, t, name)
|
G_propMemExt(Entity, ofs, t, name)
|
||||||
|
|
||||||
#define G_Entity_props() DGE_EntityProps()
|
#define G_Entity_props() DGE_EntityProps() \
|
||||||
|
G_propMemOfs(DGE_OME(Entity.subtype), int, subtype)
|
||||||
|
|
||||||
// Types ---------------------------------------------------------------------|
|
// Types ---------------------------------------------------------------------|
|
||||||
|
|
||||||
|
enum G_subty
|
||||||
|
{
|
||||||
|
subtype_none,
|
||||||
|
subtype_player,
|
||||||
|
subtype_max,
|
||||||
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
G_Player_ammo,
|
G_Player_ammo,
|
||||||
|
|
Loading…
Reference in New Issue