//This part of the code up until the part created by IceX was created by Nils Daumann
//Paths
#define PRAGMA_PATH "Shaders"
#define PRAGMA_PATH "Scripts"
#define PRAGMA_PATH "Models"
#define PRAGMA_PATH "Textures"
#define PRAGMA_PATH "Bmaps"
//Includes
#include <acknex.h>
#include <default.c>
#include "Loading.c"
#include "InitShaders.c"
#include "Environments.c"
#include "Playermovement.c"
void main()
{
d3d_antialias = 9;
d3d_anisotropy = 16;
shadow_stencil = 0;
video_mode = 8;
video_screen = 1;
fps_max = 85;
preload_mode = 2;
//load the level and show a random loadscreen
//This is replaced by IceX generator
//LevelLoad(str_create("Test.wmb"), str_create("LoadScreen_"), str_create(".jpg"), 2);
}
/////////////////////////////////////////////
//Script generated by IceX 2.2 Editor////////
/////////////////////////////////////////////
//bitmaps wdl
//bmap detail_texture1=<icx_detail1.tga>;
//bmap detail_texture2=<icx_detail2.tga>;
//bmap detail_texture3=<icx_detail3.tga>;
//bmap detail_texture4=<icx_detail4.tga>;
//bitmaps c
BMAP* detail_texture1="icx_detail1.tga";
BMAP* detail_texture2="icx_detail2.tga";
BMAP* detail_texture3="icx_detail3.tga";
BMAP* detail_texture4="icx_detail4.tga";
//variables declaired this way in wdl
//var d3d_autotransparency = on;
//var d3d_mipmapping = 0;
//var shadow_stencil = 1;
//variables must be declaired in a function for LiteC
function ie_startup()
{
d3d_autotransparency = ON;
d3d_mipmapping = 0;
shadow_stencil = 1;
}
//defines
//functions
//function mtl_terrain_init()// ;<-delete; is an "event" function in LiteC
//material for terrain
MATERIAL* mtl_terrain = //was material not MATERIAL*
{
emissive_blue = 60;
emissive_red = 60;
emissive_green = 60;
ambient_blue = 255;
ambient_red = 255;
ambient_green = 255;
specular_blue = 0;
specular_red = 0;
specular_green = 0;
diffuse_blue = 120;
diffuse_red = 120;
diffuse_green = 120;
power = 1;
albedo = 15;
alpha = 100;
flags = enable_render, tangent;
skin1 = detail_texture1;
skin2 = detail_texture2;
skin3 = detail_texture3;
skin4 = detail_texture4;
event = mtl_terrain_init;
}
MATERIAL* mtl_ent_default = //was material not MATERIAL*
{
emissive_blue = 60;
emissive_red = 60;
emissive_green = 60;
ambient_blue = 80;
ambient_red = 80;
ambient_green = 80;
specular_blue = 0;
specular_red = 0;
specular_green = 0;
diffuse_blue = 120;
diffuse_red = 120;
diffuse_green = 120;
power = 1;
albedo = 15;
alpha = 100;
}
//initialising level
function init_level() // function was starter init_level()
{
level_load("TerrrainTest.wmb");
wait(2);
fog_color = 1;
camera.fog_start = 250;
camera.fog_end = 30000;
camera.clip_far = 45000;
effect_load(mtl_terrain, "mtl_multitex.fx");
bmap_to_mipmap(mtl_terrain.skin1);
bmap_to_mipmap(mtl_terrain.skin2);
bmap_to_mipmap(mtl_terrain.skin3);
bmap_to_mipmap(mtl_terrain.skin4);
}
//function for terrain material
function mtl_terrain_init() //did not have () at the end
{
//texture scale factors
mtl.skill1 = 0.030; //textur 1
}
action icx_terrain() //did not have()
{
my.material = mtl_terrain;
ent_fixnormals(my, 1);
c_updatehull(my, 1);
set(my,POLYGON); //was "my.polygon = 1;"
}