mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 12:39:59 +00:00
- added missing module statements to certain source files
- a few minor fixes git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@126 ea6a568a-9f4f-0410-981a-c910a81bb256
This commit is contained in:
parent
393d284a8a
commit
6af42f48b3
@ -20,6 +20,8 @@
|
||||
|
||||
*/
|
||||
|
||||
module terrain.cachewriter;
|
||||
|
||||
import terrain.archive;
|
||||
|
||||
import terrain.outbuffer;
|
||||
|
@ -130,7 +130,8 @@ protected:
|
||||
{
|
||||
TRACE("Terrain frame");
|
||||
d_terr_terrainUpdate();
|
||||
g_baseLand->update();
|
||||
if(g_baseLand)
|
||||
g_baseLand->update();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@ -285,7 +286,7 @@ extern "C"
|
||||
|
||||
// Add the base land. This is the ground beneath the actual
|
||||
// terrain mesh that makes the terrain look infinite.
|
||||
g_baseLand = new BaseLand();
|
||||
//g_baseLand = new BaseLand();
|
||||
|
||||
g_alphaSize = d_terr_getAlphaSize();
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
*/
|
||||
|
||||
module terrain.myfile;
|
||||
|
||||
import std.stream;
|
||||
import std.stdio;
|
||||
|
||||
|
@ -28,6 +28,8 @@
|
||||
buffer to a stream in one operation.
|
||||
*/
|
||||
|
||||
module terrain.outbuffer;
|
||||
|
||||
import util.regions;
|
||||
import std.stream;
|
||||
|
||||
|
@ -60,20 +60,14 @@ void initTerrain(bool doGen)
|
||||
int Y = 0;
|
||||
bool next = false;
|
||||
|
||||
void doQuad(int x, int y, int lev)
|
||||
void doQuad(int x, int y, int lev, int diffx, int diffy)
|
||||
{
|
||||
if(!g_archive.hasQuad(x,y,lev))
|
||||
return;
|
||||
|
||||
int diffx = x-X;
|
||||
int diffy = y-Y;
|
||||
|
||||
diffx *= 8192;
|
||||
diffy *= 8192;
|
||||
|
||||
if(diffx == 0 && lev == 2)
|
||||
diffx = 8192 * 2;
|
||||
|
||||
auto node = terr_createChildNode(20000+diffx,-60000+diffy,null);
|
||||
auto info = g_archive.getQuad(x,y,lev);
|
||||
g_archive.mapQuad(info);
|
||||
@ -81,12 +75,14 @@ void initTerrain(bool doGen)
|
||||
terr_makeMesh(node, mi, info.level, TEX_SCALE);
|
||||
}
|
||||
|
||||
doQuad(X,Y,1);
|
||||
doQuad(X+1,Y,1);
|
||||
doQuad(X,Y+1,1);
|
||||
doQuad(X+1,Y+1,1);
|
||||
doQuad(X,Y,1, 0,0);
|
||||
doQuad(X+1,Y,1, 1,0);
|
||||
doQuad(X,Y+1,1, 0,1);
|
||||
doQuad(X+1,Y+1,1, 1,1);
|
||||
|
||||
doQuad(X + (next?2:0),Y,2);
|
||||
doQuad(X + (next?2:0),Y,2, 2,0);
|
||||
|
||||
doQuad(20,Y,3, 0,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user