mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Lunatic: more Makefile tweaks; spriteext
git-svn-id: https://svn.eduke32.com/eduke32@2148 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8ac88ab4da
commit
775d652d7d
6 changed files with 41 additions and 5 deletions
|
@ -134,6 +134,8 @@ ifneq ($(USE_LIBVPX),0)
|
||||||
GAMEOBJS+= $(OBJ)/animvpx.$o
|
GAMEOBJS+= $(OBJ)/animvpx.$o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
MISCGAMEDEPS=
|
||||||
|
|
||||||
|
|
||||||
## Lunatic devel
|
## Lunatic devel
|
||||||
|
|
||||||
|
@ -164,9 +166,11 @@ ifneq (0,$(LUNATIC))
|
||||||
# But, following _their_ directions does not give us the symbols! wtf?
|
# But, following _their_ directions does not give us the symbols! wtf?
|
||||||
STRIP+= -s $(SRC)/lunatic/dynsymlist_osx
|
STRIP+= -s $(SRC)/lunatic/dynsymlist_osx
|
||||||
|
|
||||||
|
MISCGAMEDEPS+= $(SRC)/lunatic/dynsymlist_osx
|
||||||
MISCLINKOPTS+= -pagezero_size 10000 -image_base 100000000 #-Wl,-alias_list -Wl,$(SRC)/lunatic/aliases_list #-exported_symbols_list $(SRC)/lunatic/dynsymlist_osx
|
MISCLINKOPTS+= -pagezero_size 10000 -image_base 100000000 #-Wl,-alias_list -Wl,$(SRC)/lunatic/aliases_list #-exported_symbols_list $(SRC)/lunatic/dynsymlist_osx
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),WINDOWS)
|
ifeq ($(PLATFORM),WINDOWS)
|
||||||
|
MISCGAMEDEPS+= $(SRC)/lunatic/eduke32.def
|
||||||
MISCLINKOPTS+= $(SRC)/lunatic/eduke32.def
|
MISCLINKOPTS+= $(SRC)/lunatic/eduke32.def
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),LINUX)
|
ifeq ($(PLATFORM),LINUX)
|
||||||
|
@ -272,7 +276,7 @@ all:
|
||||||
notice:
|
notice:
|
||||||
$(BUILD_STARTED)
|
$(BUILD_STARTED)
|
||||||
|
|
||||||
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(ENETDIR)/$(ENETLIB)
|
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(ENETDIR)/$(ENETLIB) $(MISCGAMEDEPS)
|
||||||
$(LINK_STATUS)
|
$(LINK_STATUS)
|
||||||
if $(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STDCPPLIB) $(MISCLINKOPTS); then $(LINK_OK); else $(LINK_FAILED); fi
|
if $(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STDCPPLIB) $(MISCLINKOPTS); then $(LINK_OK); else $(LINK_FAILED); fi
|
||||||
ifeq (1,$(RELEASE))
|
ifeq (1,$(RELEASE))
|
||||||
|
@ -298,7 +302,7 @@ enginelib editorlib:
|
||||||
ifeq ($(PRETTY_OUTPUT),1)
|
ifeq ($(PRETTY_OUTPUT),1)
|
||||||
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(EROOT)\033[0;35m \033[0m\n"
|
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(EROOT)\033[0;35m \033[0m\n"
|
||||||
endif
|
endif
|
||||||
$(MAKE) -C $(EROOT)/ "OBJ=../$(EOBJ)" $@
|
$(MAKE) -C $(EROOT)/ "OBJ=../$(EOBJ)" $@ LUNATIC=$(LUNATIC)
|
||||||
#\
|
#\
|
||||||
DEBUGANYWAY=$(DEBUGANYWAY) KRANDDEBUG=$(KRANDDEBUG)\
|
DEBUGANYWAY=$(DEBUGANYWAY) KRANDDEBUG=$(KRANDDEBUG)\
|
||||||
USE_OPENGL=$(USE_OPENGL) BUILD32_ON_64=$(BUILD32_ON_64) PROFILER=$(PROFILER)\
|
USE_OPENGL=$(USE_OPENGL) BUILD32_ON_64=$(BUILD32_ON_64) PROFILER=$(PROFILER)\
|
||||||
|
|
|
@ -50,6 +50,10 @@ OURCFLAGS=$(BASECFLAGS) -Wno-char-subscripts -I$(INC) $(ARCH)
|
||||||
OURCXXFLAGS=$(BASECXXFLAGS)
|
OURCXXFLAGS=$(BASECXXFLAGS)
|
||||||
ASFLAGS=$(BASEASFLAGS)
|
ASFLAGS=$(BASEASFLAGS)
|
||||||
|
|
||||||
|
ifneq ($(LUNATIC),0)
|
||||||
|
OURCFLAGS+= -DLUNATIC_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
include Makefile.shared
|
include Makefile.shared
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -240,6 +240,11 @@ typedef struct {
|
||||||
uint8_t filler;
|
uint8_t filler;
|
||||||
float alpha;
|
float alpha;
|
||||||
spritetype *tspr;
|
spritetype *tspr;
|
||||||
|
#if defined LUNATIC_ENABLE && UINTPTR_MAX == 0xffffffff
|
||||||
|
/* On a 32-bit build, pad the struct so it has the same size everywhere.
|
||||||
|
* REMINDER: Will break savegames. */
|
||||||
|
void *dummy_;
|
||||||
|
#endif
|
||||||
} spriteext_t;
|
} spriteext_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
local ffi = require("ffi")
|
local ffi = require("ffi")
|
||||||
|
|
||||||
---- sector, wall, sprite ----
|
---- sector, wall, sprite, ... ----
|
||||||
ffi.cdef[[
|
ffi.cdef[[
|
||||||
#pragma pack(push,1)
|
#pragma pack(push,1)
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -39,10 +39,23 @@ typedef struct
|
||||||
uint8_t pal, clipdist, filler;
|
uint8_t pal, clipdist, filler;
|
||||||
uint8_t xrepeat, yrepeat;
|
uint8_t xrepeat, yrepeat;
|
||||||
int8_t xoffset, yoffset;
|
int8_t xoffset, yoffset;
|
||||||
int16_t sectnum, statnum;
|
const int16_t sectnum, statnum;
|
||||||
int16_t ang, owner, xvel, yvel, zvel;
|
int16_t ang, owner, xvel, yvel, zvel;
|
||||||
int16_t lotag, hitag, extra;
|
int16_t lotag, hitag, extra;
|
||||||
} spritetype;
|
} spritetype;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
const uint32_t mdanimtims;
|
||||||
|
const int16_t mdanimcur;
|
||||||
|
int16_t angoff, pitch, roll;
|
||||||
|
int32_t xoff, yoff, zoff;
|
||||||
|
uint8_t flags;
|
||||||
|
uint8_t xpanning, ypanning;
|
||||||
|
const uint8_t filler;
|
||||||
|
float alpha;
|
||||||
|
const int32_t _do_not_use1;
|
||||||
|
const int32_t _do_not_use2;
|
||||||
|
} spriteext_t;
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
@ -50,6 +63,7 @@ ffi.cdef[[
|
||||||
sectortype *sector;
|
sectortype *sector;
|
||||||
walltype *wall;
|
walltype *wall;
|
||||||
spritetype *sprite;
|
spritetype *sprite;
|
||||||
|
spriteext_t *spriteext;
|
||||||
|
|
||||||
const int16_t numsectors, numwalls;
|
const int16_t numsectors, numwalls;
|
||||||
|
|
||||||
|
@ -128,6 +142,7 @@ gv = {
|
||||||
sector = det,
|
sector = det,
|
||||||
wall = det,
|
wall = det,
|
||||||
sprite = det,
|
sprite = det,
|
||||||
|
spriteext = det,
|
||||||
|
|
||||||
headspritesect = det, headspritestat = det,
|
headspritesect = det, headspritestat = det,
|
||||||
prevspritesect = det, prevspritestat = det,
|
prevspritesect = det, prevspritestat = det,
|
||||||
|
@ -185,6 +200,7 @@ local function creategtab(ctab, maxidx, name)
|
||||||
end
|
end
|
||||||
|
|
||||||
sprite = creategtab(ffiC.sprite, 16384, 'sprite[] struct')
|
sprite = creategtab(ffiC.sprite, 16384, 'sprite[] struct')
|
||||||
|
spriteext = creategtab(ffiC.spriteext, 16384, 'spriteext[] struct')
|
||||||
headspritesect = creategtab(ffiC.headspritesect, 16384, 'headspritesect[]')
|
headspritesect = creategtab(ffiC.headspritesect, 16384, 'headspritesect[]')
|
||||||
headspritestat = creategtab(ffiC.headspritestat, 1024, 'headspritestat[]')
|
headspritestat = creategtab(ffiC.headspritestat, 1024, 'headspritestat[]')
|
||||||
nextspritesect = creategtab(ffiC.nextspritesect, 16384, 'nextspritesect[]')
|
nextspritesect = creategtab(ffiC.nextspritesect, 16384, 'nextspritesect[]')
|
||||||
|
@ -232,6 +248,7 @@ G_.gv = gv
|
||||||
G_.sector = sector
|
G_.sector = sector
|
||||||
G_.wall = wall
|
G_.wall = wall
|
||||||
G_.sprite = sprite
|
G_.sprite = sprite
|
||||||
|
G_.spriteext = spriteext
|
||||||
G_.headspritesect = headspritesect
|
G_.headspritesect = headspritesect
|
||||||
G_.headspritestat = headspritestat
|
G_.headspritestat = headspritestat
|
||||||
G_.nextspritesect = nextspritesect
|
G_.nextspritesect = nextspritesect
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
sector;
|
sector;
|
||||||
wall;
|
wall;
|
||||||
sprite;
|
sprite;
|
||||||
|
spriteext;
|
||||||
|
|
||||||
numsectors;
|
numsectors;
|
||||||
numwalls;
|
numwalls;
|
||||||
|
|
|
@ -21,7 +21,12 @@ for i = 0, gv.numsectors/2 do
|
||||||
end
|
end
|
||||||
|
|
||||||
checkfail('gv.sprite[0].yrepeat = 100') -- direct gv array access forbidden
|
checkfail('gv.sprite[0].yrepeat = 100') -- direct gv array access forbidden
|
||||||
print('tweaking some sprites')
|
print('tweaking some sprites 2')
|
||||||
|
i = 562
|
||||||
|
spriteext[i].alpha = 0.5;
|
||||||
|
sprite[i].cstat = bit.bor(sprite[i].cstat, 2+512);
|
||||||
|
spriteext[i].pitch = 128;
|
||||||
|
spriteext[i].roll = 256;
|
||||||
for spr in spritesofsect(307) do -- some fence sprites in E1L1
|
for spr in spritesofsect(307) do -- some fence sprites in E1L1
|
||||||
print('spr', spr)
|
print('spr', spr)
|
||||||
sprite[spr].pal = 6
|
sprite[spr].pal = 6
|
||||||
|
|
Loading…
Reference in a new issue