public void item_init() { int T = Config.config_get_d(Config.CONFIG_TEXTURES); item_coin_file.sol_load_gl("item/coin/coin.sol", T, 0); item_grow_file.sol_load_gl("item/grow/grow.sol", T, 0); item_shrink_file.sol_load_gl("item/shrink/shrink.sol", T, 0); }
public static void ball_init() { int T = Config.config_get_d(Config.CONFIG_TEXTURES); string solid_file = Config.config_get_s(Config.CONFIG_BALL_FILE) + "-solid.sol"; solid_flags = 0; solid_alpha = 1.0f; if ((has_solid = solid.sol_load_gl(solid_file, T, 0)) != 0) { solid_flags = ball_opts(solid, ref solid_alpha); } }
public static int game_client_init(string file_name) { string back_name = null; string grad_name = null; int i; coins = 0; status = (int)GAME.GAME_NONE; if (client_state != 0) { game_client_free(); } if (file.sol_load_gl(file_name, Config.config_get_d(Config.CONFIG_TEXTURES), Config.config_get_d(Config.CONFIG_SHADOW)) == 0) { return(client_state = 0); } reflective = file.sol_reflective(); client_state = 1; game_common.game_tilt_init(tilt); // Initialize jump and goal states. jump_e = 1; jump_b = 0; goal_e = 0; goal_k = 0.0f; // Initialise the level, background, particles, fade, and view. fade_k = 1.0f; fade_d = -2.0f; version_x = 0; version_y = 0; for (i = 0; i < file.m_dc; i++) { string k = file.Get_av(file.m_dv[i].m_ai); string v = file.Get_av(file.m_dv[i].m_aj); if (string.Equals(k, "back")) { back_name = v; } if (string.Equals(k, "grad")) { grad_name = v; } if (string.Equals(k, "version")) { string[] parts = v.Split(new char[] { ' ', '.' }, StringSplitOptions.RemoveEmptyEntries); if (parts != null && parts.Length > 0) { version_x = int.Parse(parts[0], System.Globalization.CultureInfo.InvariantCulture); if (parts.Length > 1) { version_y = int.Parse(parts[1], System.Globalization.CultureInfo.InvariantCulture); } } } } // If the client map's version is 1, assume the map is compatible // with the server. This ensures that 1.5.0 replays don't trigger // bogus map compatibility warnings. (Post-1.5.0 replays will // have cmd_type.CMD_MAP override this.) game_compat_map = version_x == 1 ? 1 : 0; Part.part_reset(Config.GOAL_HEIGHT, Config.JUMP_HEIGHT); ups = 0; first_update = 1; Back.back_init(grad_name, Config.config_get_d(Config.CONFIG_GEOMETRY)); back.sol_load_gl(back_name, Config.config_get_d(Config.CONFIG_TEXTURES), 0); return(client_state); }