Commit graph

189 commits

Author SHA1 Message Date
Jaime Passos
4e814cd424 FINALLY, COLORCUBIUM 2019-12-12 23:18:39 -03:00
Jaime Passos
228b29e23b HWR_AllowModel 2019-12-12 22:53:19 -03:00
Jaime Passos
ca83bafae8 Initialise the variable, obviously 2019-12-12 22:32:19 -03:00
Jaime Passos
a138a3ab5f Merge remote-tracking branch 'origin/dashmode-shader' into opengl-is-a-bad-renderer 2019-12-12 22:31:34 -03:00
Jaime Passos
08794559f0 Fix TC_ blending 2019-12-12 22:26:28 -03:00
Jaime Passos
d80bfb4e94 PU_HWRCACHE_UNLOCKED bmomento bróder 2019-12-12 21:23:55 -03:00
Jaime Passos
08d4a36f63 Texture blending port
Co-authored-by: TehRealSalt <tehrealsalt@gmail.com>
2019-12-12 21:22:36 -03:00
Jaime Passos
6c3111d809 Stop crashing with models because someone keeps freeing those tags 2019-12-12 19:54:47 -03:00
lachwright
8a70759e0a Add TC_DASHMODE color shader 2019-12-12 01:27:41 +08:00
Jaime Passos
40b862967d Just in case? 2019-12-07 23:55:28 -03:00
Jaime Passos
a9183b474b rename rollaxis to rotaxis 2019-11-13 12:47:30 -03:00
Jaime Passos
b54f6181c3 Rotation axis (will rename internally later) 2019-11-13 12:36:44 -03:00
Jaime Passos
245881ec55 Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-11-12 21:38:02 -03:00
MascaraSnake
66123b8165 Merge branch 'internal-md3-vanilla-c' into 'master'
Internal MD3 merge 2 good riddance glBegin

See merge request STJr/SRB2Internal!362
2019-11-12 15:44:20 -05:00
MascaraSnake
6b567bfb5c Merge branch 'dashmodecut' into 'master'
Dashmode polish

Closes #266

See merge request STJr/SRB2Internal!418
2019-11-12 15:40:46 -05:00
Jaime Passos
91a01be891 Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-11-11 14:41:55 -03:00
James R
99cd5161be Also allocate mipmap for MD2 2019-11-07 18:04:53 -08:00
James R
d2a7a87c7f Fix nonpacked to packed cast for OpenGL 2019-11-07 16:30:29 -08:00
Jaime Passos
4ff769704a function renaming 2019-11-05 10:28:19 -03:00
Jaime Passos
8ac49d8855 add gr_modelinterpolation 2019-11-04 12:21:53 -03:00
toaster
ef886e4b80 Fix TC_DASHMODE and associated not being applied in GL. (Won't conflict with md3 branch because these lines weren't modified there!) 2019-11-04 13:11:04 +00:00
toaster
915e50a1e4 Merge branch 'master' of https://git.magicalgirl.moe/STJr/SRB2Internal.git into internal-md3-vanilla-c
Merge seems fine, but won't compile for some reason.
2019-11-02 18:34:12 +00:00
toaster
8909598baf Instead of checking for mod being nonzero, pretend it's 1 - after all, there's no good behaviour in that circumstance otherwise. 2019-11-02 18:25:56 +00:00
toaster
417f17ebdd Do a bunch of stuff to the MD2/3 sprite2 support to get it back to feature parity with before, without going back to being hacky as fuck.
* Store the number of frames per sprite2 run in the spr2frames struct.
* Reintroduce P_GetModelSprite2, to allow for the sprite2 defaulting system to be used to full advantage even in GL.
* Instead of splitting the SUPER and normal SPR2 stuff within the same cell of the struct, have them exist in different cells just like in the "normal" sprite2 structs.
* Allow for just providing spr2 frames in order without specifying which "normal" sprite2 frame it's supposed to replace.

