void GUICursor::Build() { m_elements.clear(); BuildElements(m_elements); SpriteRect rect; GetScope(rect); rect.GetFourBorders(m_renderer, m_fourBorders); matrix4x4 mat; Matrix4x4_set_one(&mat); GetMatrix(&mat); m_fourBorders.ApplyTranform(&mat); }
SquadronClass::SquadronClass(VU_BYTE **stream) : AirUnitClass(stream) { if (load_log) { fprintf (load_log, "%08x SquadronClass ", *stream - start_load_stream); fflush (load_log); } memcpy(&fuel, *stream, sizeof(long)); *stream += sizeof(long); memcpy(&specialty, *stream, sizeof(uchar)); *stream += sizeof(uchar); if (gCampDataVersion < 69) { memset(stores,0,MAXIMUM_WEAPTYPES); memcpy(stores, *stream, sizeof(uchar)*200); *stream += sizeof(uchar)*200; } else if (gCampDataVersion < 72) { memset(stores,0,MAXIMUM_WEAPTYPES); memcpy (stores, *stream, sizeof(uchar)*220); *stream += sizeof(uchar)*220; } else { memcpy(stores, *stream, sizeof(uchar)*MAXIMUM_WEAPTYPES); *stream += sizeof(uchar)*MAXIMUM_WEAPTYPES; } if (gCampDataVersion < 47) { if (gCampDataVersion >= 29) { memcpy(pilot_data, *stream, 8*PILOTS_PER_SQUADRON); *stream += 8*PILOTS_PER_SQUADRON; // Reinit them InitPilots(); } else { memcpy(pilot_data, *stream, 8*36); *stream += 8*36; // Reinit them InitPilots(); } } else { memcpy(pilot_data, *stream, sizeof(PilotClass)*PILOTS_PER_SQUADRON); *stream += sizeof(PilotClass)*PILOTS_PER_SQUADRON; if (gCampDataVersion < 55) InitPilots(); } if (pilot_data[1].pilot_id < 0) InitPilots(); memcpy(schedule, *stream, sizeof(long)*VEHICLES_PER_UNIT); *stream += sizeof(long)*VEHICLES_PER_UNIT; memcpy(&airbase_id, *stream, sizeof(VU_ID)); *stream += sizeof(VU_ID); memcpy(&hot_spot, *stream, sizeof(VU_ID)); *stream += sizeof(VU_ID); #ifdef DEBUG // airbase_id.num_ &= 0x0000ffff; // hot_spot.num_ &= 0x0000ffff; #endif if (gCampDataVersion >= 6 && gCampDataVersion < 16) { VU_ID junk; memcpy(&junk, *stream, sizeof(VU_ID)); *stream += sizeof(VU_ID); } memcpy(rating, *stream, sizeof(uchar)*ARO_OTHER); *stream += sizeof(uchar)*ARO_OTHER; memcpy(&aa_kills, *stream, sizeof(short)); *stream += sizeof(short); memcpy(&ag_kills, *stream, sizeof(short)); *stream += sizeof(short); memcpy(&as_kills, *stream, sizeof(short)); *stream += sizeof(short); memcpy(&an_kills, *stream, sizeof(short)); *stream += sizeof(short); memcpy(&missions_flown, *stream, sizeof(short)); *stream += sizeof(short); memcpy(&mission_score, *stream, sizeof(short)); *stream += sizeof(short); memcpy(&total_losses, *stream, sizeof(uchar)); *stream += sizeof(uchar); if (gCampDataVersion >= 9) { memcpy(&pilot_losses, *stream, sizeof(uchar)); *stream += sizeof(uchar); } else pilot_losses=0; if (gCampDataVersion < 41) BuildElements(); if (gCampDataVersion < 45) squadron_patch = AssignUISquadronID(GetUnitNameID()); else { memcpy(&squadron_patch, *stream, sizeof(uchar)); *stream += sizeof(uchar); if (gCampDataVersion < 50) squadron_patch = AssignUISquadronID(GetUnitNameID()); } last_resupply_time = 0; last_resupply = 0; dirty_squadron = 0; // 2001-07-05 MODIFIED BY S.G. NEW VARIABLE TO ZERO squadronRetaskAt = 0; }