21 |
21 |
22 const uint32_t flib_teamcolors[] = HW_TEAMCOLOR_ARRAY; |
22 const uint32_t flib_teamcolors[] = HW_TEAMCOLOR_ARRAY; |
23 const size_t flib_teamcolor_count = sizeof(flib_teamcolors)/sizeof(uint32_t)-1; |
23 const size_t flib_teamcolor_count = sizeof(flib_teamcolors)/sizeof(uint32_t)-1; |
24 |
24 |
25 static const flib_metascheme_setting metaSchemeSettings[] = { |
25 static const flib_metascheme_setting metaSchemeSettings[] = { |
26 { .name = "damagefactor", .times1000 = false, .engineCommand = "e$damagepct", .maxMeansInfinity = false, .min = 10, .max = 300, .def = 100 }, |
26 { .name = "damagefactor", .times1000 = false, .engineCommand = "e$damagepct", .maxMeansInfinity = false, .min = 10, .max = 300, .def = 100 }, |
27 { .name = "turntime", .times1000 = true, .engineCommand = "e$turntime", .maxMeansInfinity = true, .min = 1, .max = 9999, .def = 45 }, |
27 { .name = "turntime", .times1000 = true, .engineCommand = "e$turntime", .maxMeansInfinity = true, .min = 1, .max = 9999, .def = 45 }, |
28 { .name = "health", .times1000 = false, .engineCommand = NULL, .maxMeansInfinity = false, .min = 50, .max = 200, .def = 100 }, |
28 { .name = "health", .times1000 = false, .engineCommand = NULL, .maxMeansInfinity = false, .min = 50, .max = 200, .def = 100 }, |
29 { .name = "suddendeath", .times1000 = false, .engineCommand = "e$sd_turns", .maxMeansInfinity = true, .min = 0, .max = 50, .def = 15 }, |
29 { .name = "suddendeath", .times1000 = false, .engineCommand = "e$sd_turns", .maxMeansInfinity = true, .min = 0, .max = 50, .def = 15 }, |
30 { .name = "caseprobability", .times1000 = false, .engineCommand = "e$casefreq", .maxMeansInfinity = false, .min = 0, .max = 9, .def = 5 }, |
30 { .name = "caseprobability", .times1000 = false, .engineCommand = "e$casefreq", .maxMeansInfinity = false, .min = 0, .max = 9, .def = 5 }, |
31 { .name = "minestime", .times1000 = true, .engineCommand = "e$minestime", .maxMeansInfinity = false, .min = -1, .max = 5, .def = 3 }, |
31 { .name = "minestime", .times1000 = true, .engineCommand = "e$minestime", .maxMeansInfinity = false, .min = -1, .max = 5, .def = 3 }, |
32 { .name = "minesnum", .times1000 = false, .engineCommand = "e$minesnum", .maxMeansInfinity = false, .min = 0, .max = 80, .def = 4 }, |
32 { .name = "minesnum", .times1000 = false, .engineCommand = "e$minesnum", .maxMeansInfinity = false, .min = 0, .max = 80, .def = 4 }, |
33 { .name = "minedudpct", .times1000 = false, .engineCommand = "e$minedudpct", .maxMeansInfinity = false, .min = 0, .max = 100, .def = 0 }, |
33 { .name = "minedudpct", .times1000 = false, .engineCommand = "e$minedudpct", .maxMeansInfinity = false, .min = 0, .max = 100, .def = 0 }, |
34 { .name = "explosives", .times1000 = false, .engineCommand = "e$explosives", .maxMeansInfinity = false, .min = 0, .max = 40, .def = 2 }, |
34 { .name = "explosives", .times1000 = false, .engineCommand = "e$explosives", .maxMeansInfinity = false, .min = 0, .max = 40, .def = 2 }, |
35 { .name = "healthprobability", .times1000 = false, .engineCommand = "e$healthprob", .maxMeansInfinity = false, .min = 0, .max = 100, .def = 35 }, |
35 { .name = "healthprobability", .times1000 = false, .engineCommand = "e$healthprob", .maxMeansInfinity = false, .min = 0, .max = 100, .def = 35 }, |
36 { .name = "healthcaseamount", .times1000 = false, .engineCommand = "e$hcaseamount", .maxMeansInfinity = false, .min = 0, .max = 200, .def = 25 }, |
36 { .name = "healthcaseamount", .times1000 = false, .engineCommand = "e$hcaseamount", .maxMeansInfinity = false, .min = 0, .max = 200, .def = 25 }, |
37 { .name = "waterrise", .times1000 = false, .engineCommand = "e$waterrise", .maxMeansInfinity = false, .min = 0, .max = 100, .def = 47 }, |
37 { .name = "waterrise", .times1000 = false, .engineCommand = "e$waterrise", .maxMeansInfinity = false, .min = 0, .max = 100, .def = 47 }, |
38 { .name = "healthdecrease", .times1000 = false, .engineCommand = "e$healthdec", .maxMeansInfinity = false, .min = 0, .max = 100, .def = 5 }, |
38 { .name = "healthdecrease", .times1000 = false, .engineCommand = "e$healthdec", .maxMeansInfinity = false, .min = 0, .max = 100, .def = 5 }, |
39 { .name = "ropepct", .times1000 = false, .engineCommand = "e$ropepct", .maxMeansInfinity = false, .min = 25, .max = 999, .def = 100 }, |
39 { .name = "ropepct", .times1000 = false, .engineCommand = "e$ropepct", .maxMeansInfinity = false, .min = 25, .max = 999, .def = 100 }, |
40 { .name = "getawaytime", .times1000 = false, .engineCommand = "e$getawaytime", .maxMeansInfinity = false, .min = 0, .max = 999, .def = 100 } |
40 { .name = "getawaytime", .times1000 = false, .engineCommand = "e$getawaytime", .maxMeansInfinity = false, .min = 0, .max = 999, .def = 100 } |
41 }; |
41 }; |
42 |
42 |
43 static const flib_metascheme_mod metaSchemeMods[] = { |
43 static const flib_metascheme_mod metaSchemeMods[] = { |
44 { .name = "fortsmode", .bitmaskIndex = 12 }, |
44 { .name = "fortsmode", .bitmaskIndex = 12 }, |
45 { .name = "divteams", .bitmaskIndex = 4 }, |
45 { .name = "divteams", .bitmaskIndex = 4 }, |
46 { .name = "solidland", .bitmaskIndex = 2 }, |
46 { .name = "solidland", .bitmaskIndex = 2 }, |
47 { .name = "border", .bitmaskIndex = 3 }, |
47 { .name = "border", .bitmaskIndex = 3 }, |
48 { .name = "lowgrav", .bitmaskIndex = 5 }, |
48 { .name = "lowgrav", .bitmaskIndex = 5 }, |
49 { .name = "laser", .bitmaskIndex = 6 }, |
49 { .name = "laser", .bitmaskIndex = 6 }, |
50 { .name = "invulnerability", .bitmaskIndex = 7 }, |
50 { .name = "invulnerability", .bitmaskIndex = 7 }, |
51 { .name = "resethealth", .bitmaskIndex = 8 }, |
51 { .name = "resethealth", .bitmaskIndex = 8 }, |
52 { .name = "vampiric", .bitmaskIndex = 9 }, |
52 { .name = "vampiric", .bitmaskIndex = 9 }, |
53 { .name = "karma", .bitmaskIndex = 10 }, |
53 { .name = "karma", .bitmaskIndex = 10 }, |
54 { .name = "artillery", .bitmaskIndex = 11 }, |
54 { .name = "artillery", .bitmaskIndex = 11 }, |
55 { .name = "randomorder", .bitmaskIndex = 13 }, |
55 { .name = "randomorder", .bitmaskIndex = 13 }, |
56 { .name = "king", .bitmaskIndex = 14 }, |
56 { .name = "king", .bitmaskIndex = 14 }, |
57 { .name = "placehog", .bitmaskIndex = 15 }, |
57 { .name = "placehog", .bitmaskIndex = 15 }, |
58 { .name = "sharedammo", .bitmaskIndex = 16 }, |
58 { .name = "sharedammo", .bitmaskIndex = 16 }, |
59 { .name = "disablegirders", .bitmaskIndex = 17 }, |
59 { .name = "disablegirders", .bitmaskIndex = 17 }, |
60 { .name = "disablelandobjects", .bitmaskIndex = 18 }, |
60 { .name = "disablelandobjects", .bitmaskIndex = 18 }, |
61 { .name = "aisurvival", .bitmaskIndex = 19 }, |
61 { .name = "aisurvival", .bitmaskIndex = 19 }, |
62 { .name = "infattack", .bitmaskIndex = 20 }, |
62 { .name = "infattack", .bitmaskIndex = 20 }, |
63 { .name = "resetweps", .bitmaskIndex = 21 }, |
63 { .name = "resetweps", .bitmaskIndex = 21 }, |
64 { .name = "perhogammo", .bitmaskIndex = 22 }, |
64 { .name = "perhogammo", .bitmaskIndex = 22 }, |
65 { .name = "disablewind", .bitmaskIndex = 23 }, |
65 { .name = "disablewind", .bitmaskIndex = 23 }, |
66 { .name = "morewind", .bitmaskIndex = 24 }, |
66 { .name = "morewind", .bitmaskIndex = 24 }, |
67 { .name = "tagteam", .bitmaskIndex = 25 }, |
67 { .name = "tagteam", .bitmaskIndex = 25 }, |
68 { .name = "bottomborder", .bitmaskIndex = 26 } |
68 { .name = "bottomborder", .bitmaskIndex = 26 } |
69 }; |
69 }; |
70 |
70 |
71 const flib_metascheme flib_meta = { |
71 const flib_metascheme flib_meta = { |
72 .settingCount = sizeof(metaSchemeSettings)/sizeof(flib_metascheme_setting), |
72 .settingCount = sizeof(metaSchemeSettings)/sizeof(flib_metascheme_setting), |
73 .modCount = sizeof(metaSchemeMods)/sizeof(flib_metascheme_mod), |
73 .modCount = sizeof(metaSchemeMods)/sizeof(flib_metascheme_mod), |
74 .settings = metaSchemeSettings, |
74 .settings = metaSchemeSettings, |
75 .mods = metaSchemeMods |
75 .mods = metaSchemeMods |
76 }; |
76 }; |
77 |
77 |
78 uint32_t flib_get_teamcolor(int colorIndex) { |
78 uint32_t flib_get_teamcolor(int colorIndex) { |
79 if(colorIndex>=0 && colorIndex < flib_teamcolor_count) { |
79 if(colorIndex>=0 && colorIndex < flib_teamcolor_count) { |
80 return flib_teamcolors[colorIndex]; |
80 return flib_teamcolors[colorIndex]; |
81 } else { |
81 } else { |
82 return 0; |
82 return 0; |
83 } |
83 } |
84 } |
84 } |
85 |
85 |
86 int flib_get_teamcolor_count() { |
86 int flib_get_teamcolor_count() { |
87 return flib_teamcolor_count; |
87 return flib_teamcolor_count; |
88 } |
88 } |
89 |
89 |
90 int flib_get_hedgehogs_per_team() { |
90 int flib_get_hedgehogs_per_team() { |
91 return HEDGEHOGS_PER_TEAM; |
91 return HEDGEHOGS_PER_TEAM; |
92 } |
92 } |
93 |
93 |
94 int flib_get_weapons_count() { |
94 int flib_get_weapons_count() { |
95 return WEAPONS_COUNT; |
95 return WEAPONS_COUNT; |
96 } |
96 } |
97 |
97 |
98 const flib_metascheme *flib_get_metascheme() { |
98 const flib_metascheme *flib_get_metascheme() { |
99 return &flib_meta; |
99 return &flib_meta; |
100 } |
100 } |