Ambrosia Garden Archive
    • Paint Station Prime


      I am looking over the Modvals in Paint Station Prime 1.0.4, trying to update it, and I noticed that some paint modvals are negative. It seems to be the same modval for the color I found in Nova Paint, except it's negative. Does the negative do anything special?

      ------------------

    • Negative numbers usually mean the command is ignored.
      But i'm not sure.

      ------------------
      (url="http://"http://www.cookiethievery.com/old/042604/")http://www.cookiethi...com/old/042604/(/url)

    • Quote

      Originally posted by MATTYBE:
      **Negative numbers usually mean the command is ignored.
      But i'm not sure.

      **

      In certain resources they dont 😛

      ------------------

    • In that cause they'd be 0 😄

      jk.

      ------------------
      (url="http://"http://www.cookiethievery.com/old/042604/")http://www.cookiethi...com/old/042604/(/url)

    • Quote

      Originally posted by MATTYBE:
      **In that cause they'd be 0:D

      jk.

      **

      xD

      ------------------

    • Quote

      Originally posted by Xizzix:
      **I am looking over the Modvals in Paint Station Prime 1.0.4, trying to update it, and I noticed that some paint modvals are negative. It seems to be the same modval for the color I found in Nova Paint, except it's negative. Does the negative do anything special?
      **

      Short answer- No, negative paint numbers don't do anything different.

      Long answer-
      The Nova Bible states: **
      (ModType)43 paint
      the color to paint the player's ship, encoded as a 15-bit color value, where the bits are: 0RRRRRGGGGGBBBBB (this is necessary because the ModVal field isn't big enough to hold a 32-bit HTML color value)**

      It's that high-order 16th bit that should have been set to zero (but wasn't) that causes the negative numbers. However the original color values were derived, the 16th bit didn't get cleared to zero, so the negative numbers show up in the plug.

      According to notes I made a when AAC first posted the original plug, here are the equivalent positive values for the negative ones:
      -31073 + 32768 = 1695 LightBlue
      -3136 + 32768 = 29632 Yellow
      -10087 + 32768 = 22681 Purple
      -5998 + 32768 = 26770 Pink
      -19017 + 32768 = 13751 Grey

      And finally, the general algorithm for determining the paint ModVal decimal integer is as follows:

      ModVal = (Integer(red% * 31) * 1024) + (Integer(green% * 31) * 32) + (Integer(blue% * 31) * 1)

    • Thanks, Arturo. That clears things up.

      ------------------