LunaCON: expose g_tile[] members of 'tiledata'.

git-svn-id: https://svn.eduke32.com/eduke32@5232 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2015-05-25 12:57:47 +00:00
parent fd94930f14
commit 40f177cafd
4 changed files with 27 additions and 2 deletions

View file

@ -851,7 +851,7 @@ end
local UD = function(memb) return "_gud(_pli)"..memb end local UD = function(memb) return "_gud(_pli)"..memb end
local UDRO = function(memb) return { UD(memb) } end local UDRO = function(memb) return { UD(memb) } end
-- NOTE: Only members that actually encountered in existing mods are added here. -- NOTE: Only members that are actually encountered in existing mods are added here.
-- TODO: r5043, r5044 -- TODO: r5043, r5044
local UserdefLabels = { local UserdefLabels = {
althud = UD".althud", althud = UD".althud",
@ -913,6 +913,22 @@ local InputLabels = {
extbits = INP".extbits", extbits = INP".extbits",
} }
local TileDataLabels = {
-- tilesiz[]
xsize = "g_tile.sizx[%s]",
ysize = "g_tile.sizy[%s]",
-- picanm[]
-- "animframes",
-- "xoffset",
-- "yoffset",
-- "animspeed",
-- "animtype",
-- g_tile[]
gameflags = { "g_tile[%s]._flags" },
}
StructAccessCode = StructAccessCode =
{ {
sector = SectorLabels, sector = SectorLabels,
@ -924,7 +940,8 @@ StructAccessCode =
thisprojectile = SpriteProjectileLabels, thisprojectile = SpriteProjectileLabels,
userdef = UserdefLabels, userdef = UserdefLabels,
input = InputLabels, input = InputLabels,
-- TODO: tiledata, paldata tiledata = TileDataLabels,
-- TODO: tiledata picanm[] members, paldata
} }
-- NOTE: These MUST be in reverse lexicographical order! -- NOTE: These MUST be in reverse lexicographical order!

View file

@ -445,6 +445,12 @@ const int16_t headspritesect[MAXSECTORS+1], headspritestat[MAXSTATUS+1];
const int16_t prevspritesect[MAXSPRITES], prevspritestat[MAXSPRITES]; const int16_t prevspritesect[MAXSPRITES], prevspritestat[MAXSPRITES];
const int16_t nextspritesect[MAXSPRITES], nextspritestat[MAXSPRITES]; const int16_t nextspritesect[MAXSPRITES], nextspritestat[MAXSPRITES];
const vec2_t tilesiz[MAXTILES]; const vec2_t tilesiz[MAXTILES];
typedef struct {
uint8_t num; // animate number
int8_t xofs, yofs;
uint8_t sf; // anim. speed and flags
} picanm_t;
const picanm_t picanm[MAXTILES];
uint8_t show2dsector[(MAXSECTORS+7)>>3]; uint8_t show2dsector[(MAXSECTORS+7)>>3];

View file

@ -47,6 +47,7 @@ prevspritestat;
nextspritesect; nextspritesect;
nextspritestat; nextspritestat;
tilesiz; tilesiz;
picanm;
show2dsector; show2dsector;

View file

@ -47,6 +47,7 @@ prevspritestat;
nextspritesect; nextspritesect;
nextspritestat; nextspritestat;
tilesiz; tilesiz;
picanm;
show2dsector; show2dsector;