X-Git-Url: https://git.wh0rd.org/?p=ICEs.git;a=blobdiff_plain;f=321325%2Flgc_pg-scenarios.pre.i.1;fp=321325%2Flgc_pg-scenarios.pre.i.1;h=81c72fd847f7a05eb51570ffb00b832785772bae;hp=0000000000000000000000000000000000000000;hb=bd3239d2bbe0de3a200b266503e3330b1e391489;hpb=dbff64cb4b7530861c2309c794efdd4e0cf47a23 diff --git a/321325/lgc_pg-scenarios.pre.i.1 b/321325/lgc_pg-scenarios.pre.i.1 new file mode 100644 index 0000000..81c72fd --- /dev/null +++ b/321325/lgc_pg-scenarios.pre.i.1 @@ -0,0 +1,28 @@ +void scen_create_random_weather(void * dest_file, void * scen_file, int month, + int turns) +{ + float month_mod[13] = { + 0, 8, 12, 18 + }; + int i; + int result; + int init_cond = 0; + int region = 0; + int weather[turns]; + weather[0] = (init_cond == 1) ? 0 : 2; + if (month < 3 || month == 12) { + for (i = 0; i < turns; i++) + if (weather[i] == 2) + weather[i]++; + } + fprintf(dest_file, "weather»"); + i = 0; + while (i < turns) { + fprintf(dest_file, "%s", + weather[i] == 0 ? "fair" : weather[i] == + 1 ? "clouds" : weather[i] == 2 ? "rain" : "snow"); + if (i < turns - 1) + fprintf(dest_file, "°"); + i++; + } +}