Also:
* Fix FF_VERTICALFLIP-ignoring regression.
* Fix whitespace adjustment in win_dll.c
* Remove bracket in P_GetSkinSprite2 because I realised it was extraneous while making sure P_GetModelSprite2 worked with it.
2019-11-02 17:52:54 +00:00
Jaime Passos
79e99dc471 Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-10-28 14:29:10 -03:00
toaster
5502242e8b MD2 crash fix. 2019-10-13 11:59:38 +01:00
Jaime Passos
7746767735 Merge remote-tracking branch 'origin/master' into internal-md3-vanilla-c 2019-10-06 17:40:41 -03:00
Jaime Passos
5118f8589d Merge remote-tracking branch 'origin/master' into rotsprite_i 2019-09-28 12:14:55 -03:00
Steel Titanium
73146a8338
Restore code that somehow got reverted???
How did this even happen??
2019-09-22 20:30:07 -04:00
Alam Arias
530b5784b8 platersprite_t is not the same as unsigned 2019-09-19 21:42:59 -04:00
Jaime Passos
db979845e0 Merge remote-tracking branch 'origin/master' into internal-md3-vanilla-c 2019-09-15 16:24:24 -03:00
Jaime Passos
0cc553be5f Merge remote-tracking branch 'jimita/flats-png' into flats-png_port 2019-09-06 19:20:45 -03:00
Jaime Passos
53ddf19f94 Interpolation flag support 2019-09-03 22:57:54 -03:00
Jaime Passos
4760ff0963 Crash prevention 2019-09-03 21:31:32 -03:00
Jaime Passos
1dca3338fd Sprite2 support but I'm not a dumbass 2019-09-03 18:27:22 -03:00
Jaime Passos
c21d83e8af Sprite2 support! 2019-09-02 23:29:16 -03:00
Jaime Passos
d99026df3b Merge remote-tracking branch 'origin/master' into internal-md3-vanilla-b 2019-09-02 20:27:50 -03:00
Jaime Passos
f68652aa66 I 2019-08-18 14:16:48 -03:00
Alam Ed Arias
a6fe6ebcd3 Fix signed vs unsigned comapre 2019-08-07 12:41:22 -04:00
mazmazz
e1e2572357 More post-merge fixes 2019-08-04 21:49:31 -04:00
mazmazz
84c9633579 Merge remote-tracking branch 'origin/master' into internal-md3-vanilla-b 2019-08-04 21:33:13 -04:00
mazmazz
b1f402538f Post-merge fixes (todo: spr2) 2019-08-04 21:32:41 -04:00
toaster
a87e1b8aa6 Fix inadvertent fallthrough and associated whitespace. 2019-08-04 10:27: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
toaster
4ad1703ae3 Revert "Revert "Merge branch 'metalfixes' into 'toast_cleanup'""
This reverts commit c04b560e92.
2019-07-03 00:58:02 +01:00
MascaraSnake
c04b560e92 Revert "Merge branch 'metalfixes' into 'toast_cleanup'"
This reverts merge request !239
2019-07-02 23:49:10 +00:00
mazmazz
dc0a92ea62 Merge remote-tracking branch 'origin/master' into internal-md3-vanilla 2019-06-29 17:51:30 -04:00
toaster
faebe0f9af Metal Sonic fixes!
* Add more context clues to his fight, including an indicator for which laser attack is being used after chargeup.
* Make missiles able to vectorise him.
* Add another laser orb attack - vertical slice - and change the laser orb sequence to accurately reflect that horizontal is the hardest of the ones in 2.1.
* Optimise TC_BLINK, and fix an issue with TC_ALLWHITE that somehow avoided coming up in testing.
* Fix colorized bosses losing their colorization when flashing, by forcing TC_ALLWHITE.
2019-06-28 20:48:14 +01:00
toaster
1d65caa250 With permission from Kart Krew (Sal and Sryder specifically - they don't know WHY vanilla's using it):
* Port across the additional colour translation maps, including mobj-level support for "colorized" objects.
* Make Fangboss and both Metal Sonic objects greyscale if, on spawn, there is a player in the game who is not a spectator whose skin is that character.
* Allow bosses with MF_GRENADEBOUNCE to opt out of the MF2_FRET colour-flashing tomfoolery, and give this flag to Fang.
2019-06-18 17:55:57 +01:00
Jaime Passos
a4a529bdb5 Hardware renderer: Disable Glide-specific texture handling 2019-05-26 17:41:10 -03:00
Steel Titanium
6aac014608 Generic model terminology 2019-05-02 22:55:45 -04:00
Digiku
d05caf5963 Update hw_md2.c -- add comment about anglef player->frameangle from Kart 2019-01-08 11:26:39 -05:00
Arthur
587ffa9ada Removed gr_voodoocompatibility as even low-power mobile devices do not have this limitation
No longer using byte2float in DrawPolygon -- use the surface color data directly
Vertex Buffer Objects for non-interpolated model frames
Removed some old unused paletted texture stuff
2018-12-27 00:35:29 -05:00
mazmazz
59826860ab Ifdef nextFrame handling under USE_MODEL_NEXTFRAME 2018-12-19 10:33:13 -05:00
mazmazz
c4f5bdc347 Adapt re-enabled DrawMD2 code block for meshes 2018-12-19 00:38:00 -05:00
mazmazz
98d18509e6 Hide/add Kart FTransform mirror and anglez behind ifdef 2018-12-19 00:17:51 -05:00
mazmazz
45f0f725cd More hw_md2 merge errors; re-enable interpolation code block 2018-12-18 23:44:38 -05:00
mazmazz
65543545c6 hw_md2 merge errors 2018-12-18 22:50:00 -05:00
mazmazz
3dbda54d3c GCC compile fixes 2018-12-18 19:17:33 -05:00
Arthur
4713200fb5 push test 2018-12-18 17:52:50 -05:00
Arthur
76dabd5e9d Support for 'tinyframes', and lots more optimization 2018-12-18 17:52:47 -05:00
Arthur
3ed0edbcfe Common model format, with MD2/MD3 loading 2018-12-18 17:52:45 -05:00
Monster Iestyn
67a2922558 Ensure file is closed whenever MD2 reading errors happen 2018-10-27 18:53:38 +01:00
Monster Iestyn
b150e842fc Add MD2_INDENT and MD2_VERSION so we can cleanly check that it's a valid MD2 from magic number/version 2018-10-27 18:53:18 +01:00
mazmazz
62b6950e33 Use lightlist.extra_colormap double pointers in OpenGL 2018-09-12 16:28:55 -04:00
Monster Iestyn
f1bba60373 Merge branch 'md2-fopen-error' into 'master'
More helpful error messages

