Mercurial > hg > Members > kono > tree_dandy2
view back.c @ 0:01387a2e419e
initial version
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 07 Dec 2010 15:39:45 +0900 |
parents | |
children |
line wrap: on
line source
#include <stdlib.h> #include <SDL.h> //#include "libps.h" #include "back.h" #include "debug.h" //GsBOXF *boxs, box[BOX_NUM]; //BOXDT boxdt[BOX_NUM]; void Back(GsOT * j) { int i1; for (i1 = 0; i1 < BOX_NUM - 1; i1++) { boxdt[i1].y += boxdt[i1].s; if (boxdt[i1].y > 240) { boxdt[i1].x = rand() % 320; boxdt[i1].y = 0; } } boxs = box; for (i1 = 1; i1 < BOX_NUM - 1; i1++, boxs++) { boxs->attribute = 0; boxs->x = boxdt[i1].x; boxs->y = boxdt[i1].y; boxs->w = 1; boxs->h = 1; boxs->r = rand() % 256; boxs->g = rand() % 256; boxs->b = rand() % 256; GsSortBoxFill(boxs, j, 0); } }