Commit graph

48 commits

Author SHA1 Message Date
Lactozilla
e7b4beba20 Update dates in copyright notices of all files modified in 2024 2024-09-21 21:35:01 -03:00
Lactozilla
cb09b90556 Add missing comments 2024-06-02 21:45:36 -03:00
Lactozilla
bd641c3857 Fix #1263 2024-06-02 21:40:14 -03:00
Lactozilla
970a9d65dd Merge branch 'next' into more-sprite2 2024-01-13 03:43:34 -03:00
sphere
4ae2482283 Merge branch 'character-nightsattack' into 'next'
Draw Character in NiGHTS Attack

See merge request STJr/SRB2!2175
2024-01-11 12:11:54 +00:00
Mari0shi
5a2a24b868 Draw Character in NiGHTS Attack 2024-01-11 12:11:54 +00:00
Lactozilla
7fbd8f7025 Merge branch 'next' into more-sprite2 2024-01-02 22:09:17 -03:00
Lactozilla
a3e6b5e0fb Merge remote-tracking branch 'stjr/next' into raise-skin-limit 2023-11-23 13:48:18 -03:00
Lactozilla
4408f4462e Add 'sprite2' field to states 2023-11-12 21:46:49 -03:00
Alam Ed Arias
49d9619192 Merge branch 'master' into raise-skin-limit 2023-10-28 18:09:42 -04:00
LJ Sonic
d1dbdee016 Refactor global userdata registration 2023-10-28 00:24:04 +02:00
LJ Sonic
bc9a378521 Refactor userdata metatable registration 2023-10-27 20:17:27 +02:00
Zwip-Zwap Zapony
11a2fe8613 Expose skin.supername to Lua 2023-09-06 21:02:04 +02:00
Sally Coolatta
10a8f2d05e Fix some minor warnings
- Fix `lib_getSkinSprite` overshadowing `sprites` global
- Rename terrible result_e `ok` so it stops overshadowing crap
- Remove inlining from w_wad.c since it reached the inline limit (remember kids, your compiler knows better than you these days whenever or not to inline something)
- Remove unused variable in G_PlayerReborn
2023-07-25 11:32:26 -04:00
Gustaf Alhäll
2f2de7d3d3
Optimize field lookups in Lua metatables 2023-06-18 18:05:16 +02:00
spherallic
1470d099e3 Update copyright year & credits 2023-03-31 14:53:31 +02:00
spherallic
14295ac7de 2022 2022-03-03 20:24:46 +01:00
Jaime Ita Passos
2aa9bb59ef Memory management fixes
Date:      Mon Aug 9 15:57:07 2021 -0300
2021-08-09 15:57:35 -03:00
SteelT
a72d6bba22 Merge branch 'skin-unlocks-sanity' into 'next'
[SUGOI] Remove skin->availability, add SECRET_SKIN

See merge request STJr/SRB2!1474
2021-05-28 21:30:16 -04:00
Sally Coolatta
5d93f86499 Merge branch 'next' into skin-unlocks-sanity 2021-05-08 12:55:46 -04:00
LJ Sonic
d325c7e6d3 The year is 2021 2021-05-07 17:45:56 +02:00
James R
aee963f4e9 Replace LUA_PushLightUserdata with LUA_PushUserdata
See 7df6a309 and 83a87042. I didn't realize that light
userdata's metatable is shared--like numbers or strings.
So it cannot be paired with a metatable.

I also made a few minor tweaks to Lua cvars, other than
accounting for the double pointer in the userdata.
2021-05-02 21:59:23 -07:00
Sally Coolatta
8278e621fb Removed skin->availability
Locked skins now are a specific unlockable type, instead of being tied to the skin's properties.

This has plagued custom gamedata since 2.2 launch. It's extremely obnoxious having to set aside random numbers as dummy unlockables just to ensure that Amy Fang & Metal are unlocked from the start in a custom map pack.

Other changes made to accommodate this:
 - R_GetSkinAvailabilities is now created from the list of unlockables set to skin type. (1st skin unlockable defined is (1), 2nd skin unlockable defined is (1 << 1), etc...)
- The "Added skin x" print shows up when loading addons but not at all for the base game, because the previous behavior of hiding based on if the skin was locked would now require iterating unlockables, which felt wrong to do during that stage of the loading process
 - I noticed in my test wad that Sonic&Tails would give you Sonic&Sonic out if Tails was locked. I fixed that by making both skins required to show the character select option.

