Esempio n. 1
0
int RealtimeBonus_Get_Distance (int index) {
   RTBonus *pbonus = RealtimeBonus_Get_Record (index);

   if (pbonus != NULL)
      return pbonus->iRadius;
   else
      return -1;
}
Esempio n. 2
0
int RealtimeBonus_Get_Id (int index) {
   RTBonus *pbonus = RealtimeBonus_Get_Record (index);

   if (pbonus != NULL)
      return pbonus->iID;
   else
      return -1;
}
Esempio n. 3
0
RTBonus *RealtimeBonus_Get (int iID) {
   int i;
   for (i = 0; i < MAX_ADD_ONS; i++) {
      if (gBonusTable.bonus[i] && gBonusTable.bonus[i]->iID == iID)
         return RealtimeBonus_Get_Record (i);
   }

   return NULL;

}
Esempio n. 4
0
int RealtimeBonus_Is_Alertable (int index) {
   RTBonus *pbonus = RealtimeBonus_Get_Record (index);
   if (pbonus == NULL)
      return FALSE;

   if (!pbonus->bIsCustomeBonus || pbonus->displayed)
   return TRUE;

   return FALSE;
}
Esempio n. 5
0
void RealtimeBonus_Get_Position (int index, RoadMapPosition *position, int *steering) {
   RTBonus *pbonus = RealtimeBonus_Get_Record (index);
   if (!pbonus)
      return;

   if (!position)
      return;

   position->longitude = pbonus->position.longitude;
   position->latitude = pbonus->position.latitude;

   if (!steering)
      return;

   *steering = 0;
}
Esempio n. 6
0
void RealtimeBonus_Term (void) {
   int i;
   RTBonus * pbonus;

   for (i = 0; i < MAX_ADD_ONS; i++) {
      pbonus = RealtimeBonus_Get_Record (i);

      if (pbonus){
         onBonusDelete(pbonus);
         free (pbonus);
      }

      gBonusTable.bonus[i] = NULL;
   }

   gBonusTable.iCount = 0;
}
Esempio n. 7
0
roadmap_alerter_location_info *  RealtimeBonus_get_location_info(int record){
   RTBonus *pbonus = RealtimeBonus_Get_Record (record);
   if (!pbonus)
      return NULL;
   return &(pbonus->location_info);
}