0
|
1 #include <stdlib.h>
|
|
2 #include <SDL.h>
|
|
3 //#include "libps.h"
|
|
4 #include "back.h"
|
|
5 #include "debug.h"
|
|
6
|
|
7 //GsBOXF *boxs, box[BOX_NUM];
|
|
8
|
|
9 //BOXDT boxdt[BOX_NUM];
|
|
10
|
|
11 void Back(GsOT * j)
|
|
12 {
|
|
13 int i1;
|
|
14
|
|
15 for (i1 = 0; i1 < BOX_NUM - 1; i1++) {
|
|
16 boxdt[i1].y += boxdt[i1].s;
|
|
17 if (boxdt[i1].y > 240) {
|
|
18 boxdt[i1].x = rand() % 320;
|
|
19 boxdt[i1].y = 0;
|
|
20 }
|
|
21 }
|
|
22
|
|
23 boxs = box;
|
|
24 for (i1 = 1; i1 < BOX_NUM - 1; i1++, boxs++) {
|
|
25 boxs->attribute = 0;
|
|
26 boxs->x = boxdt[i1].x;
|
|
27 boxs->y = boxdt[i1].y;
|
|
28 boxs->w = 1;
|
|
29 boxs->h = 1;
|
|
30 boxs->r = rand() % 256;
|
|
31 boxs->g = rand() % 256;
|
|
32 boxs->b = rand() % 256;
|
|
33 GsSortBoxFill(boxs, j, 0);
|
|
34 }
|
|
35 }
|