Mercurial > hg > Members > kono > tree_dandy2
view tokuten.c @ 21:b7654db65a34
add TODO
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 10 Dec 2010 19:04:17 +0900 |
parents | 972a7f233b23 |
children |
line wrap: on
line source
#include <SDL.h> #include "object.h" #include "tokuten.h" #include "bom.h" #include "bool.h" //#include "libps.h" #include "sgoex.h" #include "count2.h" #include "SDL_opengl.h" int enemycount = 0; int higecount = 0; int stcount = 0; int count = 0; /*エンヂング集計用*/ int clear_result[4]; int end_jiki_x; int end_jiki_y; int end_jiki_v; int end_jiki_vx; int end_jiki_vy; int end_jiki_size; /*エクステンド*/ int p_extend = 200000; void tokuten() { int i; int ten1, ten2, ten3, ten4, keta = 1000000000; if (enemycount > higecount) higecount = enemycount; ten2 = enemycount; ten4 = higecount; for (i = 0; i < 10; i++) { ten1 = ten2 / keta; ten3 = ten4 / keta; //score count++; PutSprite(count, 32*(i+32)-800, 20, 20 + ten1); count++; PutSprite(count, 728 + 32 * i, 20, 20 + ten3); ten2 -= ten1 * keta; ten4 -= ten3 * keta; keta /= 10; } count++; PutSprite(count, 90, 20, 18); //1P count++; PutSprite(count, 600, 20, 38);// HIGE if (enemycount >= p_extend) { if (p_extend == 1000000) { p_extend = 1999999999; jiki.zanki++; } if (p_extend == 200000) { p_extend = 1000000; jiki.zanki++; } } } void Endingscore(int fc) { int i, a, b; /*all stage clear */ if (fc < 600) { count++; PutSprite(count, 600, 100, 111); } /*rest */ if (fc > 120 && fc < 600 && jiki.ccount > 2) { a = jiki.zanki - 1; if (a != 0) { count++; PutSprite(count, 600, 160, 112); //REST count++; PutSprite(count, 800, 160, 20 + a); count++; PutSprite(count, 832, 160, 115);//0000000 } } /*result stage */ for (i = 0; i < 4; i++) { if (fc > 200 + i * 60 && fc < 600 && jiki.ccount > 2) { a = clear_result[i]; count++; PutSprite(count, 400, 212 + i * 48, 113); /*stage */ // PutSprite(count, 64, 112 + i * 24, 113); /*stage */ count++; PutSprite(count, 300 + 40, 212 + i * 48, 21 + i); /*1kara4 */ // PutSprite(count, 64 + 40, 112 + i * 24, 21 + i); /*1kara4 */ count++; PutSprite(count, 800, 220 + i * 48, 200 + a); // PutSprite(count, 400, 120 + i * 24, 200 + a); b = a * (i + 1); count++; PutSprite(count, 800, 220 + i * 48, 20 + b / 10); // PutSprite(count, 500, 120 + i * 24, 20 + b / 10); count++; PutSprite(count, 800, 220 + i * 48, 20 + b % 10); // PutSprite(count, 600, 120 + i * 24, 20 + b % 10); count++; PutSprite(count, 832, 220 + i * 48, 114); // 000000 // PutSprite(count, 600, 120 + i * 24, 114); } } if (fc == 560 && jiki.ccount > 2) { enemycount += (jiki.zanki - 1) * 10000000 + clear_result[0] * 1000000 + clear_result[1] * 2000000 + clear_result[2] * 3000000 + clear_result[3] * 5000000; return; } /*エンディング準備 */ if (fc == 600) { jiki.bf = FALSE; // end_jiki_vx = (640 - 64) - jiki.x; // end_jiki_vy = (230 - 64) - jiki.y; end_jiki_x = 1200; end_jiki_y = 880; end_jiki_size = 2; return; } if (fc > 601) { if (fc < 1112) { end_jiki_x -= 0.2; end_jiki_y -= 0.05; end_jiki_size -= 0.005; } jiki.bf = FALSE; if (fc > 720 && fc < 840) { count++; PutSprite(count, 800, 400, 116); } if (fc > 960) { count++; PutSprite(count, 1000, 800, 117); // PutSprite(count, 128, 72, 117); count++; PutSprite(count, 1000, 840, 118); // PutSprite(count, 128, 88, 118); count++; PutSprite(count, 1000, 880, 120); // PutSprite(count, 128, 104, 120); } count++; // PutSprite(count, end_jiki_x / 4096, end_jiki_y / 4096, 3); PutSpriteEx(3, end_jiki_x, end_jiki_y, end_jiki_size, end_jiki_size, 1); count++; // PutSprite(count, 160 - 30, 64, 195); PutSpriteEx(195, 180, 200, 2 - end_jiki_size, 2 - end_jiki_size, 1); } }