~rabbits/hiversaires

ebe7c24c00fbf6e4741ef7a041680f568fbb23c5 — Rezmason 10 months ago 3e1627a
Added (but haven't populated) a CONTRIBUTORS.md file. Modified the data file and parsers so it resembles C a bit more, for no good reason.
4 files changed, 24 insertions(+), 18 deletions(-)

A CONTRIBUTORS.md
M media/data/data.txt
M src/doors.c
M src/terminals.c
A CONTRIBUTORS.md => CONTRIBUTORS.md +6 -0
@@ 0,0 1,6 @@
# Contributors

There have been several versions of Hiversaires over the years. Friends have taken turns designing, drawing, rendering, advising, programming, composing, and testing its various bits on its various target platforms.

Here's a list of them.


M media/data/data.txt => media/data/data.txt +12 -12
@@ 1,7 1,7 @@
/*NOTES*/

                                  •                                                 •
                       pb • mb - ma   mn - mo                                      eo
                       pb•  mb - ma   mn - mo                                      eo
                        |         |    |    |                                       |
   pf - pe - pd - pc - pa - mh   mc   mm - mp                  an - ao             ea
                             |    |    |                        |    |              |


@@ 19,11 19,11 @@
                   |    |         |         |                                      ef
             fn   sa - sb        ch - cg - cf        nb - nc                        |
              |    |                   |              |    |                       eg
             fm - fl                  cl           • na - nd                        |
             fm - fl                  cl            •na - nd                        |
                   |                   |                   |                       eh
             ff - fg - fh             la - lb             ne                        |
              |         |              |    |                                      ei
             fe   fk   fi             lc - ld - le - ra • ey                        |
             fe   fk   fi             lc - ld - le - ra• •ey                        |
              |    |    |                        |                     • en - em - ej - ek - el •
             fd - fc - fj                       lf                                  |
                   |                             |                                 ep


@@ 38,7 38,7 @@
clockTerminal("clock_terminal", 0);
energyTerminal("forest_studio_energy_terminal", 0);
sealTerminal("forest_seal_terminal", FOREST);
studioTerminal("studio_terminal", [STONES, ANTECHANNEL]);
studioTerminal("studio_terminal", {STONES, ANTECHANNEL});
energyTerminal("stones_rainre_energy_terminal", 0);
sealTerminal("stones_seal_terminal", STONES);
sealTerminal("rainre_seal_terminal", RAINRE);


@@ 59,20 59,20 @@ endgame("endgame_credit", 0);
ententeProgressTerminal("entente_progress_terminal", 0);
energyTerminal("capsule_nataniev_energy_terminal", 0);
/*DOORS*/
energyDoor("forest_studio_energy_door", 1, ["forest_studio_energy_terminal"]);
energyDoor("forest_studio_energy_door", 1, {"forest_studio_energy_terminal"});
secretDoor("odaiba", 0);
clockDoor("studio_clock_door", 0);
clockDoor("stones_clock_door", 2);
clockDoor("antechannel_clock_door", 1);
energyDoor("stones_rainre_energy_door", 1, ["stones_rainre_energy_terminal"], ["forest_energy_box"]);
sealDoor("stones_metamondst_seal_door", 1, [FOREST, RAINRE], [RAINRE, ANTECHANNEL]);
energyDoor("antechannel_metamondst_energy_door", 1, ["antechannel_metamondst_energy_terminal"]);
sealDoor("forest_antechannel_seal_door", 1, [METAMONDST, RAINRE]);
energyDoor("antechannel_antechannel_energy_door", 1, ["antechannel_antechannel_energy_terminal"]);
energyDoor("stones_rainre_energy_door", 1, {"stones_rainre_energy_terminal"}, {"forest_energy_box"});
sealDoor("stones_metamondst_seal_door", 1, {FOREST, RAINRE}, {RAINRE, ANTECHANNEL});
energyDoor("antechannel_metamondst_energy_door", 1, {"antechannel_metamondst_energy_terminal"});
sealDoor("forest_antechannel_seal_door", 1, {METAMONDST, RAINRE});
energyDoor("antechannel_antechannel_energy_door", 1, {"antechannel_antechannel_energy_terminal"});
studioDoor("forest_entente_studio_door", 1);
studioDoor("metamondst_capsule_studio_door", 0);
energyDoor("capsule_nataniev_energy_door", 1, ["capsule_nataniev_energy_terminal"]);
energyDoor("endgame_energy_door", 0, ["nataniev_endgame_energy_terminal", "capsule_nataniev_energy_terminal"]);
energyDoor("capsule_nataniev_energy_door", 1, {"capsule_nataniev_energy_terminal"});
energyDoor("endgame_energy_door", 0, {"nataniev_endgame_energy_terminal", "capsule_nataniev_energy_terminal"});
timeDoor("time_door", 15, 7);
/*MAZES*/
goal(X, 2);

M src/doors.c => src/doors.c +4 -4
@@ 221,14 221,14 @@ parseDoor(Door *door, char *line, int lineNumber)
		door->test = testClock;
	} else if(strcmp(type, "sealDoor") == 0) {
		/*
			example: 0.5, [FOREST, RAINRE], [RAINRE, ANTECHANNEL]
			example: 0.5, {FOREST, RAINRE}, {RAINRE, ANTECHANNEL}
		*/
		char sealNames[2][2][20];
		strcpy(sealNames[0][0], "NONE");
		strcpy(sealNames[0][1], "NONE");
		strcpy(sealNames[1][0], "NONE");
		strcpy(sealNames[1][1], "NONE");
		missing = 3 - sscanf(params, "%lf, [%[^,], %[^]]], [%[^,], %[^]]]", &door->fadeDuration, sealNames[0][0], sealNames[0][1], sealNames[1][0], sealNames[1][1]);
		missing = 3 - sscanf(params, "%lf, {%[^,], %[^}]}, {%[^,], %[^}]}", &door->fadeDuration, sealNames[0][0], sealNames[0][1], sealNames[1][0], sealNames[1][1]);
		parseZone(&door->data.sealLocks[0][0], sealNames[0][0]);
		parseZone(&door->data.sealLocks[0][1], sealNames[0][1]);
		parseZone(&door->data.sealLocks[1][0], sealNames[1][0]);


@@ 238,13 238,13 @@ parseDoor(Door *door, char *line, int lineNumber)
		door->altTest = altTestSeal;
	} else if(strcmp(type, "energyDoor") == 0) {
		/*
			example: 1, ["terminalName", "terminalName"], ["altTerminalName", "altTerminalName"]
			example: 1, {"terminalName", "terminalName"}, {"altTerminalName", "altTerminalName"}
		*/
		char terminalNameString[100];
		char altTerminalNameString[100];
		strcpy(terminalNameString, "");
		strcpy(altTerminalNameString, "");
		missing = 1 - sscanf(params, "%d, [%[^]]], [%[^]]]", &door->opens, terminalNameString, altTerminalNameString);
		missing = 1 - sscanf(params, "%d, {%[^}]}, {%[^}]}", &door->opens, terminalNameString, altTerminalNameString);
		if(missing <= 0) {
			char terminalNames[2][40];
			strcpy(terminalNames[0], "");

M src/terminals.c => src/terminals.c +2 -2
@@ 439,12 439,12 @@ parseTerminal(Terminal *terminal, char *line, int lineNumber)
		terminal->reset = resetEnergy;
	} else if(strcmp(type, "studioTerminal") == 0) {
		/*
			example: [FOREST, RAINRE]
			example: {FOREST, RAINRE}
		*/
		char sealNames[2][20];
		strcpy(sealNames[0], "NONE");
		strcpy(sealNames[1], "NONE");
		missing = 2 - sscanf(params, "[%[^,], %[^]]", sealNames[0], sealNames[1]);
		missing = 2 - sscanf(params, "{%[^,], %[^}]", sealNames[0], sealNames[1]);
		parseZone(&terminal->data.sealLock[0], sealNames[0]);
		parseZone(&terminal->data.sealLock[1], sealNames[1]);
		terminal->setup = setupStudio;