|
@@ -167,8 +167,8 @@ void Render::setMode(int n) {
|
167
|
167
|
break;
|
168
|
168
|
case Render::modeSolid:
|
169
|
169
|
case Render::modeWireframe:
|
170
|
|
- glClearColor(PURPLE[0] * 256.0f, PURPLE[1] * 256.0f,
|
171
|
|
- PURPLE[2] * 256.0f, PURPLE[3] * 256.0f);
|
|
170
|
+ glClearColor(PURPLE[0] / 256.0f, PURPLE[1] / 256.0f,
|
|
171
|
+ PURPLE[2] / 256.0f, PURPLE[3] / 256.0f);
|
172
|
172
|
glDisable(GL_TEXTURE_2D);
|
173
|
173
|
break;
|
174
|
174
|
default:
|
|
@@ -178,7 +178,8 @@ void Render::setMode(int n) {
|
178
|
178
|
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
179
|
179
|
}
|
180
|
180
|
|
181
|
|
- glClearColor(BLACK[0], BLACK[1], BLACK[2], BLACK[3]);
|
|
181
|
+ glClearColor(BLACK[0] / 256.0f, BLACK[1] / 256.0f,
|
|
182
|
+ BLACK[2] / 256.0f, BLACK[3] / 256.0f);
|
182
|
183
|
|
183
|
184
|
glEnable(GL_TEXTURE_2D);
|
184
|
185
|
}
|
|
@@ -378,16 +379,13 @@ void Render::drawLoadScreen() {
|
378
|
379
|
}
|
379
|
380
|
|
380
|
381
|
void Render::newRoomRenderList(int index) {
|
|
382
|
+ assert(index >= 0);
|
|
383
|
+
|
381
|
384
|
static int currentRoomId = -1;
|
382
|
385
|
|
383
|
|
- if (index == -1) { // -1 is error, so draw room 0, for the hell of it
|
384
|
|
- mRoomRenderList.clear();
|
385
|
|
- mRoomRenderList.push_back(&getWorld().getRoom(0));
|
386
|
|
- } else {
|
387
|
|
- // Update room render list if needed
|
388
|
|
- if (currentRoomId != index) {
|
389
|
|
- buildRoomRenderList(getWorld().getRoom(index));
|
390
|
|
- }
|
|
386
|
+ // Update room render list if needed
|
|
387
|
+ if (currentRoomId != index) {
|
|
388
|
+ buildRoomRenderList(getWorld().getRoom(index));
|
391
|
389
|
}
|
392
|
390
|
|
393
|
391
|
currentRoomId = index;
|