Change background to another colour?

  • Herrr
    15th January Member 0 Permalink

    Can you change the black background to another colour?

    I'm trying to colour key the background in my editing software and the black background isn't me doing any favors.

    Edited once by Herrr. Last: 15th January
  • jacob1
    16th January Developer 0 Permalink
    No, you can't change the background color. The game looks pretty bad with any other color, a lot of the graphics assume black.

    There is one option though ...
  • Dragonrster
    17th January Member 0 Permalink
    In fact, you can change the following line in Renderer.cpp:
     
    void Renderer::Clear()
    {
    	if(displayMode & DISPLAY_PERS)
    	{
    		std::copy(persistentVideo.begin(), persistentVideo.end(), video.RowIterator({ 0, 0 }));
    	}
    	else
    	{
    		std::fill_n(video.data(), WINDOWW * YRES, 0);    //<---- Change 0 to 0x0000ff to make the background blue
    	}
    	AdjustHdispLimit();
    }
    Edited 2 times by Dragonrster. Last: 17th January
  • Herrr
    17th January Member 0 Permalink

    @Dragonrster (View Post)

    Oh neat, I was going to try to try my hand at reading the source but got afraid once I opened a random file and read setjmp & longjmp.

    https://github.com/The-Powder-Toy/The-Powder-Toy/blob/0e1af0dced1196e2f68bd5ddffe9534816672a86/src/Format.cpp#L153

     

    I'll give it a shot once I've compiled it.

    Edited 2 times by Herrr. Last: 17th January
  • jacob1
    18th January Developer 0 Permalink
    @Herrr (View Post)
    lol, you just picked a bad file to open is all. That's some libpng handling code. A little weird I guess.