|
@@ -302,6 +302,8 @@ class DLLExportClass {
|
|
static int CurrentDrawCount;
|
|
static int CurrentDrawCount;
|
|
static int TotalObjectCount;
|
|
static int TotalObjectCount;
|
|
static int SortOrder;
|
|
static int SortOrder;
|
|
|
|
+ static int ExportLayer;
|
|
|
|
+
|
|
static CNCObjectListStruct *ObjectList;
|
|
static CNCObjectListStruct *ObjectList;
|
|
|
|
|
|
static CNC_Event_Callback_Type EventCallback;
|
|
static CNC_Event_Callback_Type EventCallback;
|
|
@@ -346,6 +348,7 @@ class DLLExportClass {
|
|
int DLLExportClass::CurrentDrawCount = 0;
|
|
int DLLExportClass::CurrentDrawCount = 0;
|
|
int DLLExportClass::TotalObjectCount = 0;
|
|
int DLLExportClass::TotalObjectCount = 0;
|
|
int DLLExportClass::SortOrder = 0;
|
|
int DLLExportClass::SortOrder = 0;
|
|
|
|
+int DLLExportClass::ExportLayer = 0;
|
|
CNCObjectListStruct *DLLExportClass::ObjectList = NULL;
|
|
CNCObjectListStruct *DLLExportClass::ObjectList = NULL;
|
|
SidebarGlyphxClass DLLExportClass::MultiplayerSidebars [MAX_PLAYERS];
|
|
SidebarGlyphxClass DLLExportClass::MultiplayerSidebars [MAX_PLAYERS];
|
|
uint64 DLLExportClass::GlyphxPlayerIDs[MAX_PLAYERS] = {0xffffffffl};
|
|
uint64 DLLExportClass::GlyphxPlayerIDs[MAX_PLAYERS] = {0xffffffffl};
|
|
@@ -1109,6 +1112,8 @@ void GlyphX_Assign_Houses(void)
|
|
strncpy(housep->IniName, Text_String(TXT_COMPUTER), HOUSE_NAME_MAX);
|
|
strncpy(housep->IniName, Text_String(TXT_COMPUTER), HOUSE_NAME_MAX);
|
|
housep->IQ = Rule.MaxIQ;
|
|
housep->IQ = Rule.MaxIQ;
|
|
//housep->Control.TechLevel = _build_tech[BuildLevel];
|
|
//housep->Control.TechLevel = _build_tech[BuildLevel];
|
|
|
|
+ } else {
|
|
|
|
+ housep->IQ = 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -3313,7 +3318,11 @@ void DLLExportClass::DLL_Draw_Intercept(int shape_number, int x, int y, int widt
|
|
|
|
|
|
new_object.CNCInternalObjectPointer = (void*)object;
|
|
new_object.CNCInternalObjectPointer = (void*)object;
|
|
new_object.OccupyListLength = 0;
|
|
new_object.OccupyListLength = 0;
|
|
- new_object.SortOrder = SortOrder++;
|
|
|
|
|
|
+ if (CurrentDrawCount == 0) {
|
|
|
|
+ new_object.SortOrder = (ExportLayer << 29) + (object->Sort_Y() >> 3);
|
|
|
|
+ } else {
|
|
|
|
+ new_object.SortOrder = ObjectList->Objects[TotalObjectCount].SortOrder + CurrentDrawCount;
|
|
|
|
+ }
|
|
|
|
|
|
strncpy(new_object.TypeName, object->Class_Of().IniName, CNC_OBJECT_ASSET_NAME_LENGTH);
|
|
strncpy(new_object.TypeName, object->Class_Of().IniName, CNC_OBJECT_ASSET_NAME_LENGTH);
|
|
|
|
|
|
@@ -3700,6 +3709,8 @@ bool DLLExportClass::Get_Layer_State(uint64 player_id, unsigned char *buffer_in,
|
|
*/
|
|
*/
|
|
for (int layer = 0; layer < DLL_LAYER_COUNT; layer++) {
|
|
for (int layer = 0; layer < DLL_LAYER_COUNT; layer++) {
|
|
|
|
|
|
|
|
+ ExportLayer = layer;
|
|
|
|
+
|
|
for (int index = 0; index < Map.Layer[layer].Count(); index++) {
|
|
for (int index = 0; index < Map.Layer[layer].Count(); index++) {
|
|
|
|
|
|
ObjectClass *object = Map.Layer[layer][index];
|
|
ObjectClass *object = Map.Layer[layer][index];
|