--- DarthVader/AnticounterLevel2/src/AcLevel2.cpp 2006/06/30 09:21:50 1.2 +++ DarthVader/AnticounterLevel2/src/AcLevel2.cpp 2006/07/21 10:57:20 1.3 @@ -26,3 +26,24 @@ hitstatus[1]=0; trigger[1]=0; } + +/** + * Fills a struct cAcLevel2 with values from a AcLevel2 object (to put data into a F77 common). + */ +void AcLevel2::GetLevel2Struct(cAcLevel2 *l2) const{ + for(int i=0;i<2;i++){ + l2->status[i] = status[i]; + l2->hitmap[i] = hitmap[i]; + l2->hitstatus[i] = hitstatus[i]; + l2->trigger[i] = trigger[i]; + } +} + +void AcLevel2::SetFromLevel2Struct(cAcLevel2 *l2){ + for(int i=0;i<2;i++){ + status[i] = l2->status[i]; + hitmap[i] = l2->hitmap[i]; + hitstatus[i] = l2->hitstatus[i]; + trigger[i] = l2->trigger[i]; + } +}