Skip to content

Draft: Secondcolor Implementation

Zachariah WW. requested to merge Snu/SRB2:secondcolor into next

This branch makes R_GenerateTranslationColormap do two separate translations, allowing for secondary colours on sprites.

srb21563

By default, the secondary translation used is the blue ramp. The cache that stores previous colormap translations was also updated by Lactozillo as to not take up too much memory when storing these translations.

Userdata structure additions:

  • mobj_t: color2 added (Meaning technically, this can work for custom objects!)
  • player_t: skincolor2 added, mostly mirrors the functionality of skincolor.

S_SKIN additions:

  • prefsecondcolor: Functionally similar to prefcolor, as it specifies the character's default secondary colour. If this isn't defined, the character should have NO secondary colour support!
  • startsecondcolor: Specifies the start of the 16 index ramp that'll be translated for skincolors, defaults to the start of the blue ramp. ! NOT YET IMPLEMENTED !

This branch is still a work in progress, stuff that needs to be done includes:

  • Implementation of startsecondcolor, allowing characters to choose what's remapped on their sprites.
  • Player Setup implementation, right now a player's secondary colour can only be modified with the console commands secondcolor and secondcolor2. (Requires DEVMODE in Singleplayer)
  • Potential fail-safes for skins with no prefsecondcolor defined in their S_SKIN definition.
  • Netgame testing, just to make sure everything's synced correctly.

Finally, here's a PK3 with each of the vanilla cast modified to have a secondary colour:secondcolor_test.pk3

It was a quick remap job done within SLADE, so Tails' mouth changes colour and Fang is just downright atrocious. Nonetheless, it'll work for testing this branch out!

Edited by Zachariah WW.

Merge request reports

Loading