See merge request STJr/SRB2!243
2018-07-06 14:38:59 -04:00
Monster Iestyn
130de10f97 Merge branch 'md2-smoother-interpolation' into 'master'
Smoother MD2 interpolation

See merge request STJr/SRB2!224
2018-07-06 14:38:37 -04:00
Steel Titanium
b4d479ad9a Include errno if not already included. 2018-05-13 16:04:34 -04:00
Steel Titanium
7f084868b9 More helpful error message 2018-05-13 15:35:38 -04:00
GoldenTails
7783ddd134
Update hw_md2.c 2018-05-13 14:34:08 -05:00
GoldenTails
5f0a45124c
Update hw_md2.c 2018-05-13 14:32:33 -05:00
GoldenTails
e66e0bb20e
Fixed MD2 models not loading correctly on Linux 2018-05-13 14:19:36 -05:00
Steel Titanium
0cc4b8d6db Smoother MD2 interpolation 2018-02-06 14:50:08 -05:00
toasterbabe
b2d43cc56b (re-)fix MD2 interpoleration. 2017-11-02 14:33:56 +00:00
Monster Iestyn
b52c843139 Merge branch 'public_next' 2017-11-01 18:39:25 +00:00
Monster Iestyn
2b1fb67a5f DrawMD2i: change duration and tics to INT32, fix up any related code 2017-10-30 19:12:51 +00:00
Alam Ed Arias
5986720789 Build: fixups 2017-09-28 11:01:52 -04:00
toaster
3cc14e3985 Merge branch 'directionchar' into 'master'
Autobrake & decoupling player sprite angle from camera angle

