MCPcopy Create free account
hub / github.com/SimHacker/micropolis / LoadRule

Method LoadRule

MicropolisCore/src/CellEngine/src/cellengine.cpp:807–838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805
806
807void CellEngine::LoadRule(
808 const char *name)
809{
810 if (ruleName != NULL) {
811 delete [] ruleName;
812 }
813
814 ruleName = new char[strlen(name) + 1];
815
816 strcpy(ruleName, name);
817
818 const char *stream =
819 NULL;
820
821 const char **pstr =
822 ruleTables;
823
824 while (pstr[0] != NULL) {
825 if (stricmp(
826 name,
827 pstr[0]) == 0) {
828 stream =
829 pstr[1];
830 break;
831 } // if
832 pstr += 2;
833 } // while
834
835 if (stream != NULL) {
836 LoadRuleData(stream);
837 } // if
838}
839
840
841void CellEngine::LoadRuleData(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected