// Light.cpp : Light class // // 17.11.1998 / DH - Outsourced // 24.11.1998 / DH - Torch updated // // Copyright (c) 1998 Daniel Hartmeier. All rights reserved. #include "Light.hpp" #include #include // ------------------------------------------------------------------- Light::Light(int x, int y, int r, int g, int b, int radius, bool background) : x_(x), y_(y), r_(r), g_(g), b_(b), radius_(radius), background_(background) { } // ------------------------------------------------------------------- Light::~Light() { } // ------------------------------------------------------------------- void Torch::update() { step++; if (step > 3) { step = 0; delta = (rand() % 32) - 16; } else delta /= 2; set(br+delta, bg+delta, bb+delta); return; } // -------------------------------------------------------------------