minecraft-in-24h-jam/scripts/scr_initialize/scr_initialize.gml

45 lines
882 B
Plaintext

/// @function scr_initialize();
/// @desc Preprocessor commands
#region macro definitions
#macro WINDOW_WIDTH 1280
#macro WINDOW_HEIGHT 720
#macro WINDOW_ASPECT 16 / 9
#macro CAMERA_ZNEAR 1
#macro CAMERA_ZFAR 2500
#macro CAMERA_FOV 60
#macro CAMERA_SENSITIVITY 10
#macro CAMERA_PITCH_MAX 85
#macro FOG_NEAR 800
#macro FOG_FAR 2000
#macro BLOCK_SIZE 64
#macro CHUNK_SIZE 16
#macro WORLD_SIZE 16
#macro BLOCKS_TEST 1
#macro CHUNKS_TEST 1
#endregion
gml_pragma( "global", "scr_initialize()" );
function scr_initialize() {
vertex_format_begin();
vertex_format_add_position_3d();
vertex_format_add_normal();
vertex_format_add_texcoord();
vertex_format_add_color();
global.vertex_format = vertex_format_end();
gpu_set_ztestenable( true );
gpu_set_zwriteenable( true );
global.fog = gpu_get_fog();
return 0;
}