See merge request !69
2017-09-19 07:56:22 -04:00
toasterbabe
3c785cbe94 * Add Skid SPR2/state in preperation for directionchar.
* Clean up spr2 md2 code.
* Experimented but then commented out some stuff for homing attack.
2017-09-09 22:12:23 +01:00
toasterbabe
79dab78fd3 * Support FF_SPR2ENDSTATE in interpoleration.
* Fix skidding interpoleration bug.
2017-08-27 16:35:19 +01:00
toasterbabe
973f700dcf * Make the model->spr2frames dynamically allocated. (There's only two settings - on and off - but that's better than it perpetually being on...)
* Fix up defaulting for DEAD to go to PAIN.
2017-08-27 14:56:07 +01:00
toasterbabe
76300026f8 * Added support for sprite2s to MD2s!
- Name each frame either SPR2_**** or SUPER**** (where **** is the 4-character name)
    - If the name is 3 characters, '.' is accepted as a substitute for the '_', but a space/absent isn't (for tool-related reasons).
    - Adds a big sprite2 index array to all models, even non-player ones. Sorry!
* Made MD2 frame interpoleration only work across the same spriteset (and sprite2set).
* Made MD2 frame interpoleration happen when there's less than a quarter of a second between frames, as opposed to the hardcoded specific animation disabling.
* Fixed sprite2-related typo in dehacked.c.
2017-08-26 18:56:23 +01:00
toasterbabe
2e6c09a636 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into directionchar
# Conflicts:
#	src/hardware/hw_main.c
2017-08-16 21:40:32 +01:00
toasterbabe
780f9b1645 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop
# Conflicts:
#	src/hardware/hw_md2.c
2017-08-07 20:36:14 +01:00
toasterbabe
8941379c64 Implementation of all the new skincolours. No new exe yet, though, since I'm still doin' stuff. 2017-07-22 23:24:12 +01:00
toasterbabe
2636375f94 GL supporting. 2017-04-07 16:51:43 +01:00
Monster Iestyn
817f0908e4 made HWR_CreateBlendedTexture's color switch case take up not so many lines, and only one V_GetColor call is used now 2016-11-07 18:34:51 +00:00
Monster Iestyn
bbd67a6960 Merge branch 'master' into opengl-improvements 2016-11-06 18:02:34 +00:00
Monster Iestyn
cb1fbbf345 Merge branch 'public_next' 2016-11-06 18:02:12 +00:00
Monster Iestyn
2dfb841c38 Correcting slight mistake I made 2016-11-06 17:50:04 +00:00
Monster Iestyn
05860b2fa1 Ensure file is closed whenever MD2 reading errors happen 2016-11-05 20:51:48 +00:00
Monster Iestyn
b00c680437 Add MD2_INDENT and MD2_VERSION so we can cleanly check that it's a valid MD2 from magic number/version 2016-11-05 20:40:48 +00:00
Monster Iestyn
2df7d8c4aa Merge branch 'public_next' 2016-11-05 19:52:27 +00:00
Monster Iestyn
8909b7c27b Change >= to >, I THINK having exactly 4096 vertices is safe? 2016-11-05 17:38:36 +00: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
toasterbabe
c70661186a Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into flat_sprites
# Conflicts:
#	src/dehacked.c
#	src/p_inter.c
#	src/p_pspr.h
2016-09-27 18:11:20 +01:00
toasterbabe
28523760c3 FF_VERTICALFLIP, since I've been messing around with sprite stuff.
* flips the sprite ala MFE_VERTICALFLIP except you don't need to flip the direction of gravity for the object just to draw upside down
* stacks properly with reverse gravity
2016-09-24 14:23:00 +01:00
toasterbabe
b3b6d5c4f9 woops, renamed superwhite to supersilver during writing and forgot to change this comment 2016-08-10 19:54:07 +01:00