Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 6 files changed
  • 0 comments
  • 1 contributor
Feb 16, 2013
Per Inge Mathisen perim Do not bother setting glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, …
…GL_MODULATE)

repeatedly, since this is the default value, and we never set it to any other value.
2b82a1e
Per Inge Mathisen perim qtscript: Fix crash bug in findResearch(), if number of requirements …
…is higher

than max number of players. Found by forum member Duha.
08567be
1  lib/ivis_opengl/pieblitfunc.cpp
@@ -373,7 +373,6 @@ void pie_DownLoadRadar(UDWORD *buffer, int width, int height, bool filter)
373 373 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, black);
374 374 free(black);
375 375 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
376   - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
377 376 if (filter)
378 377 {
379 378 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
2  lib/ivis_opengl/screen.cpp
@@ -286,7 +286,6 @@ void screen_SetBackDropFromFile(const char* filename)
286 286 glBindTexture(GL_TEXTURE_2D, backDropTexture);
287 287 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width, image.height,
288 288 0, iV_getPixelFormat(&image), GL_UNSIGNED_BYTE, image.bmp);
289   - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
290 289 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
291 290 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
292 291 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
@@ -399,7 +398,6 @@ void screen_Upload(const char *newBackDropBmp)
399 398 pie_SetTexturePage(TEXPAGE_EXTERN);
400 399 glBindTexture(GL_TEXTURE_2D, backDropTexture);
401 400 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, BACKDROP_HACK_WIDTH, BACKDROP_HACK_HEIGHT, 0, GL_RGB, GL_UNSIGNED_BYTE, newBackDropBmp);
402   - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
403 401 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
404 402 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
405 403
2  lib/ivis_opengl/tex.cpp
@@ -165,8 +165,6 @@ int pie_AddTexPage(iV_Image *s, const char* filename, int slot, int maxTextureSi
165 165 minfilter = GL_LINEAR;
166 166 }
167 167
168   - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
169   -
170 168 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minfilter);
171 169 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
172 170
5 src/qtscriptfuncs.cpp
@@ -1180,7 +1180,7 @@ static QScriptValue js_activateStructure(QScriptContext *context, QScriptEngine
1180 1180 }
1181 1181
1182 1182 //-- \subsection{findResearch(research)}
1183   -//-- Return list of research items remaining to research for the given research item. (3.2+ only)
  1183 +//-- Return list of research items remaining to be researched for the given research item. (3.2+ only)
1184 1184 static QScriptValue js_findResearch(QScriptContext *context, QScriptEngine *engine)
1185 1185 {
1186 1186 QList<RESEARCH *> list;
@@ -1193,6 +1193,7 @@ static QScriptValue js_findResearch(QScriptContext *context, QScriptEngine *engi
1193 1193 {
1194 1194 return engine->newArray(0); // return empty array
1195 1195 }
  1196 + debug(LOG_SCRIPT, "Find reqs for %s for player %d", resName.toUtf8().constData(), player);
1196 1197 // Go down the requirements list for the desired tech
1197 1198 QList<RESEARCH *> reslist;
1198 1199 RESEARCH *cur = psTarget;
@@ -1222,7 +1223,7 @@ static QScriptValue js_findResearch(QScriptContext *context, QScriptEngine *engi
1222 1223 QScriptValue retval = engine->newArray(list.size());
1223 1224 for (int i = 0; i < list.size(); i++)
1224 1225 {
1225   - retval.setProperty(i, convResearch(list[i], engine, i));
  1226 + retval.setProperty(i, convResearch(list[i], engine, player));
1226 1227 }
1227 1228 return retval;
1228 1229 }
2  src/terrain.cpp
@@ -1268,7 +1268,6 @@ void drawTerrain(void)
1268 1268
1269 1269 glEnableClientState(GL_VERTEX_ARRAY);
1270 1270 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, textureIndexVBO); glError();
1271   - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
1272 1271
1273 1272 // load the vertex (geometry) buffer
1274 1273 glBindBuffer(GL_ARRAY_BUFFER, geometryVBO);
@@ -1436,7 +1435,6 @@ void drawWater(void)
1436 1435 glBindTexture(GL_TEXTURE_2D, pie_Texture(iV_GetTexture("page-81")));
1437 1436 glError();
1438 1437 glEnable(GL_TEXTURE_2D);
1439   - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
1440 1438 glEnable(GL_TEXTURE_GEN_S); glError();
1441 1439 glEnable(GL_TEXTURE_GEN_T); glError();
1442 1440 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
1  src/texture.cpp
@@ -91,7 +91,6 @@ static int newPage(const char *name, int level, int width, int height, int count
91 91 // debug(LOG_TEXTURE, "newPage: glTexImage2D(page=%d, level=%d) opengl id=%u", texPage, level, _TEX_PAGE[texPage].id);
92 92 glTexImage2D(GL_TEXTURE_2D, level, wz_texture_compression, width, height, 0,
93 93 GL_RGBA, GL_UNSIGNED_BYTE, NULL);
94   - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
95 94 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
96 95 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
97 96 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);

No commit comments for this range

Something went wrong with that request. Please try again.