Browse Source

carefully using UNUM_[COLS|ROWS] at some places which saves 34 bytes (no breakage detected so far)

feature/2015
Christian Kroll 14 years ago
parent
commit
57efa4abdf
  1. 16
      scrolltext/scrolltext3.c

16
scrolltext/scrolltext3.c

@ -243,7 +243,7 @@ unsigned char blobNextCommand(blob_t * blob){
if((tmp = getnum(blob)) != 0xFFFF){ if((tmp = getnum(blob)) != 0xFFFF){
blob->tox = tmp; blob->tox = tmp;
}else{ }else{
blob->tox = (NUM_COLS - 2 + blob->sizex)/2; blob->tox = (NUM_COLS - 2 + blob->sizex)/2;
} }
blob->waitfor = wait_posx; blob->waitfor = wait_posx;
return retval; return retval;
@ -252,7 +252,7 @@ unsigned char blobNextCommand(blob_t * blob){
if((tmp = getnum(blob)) != 0xFFFF){ if((tmp = getnum(blob)) != 0xFFFF){
blob->toy = tmp; blob->toy = tmp;
}else{ }else{
blob->toy = (NUM_ROWS-blob->sizey) / 2; blob->toy = (UNUM_ROWS-blob->sizey) / 2; //MARK
} }
blob->waitfor = wait_posy; blob->waitfor = wait_posy;
return retval; return retval;
@ -351,20 +351,20 @@ blob_t * setupBlob(char * str){
blob->sizex = getLen(blob); blob->sizex = getLen(blob);
if(*blob->commands == '<'){ if(*blob->commands == '<'){
blob->posx = 0; blob->posx = 0;
blob->posy = (NUM_ROWS-blob->sizey)/2; blob->posy = (UNUM_ROWS-blob->sizey)/2; //MARK
}else if(*blob->commands == '>'){ }else if(*blob->commands == '>'){
blob->posx = NUM_COLS+blob->sizex; blob->posx = NUM_COLS+blob->sizex;
blob->posy = (NUM_ROWS-blob->sizey)/2; blob->posy = (UNUM_ROWS-blob->sizey)/2; //MARK
}else if(*blob->commands == 'd'){ }else if(*blob->commands == 'd'){
blob->posy = -blob->sizey; blob->posy = -blob->sizey;
blob->posx = (NUM_COLS - 2 + blob->sizex)/2; blob->posx = (UNUM_COLS - 2 + blob->sizex)/2; //MARK
}else if(*blob->commands == 'u'){ }else if(*blob->commands == 'u'){
blob->posy = blob->sizey; blob->posy = blob->sizey;
blob->posx = (NUM_COLS - 2 + blob->sizex)/2; blob->posx = (UNUM_COLS - 2 + blob->sizex)/2; //MARK
}else if(*blob->commands == 'x'){ }else if(*blob->commands == 'x'){
blob->posy = (NUM_ROWS-blob->sizey)/2; blob->posy = (UNUM_ROWS-blob->sizey)/2; //MARK
}else if(*blob->commands == 'y'){ }else if(*blob->commands == 'y'){
blob->posx = (NUM_COLS - 2 + blob->sizex)/2; blob->posx = (UNUM_COLS - 2 + blob->sizex)/2; //MARK
} }
blob->delayx_rld = 0; blob->delayx_rld = 0;

Loading…
Cancel
Save