0
|
1 #include <SDL.h>
|
|
2 #include "object.h"
|
|
3 #include "tokuten.h"
|
|
4 #include "bom.h"
|
|
5 #include "bool.h"
|
|
6 //#include "libps.h"
|
|
7 #include "sgoex.h"
|
|
8 #include "count2.h"
|
|
9 #include "SDL_opengl.h"
|
|
10 int enemycount = 0;
|
|
11 int higecount = 0;
|
|
12 int stcount = 0;
|
7
|
13 int count = 0;
|
0
|
14
|
|
15 /*エンヂング集計用*/
|
|
16 int clear_result[4];
|
|
17 int end_jiki_x;
|
|
18 int end_jiki_y;
|
|
19 int end_jiki_v;
|
|
20 int end_jiki_vx;
|
|
21 int end_jiki_vy;
|
|
22 int end_jiki_size;
|
|
23
|
|
24 /*エクステンド*/
|
|
25 int p_extend = 200000;
|
|
26
|
|
27 void tokuten()
|
|
28 {
|
|
29 int i;
|
|
30
|
|
31 int ten1, ten2, ten3, ten4, keta = 1000000000;
|
|
32 if (enemycount > higecount)
|
|
33 higecount = enemycount;
|
|
34 ten2 = enemycount;
|
|
35 ten4 = higecount;
|
|
36 for (i = 0; i < 10; i++) {
|
|
37 ten1 = ten2 / keta;
|
|
38 ten3 = ten4 / keta;
|
|
39
|
|
40 //score
|
|
41 count++;
|
|
42 PutSprite(count, 32*(i+32)-800, 20, 20 + ten1);
|
|
43 count++;
|
|
44 PutSprite(count, 728 + 32 * i, 20, 20 + ten3);
|
|
45
|
|
46 ten2 -= ten1 * keta;
|
|
47 ten4 -= ten3 * keta;
|
|
48 keta /= 10;
|
|
49 }
|
|
50 count++;
|
|
51 PutSprite(count, 90, 20, 18); //1P
|
|
52 count++;
|
|
53 PutSprite(count, 600, 20, 38);// HIGE
|
|
54
|
|
55 if (enemycount >= p_extend) {
|
|
56 if (p_extend == 1000000) {
|
|
57 p_extend = 1999999999;
|
|
58 jiki.zanki++;
|
|
59 }
|
|
60 if (p_extend == 200000) {
|
|
61 p_extend = 1000000;
|
|
62 jiki.zanki++;
|
|
63 }
|
|
64 }
|
|
65 }
|
|
66
|
|
67 void Endingscore(int fc)
|
|
68 {
|
|
69 int i, a, b;
|
|
70 /*all stage clear */
|
|
71 if (fc < 600) {
|
|
72 count++;
|
|
73 PutSprite(count, 600, 100, 111);
|
|
74 }
|
|
75 /*rest */
|
|
76 if (fc > 120 && fc < 600 && jiki.ccount > 2) {
|
|
77 a = jiki.zanki - 1;
|
|
78 if (a != 0) {
|
|
79 count++;
|
|
80 PutSprite(count, 600, 160, 112); //REST
|
|
81 count++;
|
|
82 PutSprite(count, 800, 160, 20 + a);
|
|
83 count++;
|
|
84 PutSprite(count, 832, 160, 115);//0000000
|
|
85 }
|
|
86 }
|
|
87 /*result stage */
|
|
88 for (i = 0; i < 4; i++) {
|
|
89 if (fc > 200 + i * 60 && fc < 600 && jiki.ccount > 2) {
|
|
90 a = clear_result[i];
|
|
91 count++;
|
|
92 PutSprite(count, 400, 212 + i * 48, 113); /*stage */
|
|
93 // PutSprite(count, 64, 112 + i * 24, 113); /*stage */
|
|
94 count++;
|
|
95 PutSprite(count, 300 + 40, 212 + i * 48, 21 + i); /*1kara4 */
|
|
96 // PutSprite(count, 64 + 40, 112 + i * 24, 21 + i); /*1kara4 */
|
|
97
|
|
98 count++;
|
|
99 PutSprite(count, 800, 220 + i * 48, 200 + a);
|
|
100 // PutSprite(count, 400, 120 + i * 24, 200 + a);
|
|
101
|
|
102 b = a * (i + 1);
|
|
103 count++;
|
|
104 PutSprite(count, 800, 220 + i * 48, 20 + b / 10);
|
|
105 // PutSprite(count, 500, 120 + i * 24, 20 + b / 10);
|
|
106 count++;
|
|
107 PutSprite(count, 800, 220 + i * 48, 20 + b % 10);
|
|
108 // PutSprite(count, 600, 120 + i * 24, 20 + b % 10);
|
|
109
|
|
110 count++;
|
|
111 PutSprite(count, 832, 220 + i * 48, 114); // 000000
|
|
112 // PutSprite(count, 600, 120 + i * 24, 114);
|
|
113 }
|
|
114 }
|
|
115 if (fc == 560 && jiki.ccount > 2) {
|
|
116 enemycount += (jiki.zanki - 1) * 10000000 +
|
|
117 clear_result[0] * 1000000 +
|
|
118 clear_result[1] * 2000000 +
|
|
119 clear_result[2] * 3000000 + clear_result[3] * 5000000;
|
|
120 return;
|
|
121 }
|
|
122 /*エンディング準備 */
|
|
123 if (fc == 600) {
|
|
124 jiki.bf = FALSE;
|
|
125 // end_jiki_vx = (640 - 64) - jiki.x;
|
|
126 // end_jiki_vy = (230 - 64) - jiki.y;
|
|
127 end_jiki_x = 1200;
|
|
128 end_jiki_y = 880;
|
|
129 end_jiki_size = 2;
|
|
130 return;
|
|
131 }
|
|
132 if (fc > 601) {
|
|
133 if (fc < 1112) {
|
|
134 end_jiki_x -= 0.2;
|
|
135 end_jiki_y -= 0.05;
|
|
136 end_jiki_size -= 0.005;
|
|
137 }
|
|
138 jiki.bf = FALSE;
|
|
139
|
|
140 if (fc > 720 && fc < 840) {
|
|
141 count++;
|
|
142 PutSprite(count, 800, 400, 116);
|
|
143 }
|
|
144
|
|
145 if (fc > 960) {
|
|
146 count++;
|
|
147 PutSprite(count, 1000, 800, 117); // PutSprite(count, 128, 72, 117);
|
|
148 count++;
|
|
149 PutSprite(count, 1000, 840, 118); // PutSprite(count, 128, 88, 118);
|
|
150 count++;
|
|
151 PutSprite(count, 1000, 880, 120); // PutSprite(count, 128, 104, 120);
|
|
152 }
|
|
153
|
|
154 count++;
|
|
155 // PutSprite(count, end_jiki_x / 4096, end_jiki_y / 4096, 3);
|
|
156 PutSpriteEx(3, end_jiki_x, end_jiki_y, end_jiki_size, end_jiki_size, 1);
|
|
157 count++;
|
|
158 // PutSprite(count, 160 - 30, 64, 195);
|
|
159 PutSpriteEx(195, 180, 200, 2 - end_jiki_size, 2 - end_jiki_size, 1);
|
|
160 }
|
|
161 }
|