All pastes #10942 Raw Edit

Miscellany

public text v1 · immutable
#10942 ·published 2005-05-04 22:17 UTC
rendered paste body
//SLOTS is global; defined: slots=30;
//all the i-1 shit is to compensate for the indexes starting at 0 and the math beginning at 30; (for other func use)

void loadMenuImg(){
  int i=slots;

  while(i){
    log(slot[i-1].itemName+" "+str(i-1)); //outputs everything correctly, from index 0 to 29.
    imgSlot[i-1]=loadImage(slot[i-1].itemImg);
    i--;
  }
}


//function accesses global shit.. no outside manipulation of variables
void blitSlots(){
  int i=slots;
  
  while(i){
    log(slot[i-1].itemName); //outputs indexes from 0 to 29... EXCEPT IT SKIPS index 1...
    i--;
  }
}