#include "precompiled.h" #include "Matrix3D.h" #include "Renderer.h" #include "Terrain.h" #include "LightEnv.h" #include "HFTracer.h" #include "TextureManager.h" #include "ObjectManager.h" #include "Prometheus.h" #include "Hotkey.h" #include "ConfigDB.h" #include "sdl.h" #include "res/tex.h" #include "detect.h" #include "input.h" #include "lib.h" void InitScene (); void InitResources (); extern bool keys[512]; // SDL also defines non-ascii keys; 512 should be enough extern bool mouseButtons[5]; extern int mouse_x, mouse_y; extern bool g_active; CMatrix3D g_WorldMat; CLightEnv g_LightEnv; /*void InitScene () { // load terrain TexInfo ti; int err = tex_load("terrain.raw", &ti); if(err == 0) { int w = ti.w, h = ti.h; printf("terrain.raw: %dx%d\n", w, h); char* p = (char*)mem_get_ptr(ti.hm); u16 *p16=new u16[w*h]; u16 *p16p=p16; while (p16p < p16+(w*h)) *p16p++ = (*p++) << 8; g_Terrain.Resize(w/PATCH_SIZE); g_Terrain.SetHeightMap(p16); delete[] p16; tex_free(&ti); } // get default texture to apply to terrain CTextureEntry* texture=0; for (uint ii=0;iim_MiniPatches[j][i].Tex1=texture ? texture->GetHandle() :0; } } } } } */