From ca7a5acce7aed21cff22d02f6a6e5dd109673abd Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 13 Dec 2014 22:33:07 +0000 Subject: [PATCH] LunaCON: expose more members, properly handle setting ud.screen_size. BUILD_LUNATIC. git-svn-id: https://svn.eduke32.com/eduke32@4814 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/lunatic/con_lang.lua | 4 +++- polymer/eduke32/source/lunatic/defs.ilua | 8 ++++++-- polymer/eduke32/source/lunatic/doc/lunacon.txt | 2 +- polymer/eduke32/source/lunatic/dynsymlist | 1 + polymer/eduke32/source/lunatic/lunacon.lua | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/source/lunatic/con_lang.lua b/polymer/eduke32/source/lunatic/con_lang.lua index db97049a0..3b8df935a 100644 --- a/polymer/eduke32/source/lunatic/con_lang.lua +++ b/polymer/eduke32/source/lunatic/con_lang.lua @@ -557,7 +557,7 @@ local PlayerLabels = { one_parallax_sectnum = DISABLED{ PL".one_parallax_sectnum" }, random_club_frame = PL".random_club_frame", - one_eighty_count = DISABLED_PL".one_eighty_count", + one_eighty_count = PL".one_eighty_count", dummyplayersprite = DISABLED_PL".dummyplayersprite", extra_extra8 = PL".extra_extra8", @@ -866,12 +866,14 @@ local UserdefLabels = { multimode = { "1" }, noexits = UDRO".noexits", overhead_on = UD".overhead_on", + recstat = UDRO".recstat", runkey_mode = UD".runkey_mode", show_level_text = UD".show_level_text", screen_size = { UD".screen_size", UD":set_screen_size(%%s)" }, screen_tilting = UD".screen_tilting", showallmap = UD".showallmap", showweapons = UDRO".showweapons", + statusbarmode = UDRO".statusbarmode", statusbarscale = UDRO".statusbarscale", volume_number = { UD".volume_number", UD":set_volume_number(%%s)", {0, MAXVOLUMES} }, weaponscale = UDRO".weaponscale", diff --git a/polymer/eduke32/source/lunatic/defs.ilua b/polymer/eduke32/source/lunatic/defs.ilua index 86497b718..0b75e3fc3 100644 --- a/polymer/eduke32/source/lunatic/defs.ilua +++ b/polymer/eduke32/source/lunatic/defs.ilua @@ -712,6 +712,7 @@ vec2_t G_ScreenTextSize(const int32_t font, const int32_t f, int32_t x1, int32_t y1, int32_t x2, int32_t y2); +void G_UpdateScreenArea(void); void G_SaveMapState(void); void G_RestoreMapState(void); ]] @@ -1486,8 +1487,11 @@ ffi.metatype("projectile_t", projectile_mt) local user_defs_mt = { __index = { set_screen_size = function(ud, screen_size) - -- TODO: modify .statusbarmode accordingly - ud.screen_size = screen_size + if (ud.screen_size ~= screen_size) then + -- TODO: modify .statusbarmode accordingly + ud.screen_size = screen_size + ffiC.G_UpdateScreenArea() + end end, set_volume_number = function(ud, volume_number) diff --git a/polymer/eduke32/source/lunatic/doc/lunacon.txt b/polymer/eduke32/source/lunatic/doc/lunacon.txt index e4d6c2f07..ca2113eb1 100644 --- a/polymer/eduke32/source/lunatic/doc/lunacon.txt +++ b/polymer/eduke32/source/lunatic/doc/lunacon.txt @@ -23,7 +23,7 @@ correctness in a broad sense, which encompasses multiple issues. * LunaCON more strictly validates the CON source at translation time. For example, using labels of mismatched type, such as a ++define++d number where - an `move` is expected, issues an translation error. + a `move` is expected, issues an translation error. * Lexically and syntactically, LunaCON accepts only a subset of what the C-CON translator would pass through. This includes rejecting clearly erroneous code diff --git a/polymer/eduke32/source/lunatic/dynsymlist b/polymer/eduke32/source/lunatic/dynsymlist index 8b87ff7fa..1db1f5c40 100644 --- a/polymer/eduke32/source/lunatic/dynsymlist +++ b/polymer/eduke32/source/lunatic/dynsymlist @@ -237,6 +237,7 @@ G_PrintGameText; G_ScreenText; G_ScreenTextSize; +G_UpdateScreenArea; G_SaveMapState; G_RestoreMapState; }; diff --git a/polymer/eduke32/source/lunatic/lunacon.lua b/polymer/eduke32/source/lunatic/lunacon.lua index 3f176bbae..1f5ee04a3 100644 --- a/polymer/eduke32/source/lunatic/lunacon.lua +++ b/polymer/eduke32/source/lunatic/lunacon.lua @@ -979,7 +979,7 @@ function check.reserved_bits(flags, allowedbits, suffix) end end -Define.ALLOWED_VIEWTYPE = truetab { 0, 1, 3,4, 5, 7, 8, -5, -7 } +Define.ALLOWED_VIEWTYPE = truetab { 0, 1, 2, 3,4, 5, 7, 8, -5, -7 } function Define.composite(labeltype, identifier, ...) local oldtype = g_labeltype[identifier]