Commit graph

1974 commits

Author SHA1 Message Date
Inuyasha c4996aad7e So how long have these been pulling the wrong sprites? 2016-11-13 14:29:19 -08:00
Inuyasha 908907d668 Merge branch 'spr2stuff' into 'master'
Sprite2 changes

Some stuff!

* Lua access to sprite2.
    * Introducing new Lua-exclusive function, P_IsValidSprite2(mo, spr2). Basically just a wrapper for (((skin_t *)mobj->skin)->sprites[spr2].numframes > 0), useful for creating custom sprite2 defaulting functions since hooking into P_GetMobjSprite2 wouldn't be worth it.
* FF_ANIMATE support for sprite2s. The var2 of the state works identically to normal FF_ANIMATE, but var1 is completely disregarded - it just runs all of the frames available to that one sprite2 animation set.
    * As a result, a bunch of states which were either not previously animatable or had animated at constant speed now get animation without state changes.
* P_SetMobjState now supports sprite2 defaulting like P_SetPlayerMobjState does.

See merge request !51
2016-11-13 16:59:26 -05:00
Inuyasha 63622cb2dd Update new music cues to use correct names 2016-11-13 13:55:32 -08:00
Inuyasha e62b0f219f Merge branch 'damage-control' into 'master'
Damage control + Match rebalancing

This is two branches in one since while I was working on damage-control's changes months back, I felt it was best Match rebalancing was merged in here too (thanks JTE for helping me do so).

Changes from damage-control:
* `player->health` (formerly the "HUD copy" of `player->mo->health`) is now `player->rings`, and is also now the player's actual ring count.
* `player->mo->health` (formerly rings + 1) is now always 1 when alive, regardless of ring count; if player with rings is damaged, this is untouched.
* P_RingDamage now includes ring spilling code.
* P_ShieldDamage now has a damagetype argument, allowing me to remove the last MT_NULL hack left in from the pre-damagetype days that I forgot about.
* The old "switch-to-seestate" enemy damaging behavior in P_DamageMobj has been removed. This was a Doom left-over and doesn't really affect SRB2's enemies anyway - see, Doom enemies had a random chance of using seestate or painstate, SRB2 enemies always use painstate.
* Other minor efforts to reorganise damaging code and have it make more sense, but otherwise nothing that should affect gameplay in general.

Changes from match-rebalancing:
* New weapon/ammo dropping behavior: if you have the weapon panel + ammo, you drop the panel (but not the ammo); if you don't, you just drop the ammo.
* New Match ammo consumption: Weapon rings can now be fired with no rings at double the ammo cost.
* New emerald behaviour: collecting all 7 emeralds no longer turns you super (read: Match super is dead now) but instead steal points from enemies and gives you and teammates invincibility + sneakers
* Tails ringslinger buff: Any character with CA_FLY will now throw rings 1.5x as fast.

See merge request !28
2016-11-13 16:47:05 -05:00
toasterbabe 11a391dbb5 Making FF_SPR2ENDSTATE consistent between P_SetMobjState and P_SetPlayerMobjState. 2016-11-12 15:06:49 +00:00
toasterbabe 20677c7a66 * Introducing new Lua-exclusive function, P_IsValidSprite2(mo, spr2). Basically just a wrapper for (((skin_t *)mobj->skin)->sprites[spr2].numframes > 0), useful for creating custom sprite2 defaulting functions since hooking into P_GetMobjSprite2 wouldn't be worth it.
* All Lua-originated sprite2 settings are now forced through P_GetMobjSprite2. Makes sense because of SPR2_JUMP, which none of the main characters have sprites for yet all use.
* Cleaned up P_GetMobjSprite2 to not set irrelevant, otherwise-unused variable.
2016-11-11 23:23:41 +00:00
toasterbabe 4756b4ce2c Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into spr2stuff 2016-11-11 21:38:35 +00:00
toasterbabe 9aa41582c3 Lua support for sprite2. 2016-11-11 21:37:28 +00:00
Inuyasha c545194bef update colors to new palette 2016-11-10 16:53:27 -08:00
toasterbabe d8096d237a Nullification of a lot of irrelevant nextstates for infinite length states. It makes sense. 2016-11-11 00:30:49 +00:00
Inuyasha 1ff498fcfd Merge branch 'public_next' of http://git.magicalgirl.moe/STJr/SRB2Internal
# Conflicts:
#	src/console.c
2016-11-10 16:20:03 -08:00
toasterbabe 6c1483266c You know, I should've converted these with the earlier commit. Silly me. 2016-11-11 00:15:41 +00:00
Inuyasha 6c40eb5cd7 Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2 into public_next 2016-11-10 16:13:35 -08:00
toasterbabe 07e5fe9546 Swapped around in an attempt to streamline. 2016-11-10 22:35:33 +00:00
toasterbabe fc64feee60 FF_ANIMATE now cooperates with Sprite2, and to this end a few player states which have non-varying animation speeds (some which previously had a speed of 0) now use it. 2016-11-10 18:27:01 +00:00
Monster Iestyn fea97b4880 Merge branch 'master' into next 2016-11-10 16:45:49 +00:00
toasterbabe 080b3c1d6d Decouple the Sprite2 defaulting from P_SetPlayerMobjState. 2016-11-10 16:05:40 +00:00
Monster Iestyn 1b6c1a02c9 Merge branch 'reduced-palette-quick-fix' into 'master'
Reduced palette quick fix

Fixes a leftover from the days of the old palette

See merge request !50
2016-11-10 09:30:53 -05:00
Inuyasha 2569a1eda6 Merge branch 'console-improvements' into 'master'
Console improvements

