diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-10-21 18:05:06 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-10-21 18:05:06 +0000 |
| commit | 9acb3e5e713d1ab6b2312aa4cdc7946f85f875d0 (patch) | |
| tree | 93189cbe6fc70c2ca1b5e374a2114156d55e371a /src/game | |
| parent | 142b5ad5143ddcfc9d7fee2563bee753a968f011 (diff) | |
| download | zcatch-9acb3e5e713d1ab6b2312aa4cdc7946f85f875d0.tar.gz zcatch-9acb3e5e713d1ab6b2312aa4cdc7946f85f875d0.zip | |
continued on ban support. cleaned up settings a bit. reworked the datadir autodetection. introduced engine_openfile, engine_getpath and engine_listdir. never use fs_listdir or io_open directly
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/client/components/skins.cpp | 8 | ||||
| -rw-r--r-- | src/game/variables.hpp | 106 |
2 files changed, 61 insertions, 53 deletions
diff --git a/src/game/client/components/skins.cpp b/src/game/client/components/skins.cpp index b12bc1cf..0ce3d952 100644 --- a/src/game/client/components/skins.cpp +++ b/src/game/client/components/skins.cpp @@ -7,6 +7,12 @@ #include <base/math.hpp> #include <engine/e_client_interface.h> + +extern "C" +{ + #include <engine/e_engine.h> +} + #include "skins.hpp" SKINS::SKINS() @@ -119,7 +125,7 @@ void SKINS::init() { // load skins num_skins = 0; - fs_listdir("skins", skinscan, this); + engine_listdir("skins", skinscan, this); } int SKINS::num() diff --git a/src/game/variables.hpp b/src/game/variables.hpp index 6936a844..228418b3 100644 --- a/src/game/variables.hpp +++ b/src/game/variables.hpp @@ -1,71 +1,73 @@ /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ -MACRO_CONFIG_INT(cl_predict, 1, 0, 1) -MACRO_CONFIG_INT(cl_nameplates, 0, 0, 1) -MACRO_CONFIG_INT(cl_nameplates_always, 0, 0, 1) -MACRO_CONFIG_INT(cl_autoswitch_weapons, 0, 0, 1) -MACRO_CONFIG_INT(cl_showfps, 0, 0, 1) -MACRO_CONFIG_INT(cl_airjumpindicator, 1, 0, 1) -MACRO_CONFIG_INT(cl_threadsoundloading, 0, 0, 1) +/* client */ +MACRO_CONFIG_INT(cl_predict, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Predict client movements") +MACRO_CONFIG_INT(cl_nameplates, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show nameplates") +MACRO_CONFIG_INT(cl_nameplates_always, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Always show nameplats disregarding of distance") +MACRO_CONFIG_INT(cl_autoswitch_weapons, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Auto switch weapon on pickup") +MACRO_CONFIG_INT(cl_showfps, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame FPS counter") -MACRO_CONFIG_INT(cl_warning_tuning, 1, 0, 1) -MACRO_CONFIG_INT(cl_warning_teambalance, 1, 0, 1) +MACRO_CONFIG_INT(cl_airjumpindicator, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "") +MACRO_CONFIG_INT(cl_threadsoundloading, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "") -MACRO_CONFIG_INT(cl_mouse_deadzone, 300, 0, 0) -MACRO_CONFIG_INT(cl_mouse_followfactor, 60, 0, 200) -MACRO_CONFIG_INT(cl_mouse_max_distance, 800, 0, 0) -MACRO_CONFIG_INT(cl_layershot, 0, 0, 1) +MACRO_CONFIG_INT(cl_warning_tuning, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Warn about tuned servers") +MACRO_CONFIG_INT(cl_warning_teambalance, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Warn about team balance") -MACRO_CONFIG_INT(ed_showkeys, 0, 0, 1) +MACRO_CONFIG_INT(cl_mouse_deadzone, 300, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "") +MACRO_CONFIG_INT(cl_mouse_followfactor, 60, 0, 200, CFGFLAG_CLIENT|CFGFLAG_SAVE, "") +MACRO_CONFIG_INT(cl_mouse_max_distance, 800, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "") -MACRO_CONFIG_INT(cl_flow, 0, 0, 1) +MACRO_CONFIG_INT(ed_showkeys, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "") -MACRO_CONFIG_INT(cl_show_welcome, 1, 0, 1) -MACRO_CONFIG_INT(cl_motd_time, 10, 0, 100) +MACRO_CONFIG_INT(cl_flow, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "") -MACRO_CONFIG_STR(cl_version_server, 100, "version.teeworlds.com") +MACRO_CONFIG_INT(cl_show_welcome, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "") +MACRO_CONFIG_INT(cl_motd_time, 10, 0, 100, CFGFLAG_CLIENT|CFGFLAG_SAVE, "How long to show the server message of the day") -MACRO_CONFIG_INT(player_use_custom_color, 0, 0, 1) -MACRO_CONFIG_INT(player_color_body, 65408, 0, 0) -MACRO_CONFIG_INT(player_color_feet, 65408, 0, 0) -MACRO_CONFIG_STR(player_skin, 64, "default") +MACRO_CONFIG_STR(cl_version_server, 100, "version.teeworlds.com", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Server to use to check for new versions") -MACRO_CONFIG_INT(dbg_dummies, 0, 0, 15) -MACRO_CONFIG_INT(dbg_firedelay, 0, 0, 1) -MACRO_CONFIG_INT(dbg_flow, 0, 0, 1) -MACRO_CONFIG_INT(dbg_tuning, 0, 0, 1) -MACRO_CONFIG_INT(dbg_focus, 0, 0, 1) +MACRO_CONFIG_INT(player_use_custom_color, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toggles usage of custom colors") +MACRO_CONFIG_INT(player_color_body, 65408, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player body color") +MACRO_CONFIG_INT(player_color_feet, 65408, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player feet color") +MACRO_CONFIG_STR(player_skin, 64, "default", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Player skin") -MACRO_CONFIG_INT(ui_page, 5, 0, 9) -MACRO_CONFIG_STR(ui_server_address, 128, "localhost:8303") -MACRO_CONFIG_INT(ui_scale, 100, 1, 100000) +MACRO_CONFIG_INT(ui_page, 5, 0, 9, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface page") +MACRO_CONFIG_STR(ui_server_address, 128, "localhost:8303", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface server address") +MACRO_CONFIG_INT(ui_scale, 100, 1, 100000, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface scale") -MACRO_CONFIG_INT(ui_color_hue, 160, 0, 255) -MACRO_CONFIG_INT(ui_color_sat, 70, 0, 255) -MACRO_CONFIG_INT(ui_color_lht, 175, 0, 255) -MACRO_CONFIG_INT(ui_color_alpha, 228, 0, 255) +MACRO_CONFIG_INT(ui_color_hue, 160, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color hue") +MACRO_CONFIG_INT(ui_color_sat, 70, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color saturation") +MACRO_CONFIG_INT(ui_color_lht, 175, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color lightness") +MACRO_CONFIG_INT(ui_color_alpha, 228, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface alpha") +/* server */ +MACRO_CONFIG_INT(sv_warmup, 0, 0, 0, CFGFLAG_SERVER, "Number of seconds to do warpup before round starts") +MACRO_CONFIG_STR(sv_motd, 900, "", CFGFLAG_SERVER, "Message of the day to display for the clients") +MACRO_CONFIG_INT(sv_teamdamage, 0, 0, 1, CFGFLAG_SERVER, "Team damage") +MACRO_CONFIG_STR(sv_maprotation, 768, "", CFGFLAG_SERVER, "Maps to rotate between") +MACRO_CONFIG_STR(sv_maplist, 768, "", CFGFLAG_SERVER, "List of maps that players can vote on") +MACRO_CONFIG_INT(sv_rounds_per_map, 1, 1, 100, CFGFLAG_SERVER, "Number of rounds on each map before rotating") +MACRO_CONFIG_INT(sv_powerups, 1, 0, 1, CFGFLAG_SERVER, "Allow powerups like ninja") +MACRO_CONFIG_INT(sv_scorelimit, 20, 0, 1000, CFGFLAG_SERVER, "Score limit (0 disables)") +MACRO_CONFIG_INT(sv_timelimit, 0, 0, 1000, CFGFLAG_SERVER, "Time limit in minutes (0 disables)") +MACRO_CONFIG_STR(sv_gametype, 32, "dm", CFGFLAG_SERVER, "Game type (dm, tdm, ctf)") +MACRO_CONFIG_INT(sv_tournament_mode, 0, 0, 1, CFGFLAG_SERVER, "Tournament mode. When enabled, players joins the server as spectator") +MACRO_CONFIG_INT(sv_spamprotection, 1, 0, 1, CFGFLAG_SERVER, "Spam protection") -MACRO_CONFIG_INT(sv_warmup, 0, 0, 0) -MACRO_CONFIG_STR(sv_motd, 900, "") -MACRO_CONFIG_INT(sv_teamdamage, 0, 0, 1) -MACRO_CONFIG_STR(sv_maprotation, 768, "") -MACRO_CONFIG_STR(sv_maplist, 768, "") -MACRO_CONFIG_INT(sv_rounds_per_map, 1, 1, 100) -MACRO_CONFIG_INT(sv_powerups, 1, 0, 1) -MACRO_CONFIG_INT(sv_scorelimit, 20, 0, 1000) -MACRO_CONFIG_INT(sv_timelimit, 0, 0, 1000) -MACRO_CONFIG_STR(sv_gametype, 32, "dm") -MACRO_CONFIG_INT(sv_tournament_mode, 0, 0, 1) -MACRO_CONFIG_INT(sv_spamprotection, 1, 0, 1) +MACRO_CONFIG_INT(sv_spectator_slots, 0, 0, 12, CFGFLAG_SERVER, "Number of slots to reserve for spectators") +MACRO_CONFIG_INT(sv_teambalance_time, 1, 0, 1000, CFGFLAG_SERVER, "How many minutes to wait before autobalancing teams") -MACRO_CONFIG_INT(sv_spectator_slots, 0, 0, 12) -MACRO_CONFIG_INT(sv_teambalance_time, 1, 0, 1000) +MACRO_CONFIG_INT(sv_vote_map, 1, 0, 1, CFGFLAG_SERVER, "Allow voting to change map. (see sv_maplist)") +MACRO_CONFIG_INT(sv_vote_kick, 1, 0, 1, CFGFLAG_SERVER, "Allow voting to kick players") +MACRO_CONFIG_INT(sv_vote_scorelimit, 0, 0, 1, CFGFLAG_SERVER, "Allow voting to change score limit") +MACRO_CONFIG_INT(sv_vote_timelimit, 0, 0, 1, CFGFLAG_SERVER, "Allow voting to change time limit") -MACRO_CONFIG_INT(sv_vote_map, 1, 0, 1) -MACRO_CONFIG_INT(sv_vote_kick, 1, 0, 1) -MACRO_CONFIG_INT(sv_vote_scorelimit, 0, 0, 1) -MACRO_CONFIG_INT(sv_vote_timelimit, 0, 0, 1) +/* debug */ +MACRO_CONFIG_INT(dbg_dummies, 0, 0, 15, CFGFLAG_SERVER, "") +MACRO_CONFIG_INT(dbg_firedelay, 0, 0, 1, CFGFLAG_CLIENT, "") +MACRO_CONFIG_INT(dbg_flow, 0, 0, 1, CFGFLAG_CLIENT, "") +MACRO_CONFIG_INT(dbg_tuning, 0, 0, 1, CFGFLAG_CLIENT, "") +MACRO_CONFIG_INT(dbg_focus, 0, 0, 1, CFGFLAG_CLIENT, "") |