| 880 | |
| 881 | |
| 882 | void CellEngine::LoadStaticRuleData( |
| 883 | const char *stream) |
| 884 | { |
| 885 | QUAD magic; |
| 886 | |
| 887 | if (stream == NULL) { |
| 888 | ruleSize = 0; |
| 889 | neighborhood = 0; |
| 890 | } else { |
| 891 | |
| 892 | // XXX: Make this byte order independent!!! |
| 893 | |
| 894 | magic = *(long *)stream; |
| 895 | magic = SWAPLONG(magic); |
| 896 | if (magic != (LONG)0xCAC0CAC0) return; |
| 897 | stream += sizeof(long); |
| 898 | |
| 899 | neighborhood = *(long *)stream; |
| 900 | neighborhood = SWAPLONG(neighborhood); |
| 901 | stream += sizeof(long); |
| 902 | |
| 903 | ruleSize = *(long *)stream; |
| 904 | ruleSize = SWAPLONG(ruleSize); |
| 905 | stream += sizeof(long); |
| 906 | } |
| 907 | |
| 908 | rule = (Byte *)stream; |
| 909 | ruleStatic = 1; |
| 910 | } |
| 911 | |
| 912 | |
| 913 | void CellEngine::SetRuleTable( |
nothing calls this directly
no outgoing calls
no test coverage detected