Mods that reserved empty dummy unlockables for Amy Fang and Metal won't have to do anything. Mods that wanted to re-lock them behind different requirements will have to update, but in the future they will not have to be in specific slots. Additionally, now Sonic Tails and Knuckles can also be locked for mods.
2021-04-25 07:18:32 -04:00
James R
c8cc9c7a6f Remove trailing whitespace 2020-12-12 02:40:46 -08:00
Steel Titanium
4c53eabc59 Reword the error to be more consistent with other errors 2020-12-03 21:14:27 -05:00
Steel Titanium
d26172661d Remove spritedef field 2020-11-08 13:31:59 -05:00
Steel Titanium
83a87042f1 Push skin->sprites as light userdata 2020-11-08 13:25:56 -05:00
Steel Titanium
1320f10839 Allow access to skin.sprites[]
Only numframes so far though, as there's already a function for what spriteframe provides.
2020-11-07 23:55:37 -05:00
Louis-Antoine
e3cbdf8fab Use HAVE_BLUA as fuel for my fireplace 2020-03-19 18:36:14 +01:00
Monster Iestyn
f4cb6e1f5e Include r_skins.h instead of r_things.h in many files where all they wanted from it was skins stuff
(oddly enough, this actually revealed some secret file dependencies previously included via r_things.h! I also needed to include d_player.h in r_skins.h itself it seems)
2020-03-09 13:54:56 +00:00
James R
7060083db5 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
Steel Titanium
d415cd5c6d
Update copyright date on source files 2019-12-06 13:49:42 -05:00
toaster
9aed6374cd Forgot to put these in Lua. (Not gonna make a fifth exe today just for this one change, though.) 2019-09-11 17:32:41 +01:00
toaster
47554b57e4 * Made the evaluation screen even more attractive.
* Fixed an unused variable warning in lua_skinlib.c.
- fixed post-level cutscenes playing when you get game over in MP (still kinda on-topic)
Also with apologies to MI:
- golden egg statue mode for tutorial, since the grey doesn't contrast enough with the blue and lime green
- fixed closed captions for replaced player sounds being incorrect
- fixed closed captions overlapping tutorial text
2019-07-29 14:55:36 +01:00
toaster
063e350c63 A good and bad ending cutscene now exist.
Also:
* SPR2_XTRA - instead of defining lumpnames in S_SKIN, those kinds of assets can just be bundled into the spriteset. Required for ending cutscene stuff, I guess, but also done for HUD life icon and character select image (aside from Sonic&Tails, still SOC'd in).
* Minor oversights in SPR2 support corrected.
* Better evaluation, featuring ending assets.
* Intro has warping-in blackrock, reusing ending assets.
* Cutscene text now supports lowercase (intro and custom).
* Disable the asset-fucking "gamma correction" I put in over two years ago when implementing colour cube. (This is the only thing I could move into another branch if you MUST, but it's basically invisble in the diff so w/e.)
* Don't blank the screen if the top left pixel of a screen-covering patch is transparent. (Checked via nonzero topdelta for first column)

Bugs:
* OPENGL ONLY: The first ~20 frames of both endings are fucked. A little help here? Might be HWR_DrawFadeFill's fault, which I just created. OR it could be in f_finale, but I doubt it, since it doesn't appear in Software.
2019-07-28 00:32:57 +01:00
mazmazz
075f28b7c8 WIP 20190101 merge
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
mazmazz
ea7162a76a Update source copyrights to 2018 2018-11-25 07:35:38 -05:00
toasterbabe
844416855f Smiles follow-mobj initial support! Still using a Lua hook to follow closely behind, but now it doesn't need to be a generic thinkframe. Woo! 2017-10-02 14:08:58 +01:00
toasterbabe
0c3256fa14 NiGHTS is now spr2-ised. i'll upload the relevant files and etc to the ftp
* if you can turn SF_SUPER, flash your skin's supercolor, otherwise be your normal color
* if your skin doesn't have a SPR2_NGT0 (horizontal fly), use Sonic's (this will hopefully be replaced by 2.2 with sprites of NiGHTS themselves)
* MT_NIGHTSCHAR made irrelevant, everything follows actor->target instead of actor->target->tracer now
* emerald is now player->mo->tracer instead of player->mo->tracer->target
* nightopian helpers flash for the 35 tics before they disappear
* nights capsule makes boss explosions/noises now (i can change it back i just like it better)
* drill off into the sky instead of fly up in floating pose (but no noise yet)

ALSO:
* default maxdash is now 70
* forgot to add supercolor to lua, it is there now
* SPR2_SMSL renamed to SPR2_SSTN (stun)
* any player with a skincolor that's in the super range is set to FF_FULLBRIGHT at state-set time, so no need to keep super players non-fullbright just because they use spin stuff
2016-08-12 02:57:37 +01:00
toasterbabe
c678220857 New S_SKIN attribute - "camerascale", another float. Acts as a scale modifier to t_cam_dist and t_cam_height. 2016-08-06 23:18:37 +01:00
toasterbabe
d0cd1d951f Add prefoppositecolor to Lua. 2016-07-20 15:53:08 +01:00
toasterbabe
4c6ed6da76 The availability unlockable number for a skin is now available, read only, to Lua. 2016-07-14 15:51:03 +01:00
toasterbabe
c2aba46298 New S_SKIN attributes.
* radius - sets the player's radius for that skin.
* height - sets the player's normal height for that skin.
* spinheight - sets the player's spinheight for that skin.
* shieldscale - see http://i.imgur.com/BQ5DhKC.png for justification
2016-07-13 15:15:45 +01:00
Inuyasha
f07585191b copyright dates/statements updated and such
(no actual SLOC changes)
2016-05-17 17:42:11 -07:00
Monster Iestyn
2ddde83601 General improvements to Lua error messages for out-of-bounds stuff.
The idea is for the layman Lua user to understand better what range of values to use for mobj types, states, sfxs, player #s etc. Additionally, mobjinfo/states/sfxinfo/hudinfo tables all now have actual bound checks when accessing/editing them. Yikes, why didn't they have any before?!
2016-05-01 22:14:42 +01:00
JTE
ef0e61fc33 Change LUA_NUMBER to fixed_t, change angle_t handling in Lua.
Angles now go from 0 to 0xFFFF (360 degrees == FRACUNIT) instead
of using a full UINT32. Lua only has one number type, so signedness
gets in the way of using angle_t directly. This handling of angles
matches up with how ZDoom ACS scripting and the like does it.

I also changed all the integer casts and pushes of fixed_t to
their own macro in preperation for possible future seperation.
2015-05-20 23:54:04 -04:00
Alam Ed Arias
c028c83235 SRB2 2.1.9 release 2014-08-03 23:49:33 -04:00
Alam Ed Arias
b93cb1b65a SRB2 2.1 release 2014-03-15 13:11:35 -04:00