projects
/
tabakrolletjie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added a multiply transform to use on light fittings
[tabakrolletjie.git]
/
tabakrolletjie
/
lights.py
diff --git
a/tabakrolletjie/lights.py
b/tabakrolletjie/lights.py
index f1a69d69cdba4540cea2788a893bea63226c66e3..9f0005d1bb377e7fd3d49b663880feb6eba2d23e 100644
(file)
--- a/
tabakrolletjie/lights.py
+++ b/
tabakrolletjie/lights.py
@@
-12,6
+12,7
@@
from .constants import LIGHT_CATEGORY, FITTINGS_CATEGORY
from .rays import RayPolyManager
from .utils import DetailedTimer
from .loader import loader
from .rays import RayPolyManager
from .utils import DetailedTimer
from .loader import loader
+from .transforms import Multiply
LIGHT_FILTER = pymunk.ShapeFilter(
mask=pymunk.ShapeFilter.ALL_MASKS ^ (
LIGHT_FILTER = pymunk.ShapeFilter(
mask=pymunk.ShapeFilter.ALL_MASKS ^ (
@@
-203,9
+204,8
@@
class BaseLight(object):
def get_image(self):
if self._image is None:
def get_image(self):
if self._image is None:
- self._image = loader.load_image("64", self.FITTING_IMG).copy()
fitting_colour = self.COLOURS[self.colour]
fitting_colour = self.COLOURS[self.colour]
- self._image
.fill(fitting_colour, None, pgl.BLEND_RGBA_MULT
)
+ self._image
= loader.load_image("64", self.FITTING_IMG, transform=Multiply(colour=fitting_colour)
)
return self._image
def render_fitting(self, surface):
return self._image
def render_fitting(self, surface):