Changeset 110
- Timestamp:
- Nov 10, 2003, 12:34:24 AM (17 years ago)
- Location:
- ttyvaders/trunk/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
ttyvaders/trunk/src/aliens.c
r90 r110 21 21 */ 22 22 23 #include "config.h" 24 23 25 #include <stdlib.h> 24 26 … … 73 75 add_explosion(g, g->ex, al->x[i], al->y[i], 0, 0, EXPLOSION_MEDIUM); 74 76 al->type[i] = ALIEN_NONE; 75 add_bonus(g, g->bo, al->x[i], al->y[i], ee_rand(0, 5) ? BONUS_GREEN : BONUS_LIFE);77 add_bonus(g, g->bo, al->x[i], al->y[i], ee_rand(0,4) ? BONUS_GREEN : BONUS_LIFE); 76 78 } 77 79 -
ttyvaders/trunk/src/bonus.c
r88 r110 20 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 21 */ 22 23 #include "config.h" 22 24 23 25 #include <stdlib.h> -
ttyvaders/trunk/src/box.c
r88 r110 20 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 21 */ 22 23 #include "config.h" 22 24 23 25 #include <stdlib.h> -
ttyvaders/trunk/src/collide.c
r90 r110 20 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 21 */ 22 23 #include "config.h" 22 24 23 25 #include <stdlib.h> … … 126 128 { 127 129 add_explosion(g, ex, GET_MIN(t->left[y-j], x+3), y-j, 0, 1, EXPLOSION_SMALL); 128 t->left[y-j] -= ee_rand(0, 3);130 t->left[y-j] -= ee_rand(0,2); 129 131 } 130 132 else if(x + 3 >= t->right[y-j]) 131 133 { 132 134 add_explosion(g, ex, GET_MAX(t->right[y-j], x-2), y-j, 0, 1, EXPLOSION_SMALL); 133 t->right[y-j] += ee_rand(0, 3);135 t->right[y-j] += ee_rand(0,2); 134 136 } 135 137 } -
ttyvaders/trunk/src/explosions.c
r90 r110 20 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 21 */ 22 23 #include "config.h" 22 24 23 25 #include <stdlib.h> … … 74 76 ee_color(GREEN); 75 77 ee_goto(ex->x[i] + 3, ex->y[i]); 76 switch(ee_rand(0, 3))78 switch(ee_rand(0,2)) 77 79 { 78 80 case 0: -
ttyvaders/trunk/src/main.c
r90 r110 20 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 21 */ 22 23 #include "config.h" 22 24 23 25 #include <stdio.h> … … 183 185 184 186 /* XXX: to be removed */ 185 if(ee_rand(0, 10) == 0)187 if(ee_rand(0, 9) == 0) 186 188 { 187 189 int list[3] = { ALIEN_FOO, ALIEN_BAR, ALIEN_BAZ }; 188 190 189 add_alien(g, g->al, 0, rand() % g->h / 2, list[ee_rand(0, 3)]);191 add_alien(g, g->al, 0, rand() % g->h / 2, list[ee_rand(0,2)]); 190 192 } 191 193 -
ttyvaders/trunk/src/overlay.c
r88 r110 20 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 21 */ 22 23 #include "config.h" 22 24 23 25 #include <stdlib.h> -
ttyvaders/trunk/src/player.c
r88 r110 20 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 21 */ 22 23 #include "config.h" 22 24 23 25 #include <stdlib.h> -
ttyvaders/trunk/src/starfield.c
r90 r110 21 21 */ 22 22 23 #include "config.h" 24 23 25 #include <stdlib.h> 24 26 … … 34 36 for(i = 0; i < STARS; i++) 35 37 { 36 s[i].x = ee_rand(0, g->w );37 s[i].y = ee_rand(0, g->h );38 s[i].z = ee_rand(1, 4);39 s[i].c = ee_rand(6, 8);40 s[i].ch = ee_rand(0, 2) ? '.' : '\'';38 s[i].x = ee_rand(0, g->w - 1); 39 s[i].y = ee_rand(0, g->h - 1); 40 s[i].z = ee_rand(1, 3); 41 s[i].c = ee_rand(6, 7); 42 s[i].ch = ee_rand(0, 1) ? '.' : '\''; 41 43 } 42 44 … … 67 69 if(s[i].x < 0) 68 70 { 69 s[i].x = ee_rand(0, g->w );71 s[i].x = ee_rand(0, g->w - 1); 70 72 s[i].y = 0; 71 s[i].z = ee_rand(1, 3);72 s[i].c = ee_rand(6, 8);73 s[i].ch = ee_rand(0, 2) ? '.' : '\'';73 s[i].z = ee_rand(1, 2); 74 s[i].c = ee_rand(6, 7); 75 s[i].ch = ee_rand(0, 1) ? '.' : '\''; 74 76 } 75 77 else if(s[i].y < g->h-1) -
ttyvaders/trunk/src/tunnel.c
r90 r110 170 170 171 171 /* Generate new values */ 172 i = delta[ee_rand(0, 6)];173 j = delta[ee_rand(0, 6)];172 i = delta[ee_rand(0,5)]; 173 j = delta[ee_rand(0,5)]; 174 174 175 175 /* Check in which direction we need to alter tunnel */ -
ttyvaders/trunk/src/weapons.c
r98 r110 20 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 21 */ 22 23 #include "config.h" 22 24 23 25 #include <stdlib.h>
Note: See TracChangeset
for help on using the changeset viewer.