MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetChangeMask

Function GetChangeMask

editor/MainFrm.cpp:2809–2843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2807 cfclose(file);
2808}
2809
2810int GetChangeMask() {
2811 static room *last_curroomp = NULL;
2812 static int last_curface = -1, last_curportal = -1, last_curobj = -1;
2813 static char last_name[OBJ_NAME_LEN + 1] = "";
2814
2815 int mask = 0;
2816
2817 if (Cur_object_index != last_curobj)
2818 mask |= KUF_CUROBJ_CHANGED;
2819 last_curobj = Cur_object_index;
2820
2821 if (Curroomp != last_curroomp)
2822 mask |= KUF_CURROOM_CHANGED;
2823 last_curroomp = Curroomp;
2824
2825 if (Curface != last_curface)
2826 mask |= KUF_CURFACE_CHANGED;
2827 last_curface = Curface;
2828
2829 if (Curportal != last_curportal)
2830 mask |= KUF_CURPORTAL_CHANGED;
2831 last_curportal = Curportal;
2832
2833 if (Cur_object_index != -1) {
2834 char *name = Objects[Cur_object_index].name ? Objects[Cur_object_index].name : "<no name>";
2835 if (strcmp(last_name, name))
2836 mask |= KUF_CUROBJ_NAME_CHANGED;
2837 strcpy(last_name, name);
2838 }
2839
2840 if (New_mine)
2841 mask |= KUF_LEVEL_LOADED;
2842
2843 return mask;
2844}
2845
2846// Called from the main idle function

Callers 1

OnIdleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected