Space Rocks Label Contest
GRANDE MAC!!!
fanne una che poi vince !!!
GRANDE MAC!!!
fanne una che poi vince !!!
RH è il posto ideale per ogni retrogiocatore che si rispetti. Se vuoi farne parte e poter commentare gli articoli o partecipare alle discussioni del forum, registrati.
void PrepSpeedRange(int level) { int i; int base_adjust; base_adjust = MM_LEVEL; if (base_adjust) base_adjust--; base_adjust *= 2; // SPEED_RANGE[0] = (level >> 2) + 4; // SPEED_RANGE[1] = (level >> 1) + 4; // SPEED_RANGE[2] = level + 4; // // // defines slowest speed of asteroids // SPEED_BASE[0] = (level >> 6) + base_adjust; // SPEED_BASE[1] = (level >> 5) + base_adjust; // SPEED_BASE[2] = (level >> 4) + base_adjust; for(i=0;i<3;i++) { SPEED_RANGE[i] = (level >> (2-i)) + 4; SPEED_BASE[i] = (level >> (6-i)) + base_adjust; if (SPEED_BASE[i] > 15) SPEED_BASE[i] = 15; if (SPEED_BASE[i] + SPEED_RANGE[i] > 15) SPEED_RANGE[i] = 15 - SPEED_BASE[i]; } }
// // defines slowest speed of asteroids // SPEED_BASE[0] = (level >> 4) + base_adjust; // SPEED_BASE[1] = (level >> 3) + base_adjust; // SPEED_BASE[2] = (level >> 2) + base_adjust;
unsigned char RandomAsteroidMotion(int size) { // returns a random speed & direction based on size of asteroid char speed; char direction; int index; if (size == LARGE_ASTEROID_SEQ_ID) index = 0; else if (size == MEDIUM_ASTEROID_SEQ_ID) index = 1; else index = 2; speed = (SPEED_RANGE[index] * (Random32() & 0xff)) >> 8; speed += SPEED_BASE[index]; speed <<= 4; direction = ((Random32() >> 10) & 0x0f); return speed | direction; }
Commenta