If I wanted...

  • Neospector
    2nd Apr 2011 Member 0 Permalink
    ...the code to select all particles except the following:
    PT_FIRE
    PT_URAN
    PT_PLUT
    PT_PLSM
    PT_PHOT
    PT_LAVA
    PT_NEUT
    PT_CFLM
    PT_SPRK

    Making those particles appear white (color code: FFFFFF) while others appear black (color code: 000000) what would I put?
    Edit: Oh and in case you're wondering it's for a basic nightime display, thanks!
  • HeyJD
    2nd Apr 2011 Member 0 Permalink
    if (daynight == 1)
    {
    for(i=0; i<NPART; i++)
    {
    if(parts[i].type != PT_FIRE)
    {
    blendpixel(vid_buf, parts[i].x, parts[i].y, 255, 255, 255, 255);
    }
    else
    {
    blendpixel(vid_buf, parts[i].x, parts[i].y, 0, 0, 0, 255);
    }
    }
    }


    And from there you can probably work out how to make it not do it to the other elements apart from PT_FIRE

    Edit: Edited the code.
  • Neospector
    2nd Apr 2011 Member 0 Permalink
    @HeyJD
    Well actually it's a powder toy display entitled CM_DARK, would I just replace the:
    if (daynight == 1)
    With:
    if (CM_DARK == 1)?
  • HeyJD
    2nd Apr 2011 Member 0 Permalink
    @Neospector
    No, if you wanted to do that it's
    if (cmode==CM_FIRE)

    But I haven't tried anything with display modes yet so I'm not certain it will work.
  • Neospector
    2nd Apr 2011 Member 0 Permalink
    @HeyJD
    Ok I'll try next chance I get.
    All I'm not sure is if I got all the lines that need to have the display on it. I mean, if this kicks off all I do is copy the glow code and instant nighttime mode.
    image