summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-13 16:35:02 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-13 16:35:02 -0400
commit5990e7802c84b3f407de3934a1d75721115d1da7 (patch)
tree2702e729b96a83cc2d58ee27304926d1dedae0f7
parentbdf50ff543c73c83cc7a06426bc2a6fe66616b87 (diff)
downloadtherapy-5990e7802c84b3f407de3934a1d75721115d1da7.tar.gz
therapy-5990e7802c84b3f407de3934a1d75721115d1da7.tar.bz2
therapy-5990e7802c84b3f407de3934a1d75721115d1da7.zip
Fixed bug with blitting transparent textures
Also moved player in front of checkpoint
-rw-r--r--shaders/blit.fragment3
-rw-r--r--src/game.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/shaders/blit.fragment b/shaders/blit.fragment index 2d412c0..d2e9e46 100644 --- a/shaders/blit.fragment +++ b/shaders/blit.fragment
@@ -9,5 +9,6 @@ uniform float alpha;
9 9
10void main() 10void main()
11{ 11{
12 color = vec4(texture(srctex, UV).rgb, alpha); 12 vec4 texmex = texture(srctex, UV);
13 color = vec4(texmex.rgb, alpha * texmex.a);
13} 14}
diff --git a/src/game.cpp b/src/game.cpp index e2c1b9c..b149392 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -118,7 +118,6 @@ void Game::loadMap(const Map& map)
118 118
119 nextEntities.clear(); 119 nextEntities.clear();
120 nextEntities.push_back(mapEn); 120 nextEntities.push_back(mapEn);
121 nextEntities.push_back(player);
122 121
123 // this is cheating but is just for testing 122 // this is cheating but is just for testing
124 if (&map == &m2) 123 if (&map == &m2)
@@ -143,6 +142,8 @@ void Game::loadMap(const Map& map)
143 nextEntities.push_back(saveEn); 142 nextEntities.push_back(saveEn);
144 } 143 }
145 144
145 nextEntities.push_back(player);
146
146 newWorld = true; 147 newWorld = true;
147} 148}
148 149