|
From: rainbyte <rai...@us...> - 2012-07-17 10:48:43
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Feb 19 22:31:10 2012 +0200
Use black non-transparent placeholder texture instead of gray.
---
game/surface.cc | 3 ++-
game/surface.hh | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/game/surface.cc b/game/surface.cc
index fedf953..a25e2f6 100644
--- a/game/surface.cc
+++ b/game/surface.cc
@@ -115,8 +115,9 @@ struct Loader {
void updateSurfaces() { ldr.apply(); }
template <typename T> void loader(T* target, fs::path const& name) {
- // Temporarily add 1x1 pixel gray block
+ // Temporarily add 1x1 pixel black texture
Bitmap bitmap;
+ bitmap.fmt = pix::RGB;
bitmap.resize(1, 1);
target->load(bitmap);
// Ask the loader to retrieve the image
diff --git a/game/surface.hh b/game/surface.hh
index 1dc70fe..57a926e 100644
--- a/game/surface.hh
+++ b/game/surface.hh
@@ -171,7 +171,7 @@ struct Bitmap {
pix::Format fmt;
Bitmap(): width(), height(), ar(), fmt(pix::CHAR_RGBA) {}
void resize(unsigned w, unsigned h) {
- buf.resize(w * h * 4, 0x80);
+ buf.resize(w * h * 4);
width = w;
height = h;
ar = float(w) / h;
|