The lighting animations are defined in the newanims.s code as a set of 7 varying length word-aligned tables, one for each defined lighting styles, with values defining the instantaneous brightness. These tables are each terminated with a magic value (there is no table for animation 0 which is the value for static brightness).
There is a separate pointer table, also with 7 entries, followed immediately in memory by a second pointer table for the start frames of each table, pointing at the same set of data as the first table.
Level editing documentation says there are 16 lighting animations all together with 8-15 undefined. However, LevelEd does allow those values to be used for point brightness animation. Depending on which pointer table is used, values 8-15 may result in arbitrary memory being interpreted as the start frame pointer. This may explain the occasional observation of random lighting where entire areas light up or go dark in some levels, only to reset some frames later.
If confirmed (need to create a test level), I think the tables should be extended, perhaps with some new animations or just setting the additional pointers to wrap through the same set again, which they do by coincidence for the next 7 as there is a set of additional "start frame" pointers to the same brightness tables.
As a stretch goal, the ability to load these animations from a file would be ideal for modding purposes.
The lighting animations are defined in the newanims.s code as a set of 7 varying length word-aligned tables, one for each defined lighting styles, with values defining the instantaneous brightness. These tables are each terminated with a magic value (there is no table for animation 0 which is the value for static brightness).
There is a separate pointer table, also with 7 entries, followed immediately in memory by a second pointer table for the start frames of each table, pointing at the same set of data as the first table.
Level editing documentation says there are 16 lighting animations all together with 8-15 undefined. However, LevelEd does allow those values to be used for point brightness animation. Depending on which pointer table is used, values 8-15 may result in arbitrary memory being interpreted as the start frame pointer. This may explain the occasional observation of random lighting where entire areas light up or go dark in some levels, only to reset some frames later.
If confirmed (need to create a test level), I think the tables should be extended, perhaps with some new animations or just setting the additional pointers to wrap through the same set again, which they do by coincidence for the next 7 as there is a set of additional "start frame" pointers to the same brightness tables.
As a stretch goal, the ability to load these animations from a file would be ideal for modding purposes.