* Unused console backgrounds no longer take up memory
* Input cursor can now move left and right
* Support for selections (Shift-arrow keys, CTRL-A, etc)
* Clipboard support (CTRL-C to copy, CTRL-V to paste, CTRL-X to cut)
* Fixed handling of simultaneous modifier key presses

https://dl.dropboxusercontent.com/u/3518218/21/console.gif

None of this affects chat yet, that's not part of the console. I'll look at it later.

See merge request !133
2016-11-09 20:42:56 -05:00
Monster Iestyn 14cd274baa Change 0xF7 to 0xFF in R_GenerateTexture 2016-11-07 20:27:12 +00:00
Monster Iestyn cb1fbbf345 Merge branch 'public_next' 2016-11-06 18:02:12 +00:00
Monster Iestyn 798f4d498d Merge branch 'next' into public_next 2016-11-06 18:01:49 +00:00
Monster Iestyn f97301b8b8 Merge branch 'master' into next 2016-11-06 17:59:35 +00:00
Monster Iestyn 0882dd79c0 Merge branch 'md2-limits-check-hotfix' into 'master'
MD2 limits check hotfix

Fixing slight mistake made in merge request !132 that someone else spotted, no real explanation needed

See merge request !134
2016-11-06 12:57:48 -05:00
Monster Iestyn 2dfb841c38 Correcting slight mistake I made 2016-11-06 17:50:04 +00:00
Monster Iestyn 2df7d8c4aa Merge branch 'public_next' 2016-11-05 19:52:27 +00:00
Monster Iestyn 90d82a8358 Merge branch 'next' into public_next 2016-11-05 19:51:57 +00:00
Monster Iestyn 7b9328781f Merge branch 'master' into next 2016-11-05 19:36:04 +00:00
Monster Iestyn 3bf19a004e Merge branch 'md2-limits-check' into 'master'
MD2 vertex/frame/triangle/etc limits checking

Fix for this bug: http://mb.srb2.org/showthread.php?t=42099

The model reading code didn't properly check if the model had too many vertices, so models with higher counts freely broke the game. This fix now stops that and prints an error message if that is the case.

However, it seems some models happily exceed other limits such as texcoords without problem (to my knowledge), so I've not bothered with checking those limits for now. Perhaps this could be a time to discuss if we need to change such limits again or not? Either way, one can easily uncomment my lines for checking texcoords/skins/triangles limits later if needed.

EDIT: I've allowed checking for triangle and frame limits too now, after some discussion.

See merge request !132
2016-11-05 15:20:39 -04:00
Monster Iestyn 8909b7c27b Change >= to >, I THINK having exactly 4096 vertices is safe? 2016-11-05 17:38:36 +00:00
Inuyasha 55400a262d go fuck yourself stupid compiler
...your guesses should not be treated as errors.
2016-11-04 02:02:26 -07:00
Inuyasha 010c52aed2 show highlight BG over ellipses if highlight extends offscreen
+ bug fixes
2016-11-03 19:36:43 -07:00
Inuyasha bb92986aee Merge branch 'console-improvements' of http://git.magicalgirl.moe/STJr/SRB2 into console-improvements
# Conflicts:
#	src/sdl/i_system.c
2016-11-03 17:31:24 -07:00
Inuyasha e245cdfcbf Console with moving cursor, selections, etc 2016-11-03 17:30:30 -07:00
Monster Iestyn efe02e2a42 allow triangle/frame limits too 2016-11-03 22:53:49 +00:00
Monster Iestyn 561a0fe768 Attempt loading of an MD2 only once; if we failed then don't bother again
This keeps my new error messages from flooding the console and log.txt
2016-11-03 21:06:23 +00:00
Monster Iestyn 2ec972af54 check numVertices, bail out and print error message if there are too many
I added similar checks for the other num* but it seems some MD2s break the other limits without knowing anyway ...so I've commented these checks out for now, unless we have further discussion regarding them later on
2016-11-03 20:40:17 +00:00
Alam Ed Arias 1f6388a2e0 Fix up Win32 interface code misdeclaration of I_ClipboardPaste() 2016-11-03 14:35:32 -04:00
Alam Ed Arias 8040a68fa0 Clipboard: remove Win32 code for SDL Clipboard API 2016-11-03 14:29:51 -04:00
Alam Ed Arias f3751828cb Merge branch 'master' into next 2016-11-03 12:51:48 -04:00
Inuyasha bb20cfd6be Clipboard copy/paste testing
(unfinished, but basics work)
2016-11-03 01:43:57 -07:00
Alam Arias 115b99db0f Merge pull request #132 from STJr/revert-130-console-and-chat-improvement
Revert "Chat and console improvements"
2016-11-03 03:36:50 -04:00
STJrInuyasha b2c71944f6 Revert "Chat and console improvements" 2016-11-03 00:34:15 -07:00
Alam Ed Arias 941df72b6f Merge branch 'master' into next 2016-11-03 02:06:49 -04:00
Alam Arias d4ee063c4c Merge pull request #130 from LJSonik/console-and-chat-improvement
Chat and console improvements
2016-11-03 02:05:47 -04:00
Inuyasha c277125fe7 modifier key status made globally accessible
now also properly handles L/R simultaneous presses
2016-11-02 15:23:22 -07:00
Inuyasha 8107765677 make console back color use just one section of memory
let's be honest, it's pretty dumb to have every single possible back colormap in memory when only one is being used at a time
2016-11-02 14:26:35 -07:00
Louis-Antoine 8b72b553be Fixed warnings 2016-11-02 20:10:08 +01:00
Louis-Antoine 2d72b2fac6 You can now move the cursor in command prompt and chat, using left/right, ctrl+left/right, home/end, and select text with shift 2016-11-02 19:31:06 +01:00
Alam Ed Arias 67d2211bca whitespace: cleanup 2016-11-01 15:54:52 -04:00