Commit graph

2435 commits

Author SHA1 Message Date
toasterbabe
837291c013 Woops, need to ensure functional equivalence to what came before. 2017-03-31 17:08:46 +01:00
toasterbabe
d5ba29eb9b Get plane scrolling effects working the same on and off slopes in both renderers again. 2017-03-31 16:45:47 +01:00
toasterbabe
79ec8fbf29 Minor refactor. 2017-03-31 16:29:50 +01:00
toasterbabe
b924a7d902 Interesting consideration: flat angle wasn't used to determine seperate visplanes. This is obviously incorrect behaviour. Enabling this restriction makes flat alignment on slopes ALMOST work identically to normal, but not quite.
Also, made the fudge a const, since it may as well be one.
2017-03-30 23:56:14 +01:00
toasterbabe
d62a628346 Consistency between software off-slope and GL on+off-slope flat alignment! (Software slopes are now MORE broken with respect to this, but that comes later.) 2017-03-30 22:48:13 +01:00
Monster Iestyn
80195b033e Merge branch 'levelemblems' into 'master'
Level completion emblems

Simple port of something I made for a 2.1 exe mod that Mystic mentioned needed doing on the 2.2 Priorities topic (http://mb.srb2.org/showpost.php?p=790613&postcount=4). Adds emblem type "map", which gives you an emblem upon beating the map it's for.

Var sets specific condition flags on top of normal completion; 1 or ME_ALLEMERALDS for all Chaos Emeralds, 2 or ME_ULTIMATE for Ultimate mode, and 4 or ME_PERFECT for Perfect Bonus. These can be combined with each other, but they do not all need to be done in one shot; an Ultimate + Perfect emblem isn't impossible as they can be done in separate runs. (This can easily be toned back down to a single choice/removed entirely if requested; these were added simply because it was easy to implement for modders.)

Criticism on the way it's coded and/or how it is implemented is highly encouraged. Test wad is <root>/TehRealSalt/levelemblems.wad, pre-compiled exe is <root>/TehRealSalt/levelemblems.exe.

See merge request !74
2017-03-28 16:31:16 -04:00
Monster Iestyn
d7b4b05d9a Fix remaining mixed-declaration-and-code issue detected when compiling 2017-03-28 21:30:31 +01:00
TehRealSalt
965846b0da More consistency
As per MI's request
2017-03-23 01:17:31 -04:00
TehRealSalt
92e785a9f2 Map emblem type flags
As per toaster's request
2017-03-22 14:45:26 -04:00
TehRealSalt
b418ac0acb Level completion emblems
Simple port of something I made for a 2.1 exe mod that Mystic mentioned
needed doing on the 2.2 Priorities topic
(http://mb.srb2.org/showpost.php?p=790613&postcount=4). Adds emblem type
"map", which gives you an emblem upon beating the map it's for. Var sets
more specific conditions; 1 for all emeralds completion, 2 for Ultimate
mode completion, 3 for Perfect Bonus completion. (These can be easily
removed if requested; these were added simply because it was easy to
implement for modders.)

Criticism on the way it's coded and/or how it is implemented is highly
encouraged. Test wad is <root>/TehRealSalt/levelemblems.wad,
pre-compiled exe is <root>/TehRealSalt/levelemblems.exe.
2017-03-22 12:59:16 -04:00
Monster Iestyn
a979b425e0 Merge branch 'TEXTURES_More' into 'master'
Transparent patch support in TEXTURES

Adds transparent patch functionality for the TEXTURES format.
Duplicates source-to-cache column drawer functions and adds extra functionality which uses trans tables.
Changes how the column drawer is picked so it's done once per patch instead of per column.

See merge request !72
2017-03-19 16:17:31 -04:00
Monster Iestyn
5877cc40d9 You actually don't need to set ColumnDrawerPointer to &R_DrawColumnInCache etc, C allows you to set it directly to R_DrawColumnInCache etc. ColumnDrawerPointer can then be called without the (* ) stuff 2017-03-19 20:08:33 +00:00
Monster Iestyn
351a391e43 Fixed errors reported while compiling 2017-03-19 19:43:02 +00:00
Monster Iestyn
2d878ff7f2 Merge branch 'everyone-gets-a-hud' into 'master'
Whitelist HUD graphic changes from isgamemodified

Some people like the italics, some don't, some are crazy and want to do their own thing. In any case changing HUD graphics doesn't do any harm to anyone.

This allows changing the following replacements to work without tripping isgamemodified:

* The Score/Time/Rings text and numbers, colon, period, and minus sign
* The console font
* The "tiny" console font used in a couple places
* The level title font

I also removed some stupid redundant code related to the above in the process, and renamed some of the patches related to score/time/rings because they had inconsistent prefixes.

See merge request !73
2017-03-19 14:55:53 -04:00
Inuyasha
0e9761bc57 HUD changes don't trip isgamemodified
(some HUD patches renamed because they're dumb)
2017-03-19 05:37:04 -07:00
Nevur
191623e246 Made tweaks suggested by toaster to make the code a bit less dumb. 2017-03-15 15:46:04 +01:00
Monster Iestyn
7a37794316 Merge branch 'crumble-FOF' into 'master'
Crumble fof

Basic (but kind of WIPish still) support for remote falling of FOFs by linedef execs or Lua. Originally started for Nev3r to use his dark magic on.

Making this MR so people actually remember I was doing something regarding crumbling FOFs, it's been months since I did stuff for this now mind...

* linedef type 446: basic setup is same as the remote shatter one (436), except the FOF of course falls down rather than shatters. By default the FOF respawns
 * *No Climb*: the FOF *doesn't* respawn
 * *Block Enemies*: respawning ability is determined by the FOF's flags (if it has FF_NORETURN it doesn't return, if it doesn't it does return)
 * *Block Enemies + No Climb*: inverted version of above
* EV_StartCrumble for lua, format: `EV_StartCrumble(controlsec, rover, [floating?, [player, [origalpha, [crumblereturn?]]]])`
 * *controlsec* is the FOF's control sector
 * *rover* is the FOF itself
 * (optional) *floating?* does the FOF float on water after crumbling? Defaults to false (NOTE: probably should be set to `rover.flags & FF_FLOATBOB` for best results currently, kind of weird otherwise)
 * (optional) *player* is the player that caused the FOF to fall; needed for some effects such as who to award points to if you killed someone =3 Defaults to nil
 * (optional) *origalpha* is the FOF's original alpha before crumbling (the thinker for respawning + floating crumbling FOFs tinkers with the alpha for some reason). Defaults to rover.alpha
 * (optional) *crumblereturn?* will the FOF respawn afterwards? Defaults to false (NOTE: probably should be set to `not (rover.flags & FF_NORETURN)` for best results currently, kind of weird otherwise)
 * the return value of EV_StartCrumble means something I forget offhand now ...it's either true or false though, mind

See MonsterIestyn/crumble-fof on the FTP for a test exe (srb2win-crumblefof.exe), a test map for the linedef, and a test lua script for EV_StartCrumble (which can also be tested in the map).

See merge request !55
2017-03-13 14:30:44 -04:00
Monster Iestyn
386fec037f Merge branch 'lua-more-stuff' into 'master'
Lua more stuff

More new Lua features and fixes:
* Most Lua functions that deal with stuff that exists only in levels now should spout Lua errors instead of crashing the game if you try to use them outside of levels. Likewise, accessing any of the tables that contain level-only stuff (players, sectors, lines, etc etc) spouts Lua errors too outside of levels.
* `userdataType(variable)` now exists: this function simply returns the type of the userdata variable given as a string (e.g. `userdataType(players[0])` returns "player_t", `userdataType(sectors[0])` returns "sector_t"). This also includes "minor" userdata types for array members of other userdata types, such as .powers of player_t variables or .lines of sector_t variables (which would give the strings "player_t.powers" and "sector_t.lines" respectively).
* The Lua hook "MobjMoveBlocked" now exists: functions for this hook are called whenever a mobj attempts to move horizontally but is blocked by a wall or solid mobj (or whatever else can cause P_TryMove to return false, assuming it doesn't remove the mobj). In theory this hook could be very useful for behaviour such as sliding or bouncing off walls without the need of flags like MF_SLIDEME or MF_BOUNCE etc. Format for use is just like most generic mobj hooks: `addHook("MobjMoveBlocked", functionname, MT_OBJECTTYPE)`, where `functionname` is a function that takes a single mobj_t argument.

See MonsterIestyn/lua-more-stuff on the FTP for a test exe (srb2win-lua-more-stuff.exe) and some test scripts for the above changes.

See merge request !67
2017-03-13 14:29:35 -04:00
Monster Iestyn
731ee115a3 Merge branch 'public_next' 2017-03-13 18:25:26 +00:00
Monster Iestyn
f40e1dc069 Merge branch 'next' into public_next 2017-03-13 18:24:50 +00:00
Alam Ed Arias
cb98c2d972 Merge branch 'master' into next 2017-03-12 21:34:19 -04:00
Alam Ed Arias
538eac7a47 appveyor: disable command output 2017-03-12 21:17:07 -04:00
Alam Ed Arias
4e8972cd24 build: no warning or error about logical-ip or tautological-compare 2017-03-12 21:16:37 -04:00
Alam Ed Arias
9cac1e9e62 build: fixup WFALGS/WFLAGS mistake 2017-03-12 21:09:06 -04:00
Alam Ed Arias
6bb7a636dc appveyor: output commands passed to GCCwq 2017-03-12 21:02:05 -04:00
Alam Ed Arias
81fe46213d build: do not overwrite the -Wno-error switchs 2017-03-12 20:51:45 -04:00
Alam Ed Arias
42ecca817d build: disable tautological-compare and logical-op 2017-03-12 20:43:35 -04:00
Alam Ed Arias
b01d5da60f build: fixup GCC54 endif 2017-03-12 20:23:30 -04:00
Alam Ed Arias
e0b2a4a779 build: add suport for GCC 6.3 2017-03-12 17:45:18 -04:00
Alam Ed Arias
b22417bcfa appveyor: buildbot now using GCC 6.3, not 5.3 2017-03-12 17:26:37 -04:00
Alam Ed Arias
2823c7bffb build: fixup warnings from GCC 6.2.1 2017-03-12 17:23:56 -04:00
Nevur
be9ca534d7 Whitespace indenting. 2017-03-12 20:26:45 +01:00
Nevur
144514247d Added exceptions to the transparent column drawers to avoid modifying pixels with the cyan color. 2017-03-12 20:02:29 +01:00
Monster Iestyn
4f80bd82a5 Merge branch 'metal_unsuck' into 'master'
Making Metal's pinch cues suck less

Does what it says on the tin. Give it a shot with <root>/toaster/metaltest.wad to skip the race and go directly to the boss to see what it does!

See merge request !70
2017-03-10 14:20:36 -05:00
Nevur
13dbe7d3a3 Fixed issue with vertical offsets being broken.
Add a vertical flip variant for the translucent column drawer.
Translucency is now properly distributed: 0.00 leads to no render at all, 0.1 to TRANS10, ..., 0.9 to TRANS90, 1 to regular column drawer.
2017-03-05 18:53:34 +01:00
Nevur
829be5bd43 Changed how R_GenerateTexture picks the function to draw the columns so it checks once per patch.
Also had to set the same args for all of the three current column drawer functions.
2017-03-05 12:49:09 +01:00
Nevur
bf5a10e4b7 The translucency feature is now functional, but it doesn't exactly work as expected. Need to make it behave like FOF translucencies etc., I guess. 2017-03-05 00:29:10 +01:00
Nevur
bb49362577 Add rudimentary and non-working code for translucency on patches. 2017-03-04 20:59:43 +01:00
Monster Iestyn
0f014fe20a Merge branch 'master' into next 2017-03-04 17:16:33 +00:00
Monster Iestyn
5019077f82 Merge branch 'precip-overflow-fix' into 'master'
Precipitation sprite overflow fix

This fixes artifacts of rain/snow sprites appearing on-screen in levels that have rain/snow, if said sprites were high enough above the camera. This kind of thing was previously fixed for sprites of regular objects (and textures of FOFs?), but apparently the fix wasn't applied to sprites for precipitation as it turns out.

I found this most easily reproducable in SRB2TD's Stormy Streets level, because some of the invisible FOFs make raindrops continually splash right up at the sky ceiling itself. Position your camera underneath them right and ...voila, ghostly precip sprites apparently appearing. (You'll need to make a SOC to make the level playable in vanilla SRB2 mind)

See merge request !169
2017-03-04 08:40:37 -05:00
Monster Iestyn
b0f4bbb44b Played TD's Stormy Streets enough to know precipitation sprites didn't get an overflow test of their own
(various large invisible blocks used in the level cause rain to make splashes high above the main level, high enough to make ghostly rain splash sprite artifacts appear sometimes in nearby areas)
2017-03-02 19:37:21 +00:00
toasterbabe
758bec6963 Fixed a bunch of awkwardness where Metal wouldn't reset himself properly when his target died. 2017-02-14 02:07:08 +00:00
toasterbabe
a04ae45a93 MORE CUES 2017-02-13 18:53:16 +00:00
toasterbabe
3feac5bc90 bad bounce https://gfycat.com/DeliciousReliableGentoopenguin 2017-02-13 18:04:08 +00:00
toasterbabe
5f3cfc6729 Some cleanup. 2017-02-12 14:16:52 +00:00
toasterbabe
6dfef794a4 Metal Sonic's bounce attack is much nicer. Also, a bunch of other minor tweaks. 2017-02-12 01:28:12 +00:00
Monster Iestyn
9b737d1165 Merge branch 'record-attack-custom-exit-fix' into 'next'
Record attack custom exit fix

This fixes the bug reported here: http://mb.srb2.org/showthread.php?t=42342

Record Attack now no longer allows the tally to be skipped, whether by custom exits or by Lua etc.

See merge request !164
2017-02-08 20:18:06 -05:00
Monster Iestyn
f9b41898a9 Don't allow skipping stats in record attack/nights attack 2017-02-05 22:04:29 +00:00
Monster Iestyn
591fe13cc0 Merge branch 'dedicated-console-fix' into 'master'
Dedicated console shift-down fix

This fixes the special console window used by dedicated mode not properly telling the game when shift is held down since the console improvements added in 2.1.17. This means shift+1 is properly interpreted as "!" again rather than 1, shift+- should be "_" rather than "-", etc.

Sorry LJSonic your problems from pre-2.1.17 are probably just your keyboard being for a different locale than the one most SRB2 players play with so I'm aware, I'm not sure what can be done for the time being. =V

Fun note, you can see how the game interprets un-executed input to the console window by playing normal (not dedicated) SRB2 with `-console`, which creates a second window for the console just like you'd see for dedicated mode. Drop down the console on the main SRB2 window, switch to the console window and type something in (DON'T PRESS ENTER), and you'll see the input appearing in the input space in the console window at the same time!

See merge request !163
2017-02-05 14:44:50 -05:00
Monster Iestyn
dc249c6cd5 D_ModifierKeyResponder now checks for ev_console as a "key down" event
console window uses ev_keyup too so don't worry about turning off
2017-02-04 23:26:37 +00:00