0且聽风吟 0且聽风吟
关注数: 412 粉丝数: 1,394 发帖数: 6,931 关注贴吧数: 18
求高人解释一段课设程序= = 真心跪求·· #include <math.h>#include #include <stdio.h>#include #include void drawstar(int x, int y, int c, int r, int color);void draw3(int x, int y, int r, int color);void draw30(int color); int count = 0;int posx[3500], posy[3500]; int main(){ int GraphDriver; int GraphMode; int arg = 0; int a, b; int step = 5; GraphDriver = DETECT; initgraph(&GraphDriver, &GraphMode, ""); draw3(300, 200, 300, 12); drawstar(posx[0], posy[0], 0, 15, 12); while(1) { while(kbhit()) { a = getch(); if (a == 13) { closegraph(); return 0; } if (a == 0) { b = getch(); if (b == 75)/*Left*/ { drawstar(posx[arg], posy[arg], 0, 15, 0); arg -= step; if (arg < 0) arg = count - 1; draw30(12); drawstar(posx[arg], posy[arg], 0, 15, 12); } if (b == 77)/*Right*/ { drawstar(posx[arg], posy[arg], 0, 15, 0); arg += step; if (arg > count - 1) arg = 0; draw30(12); drawstar(posx[arg], posy[arg], 0, 15, 12); } } } } } void drawstar(int x, int y, int c, int r, int color){ float x1, y1; float x2, y2; float x3, y3; float x4, y4; float x5, y5; const double pi = atan(1) * 4 / 180; const double pic = pi * c; setcolor(color); x1 = x + r * cos(pi * 90 - pic); y1 = y - r * sin(pi * 90 - pic); x2 = x + r * cos(pi * 18 - pic); y2 = y - r * sin(pi * 18 - pic); x3 = x + r * cos(pi * 54 + pic); y3 = y + r * sin(pi * 54 + pic); x4 = x - r * cos(pi * 54 - pic); y4 = y + r * sin(pi * 54 - pic); x5 = x - r * cos(pi * 18 + pic); y5 = y - r * sin(pi * 18 + pic); moveto(x1, y1); lineto(x3, y3); lineto(x5, y5); lineto(x2, y2); lineto(x4, y4); lineto(x1, y1);} void draw3(int x, int y, int r, int color){ const double p = 3.14159265; float r0, t; float px, py; r /= 2; r -= 20; for(t = 0; t <= p; t += 0.003) { r0 = r * cos(3 * t); px = r0 * cos(t) + x; py = r0 * sin(t) + y; putpixel(px, py, count % 15); posx[count] = px; posy[count] = py; count++; }} void draw30(int color){ int i; for (i = 0; i < count; i++) putpixel(posx[i], posy[i], i % 15);}
打算这样加点,个人觉得刷图不会尴尬了 = = SP模拟器加点情况: 请进入多玩DNF专区关注更多内容: http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fdnf.duowan.com%2F&urlrefer=1a72ad7f9d6f7c5d9abe56b29a0662c9 欢迎使用多玩70级加点模拟器: http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fdnf.duowan.com%2Fs%2F70calc%2Fgjs.html%23&urlrefer=3efa882b28fc46b175c1a6e2f5ff91a7 职业:大暗黑天 等级:70 总SP:6994 已用SP:6985 剩余SP:9 任务获得:830 总TP:23 已用TP:23 剩余TP:0 =======【技能分类】================= -------【波动】--------------------- 波动刻印,等级:18 杀气感知,等级:1 地裂·波动剑,等级:5 心眼,等级:9 裂波斩,等级:24 强制 - 裂波斩,等级:1 强制 - 波动剑,等级:1 冰刃·波动剑,等级:26 挫折意志,等级:17 波动爆发,等级:17 鬼印珠,等级:23 邪光斩,等级:3 修罗邪光斩,等级:1 杀意波动,等级:21 爆炎·波动剑,等级:5 邪光波动阵,等级:16 不动明王阵,等级:13 波动眼,等级:1 强化 - 波动刻印,等级:2 冰极·裂波剑 ,等级:3 极烈·裂波剑 ,等级:1 -------【武器技】--------------------- 上挑,等级:1 强制 - 上挑,等级:1 三段斩,等级:1 格挡,等级:1 短剑精通,等级:19 -------【血气】--------------------- 崩山击,等级:1 -------【鬼神】--------------------- 鬼斩,等级:30 刀魂之卡赞,等级:1 强制 - 鬼斩,等级:1 强化 - 鬼斩,等级:3 -------【通用】--------------------- 重甲精通,等级:1 后跳,等级:1 强制 - 后跳,等级:1 基础精通,等级:70 阿修罗板甲专精,等级:1 远古记忆,等级:10 不屈意志,等级:10 魔法暴击,等级:10 受身蹲伏,等级:1 智力之源,等级:3 命中精通,等级:3 回避精通,等级:3
1 下一页