changeset 18:fafb468bd914 draft

July 5th
author e105711 <yomitan.ie.u-ryukyu.ac.jp>
date Thu, 05 Jul 2012 15:18:19 +0900
parents 1e8fa3c370ab
children 1fdbfe8c9f4d
files webGL/src/const.js webGL/src/f4notes.js webGL/src/f4xml.js webGL/src/mainfunc.js
diffstat 4 files changed, 26 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/webGL/src/const.js	Tue Jul 03 23:39:21 2012 +0900
+++ b/webGL/src/const.js	Thu Jul 05 15:18:19 2012 +0900
@@ -26,7 +26,7 @@
 const keySpace = 32;
 
 // judges (s)
-const PERFECT = 0.025;
-const GREAT = 0.05;
-const GOOD = 0.075;
-const BAD = 0.1;
+const PERFECT = 0.03;
+const GREAT = 0.06;
+const GOOD = 0.09;
+const BAD = 0.12;
--- a/webGL/src/f4notes.js	Tue Jul 03 23:39:21 2012 +0900
+++ b/webGL/src/f4notes.js	Thu Jul 05 15:18:19 2012 +0900
@@ -59,11 +59,16 @@
 }
 
 function showResult(){
-    console.log("PERFECT:" + perfectCount);
-    console.log("GREAT:" + greatCount);
-    console.log("GOOD:" + goodCount);
-    console.log("BAD:" + badCount);
-    console.log("POOR:" + poorCount);
+    objsArray.push(new Obj(100,30,1,"perfect_count"));
+    objsArray.push(new Obj(100,40,1,"great_count"));
+    objsArray.push(new Obj(100,50,1,"good_count"));
+    objsArray.push(new Obj(100,60,1,"bad_count"));
+    objsArray.push(new Obj(100,70,1,"poor_count"));
+    drawText(ctx,"perfect_count","PERFECT    "+perfectCount,40,"white","left",450,50);
+    drawText(ctx,"great_count"  ,"GREAT      "+greatCount,40,"white","left",450,50);
+    drawText(ctx,"good_count"   ,"GOOD       "+goodCount,40,"white","left",450,50);
+    drawText(ctx,"bad_count"    ,"BAD        "+badCount,40,"white","left",450,50);
+    drawText(ctx,"poor_count"   ,"POOR       "+poorCount,40,"white","left",450,50);
     resetResult();
 }
 
--- a/webGL/src/f4xml.js	Tue Jul 03 23:39:21 2012 +0900
+++ b/webGL/src/f4xml.js	Thu Jul 05 15:18:19 2012 +0900
@@ -8,6 +8,12 @@
     drawText(gl,"main_mode"," main mode ",60,"white","center",450,70);
     drawText(gl,"select_music"," select music ",60,"white","center",450,70);
     drawText(gl,"music_title","",60,"white","center",432,86);
+    drawText(gl,"result_title","result",60,"white","center",450,70);
+    drawText(gl,"perfect_count","",40,"white","center",450,50);
+    drawText(gl,"great_count","",40,"white","center",450,50);
+    drawText(gl,"good_count","",40,"white","center",450,50);
+    drawText(gl,"bad_count","",40,"white","center",450,50);
+    drawText(gl,"poor_count","",40,"white","center",450,50);
 }
 
 function loadObjXml(gl,url)
--- a/webGL/src/mainfunc.js	Tue Jul 03 23:39:21 2012 +0900
+++ b/webGL/src/mainfunc.js	Thu Jul 05 15:18:19 2012 +0900
@@ -30,18 +30,20 @@
 function toMain(){
     MODE = MAIN;
     objsArray.length = 0;
-    objsArray.push(new Obj(100,7.8125,1,"main_mode")); // main mode
+    objsArray.push(new Obj(100,7.8125,1,"main_mode"));
     objsArray.push(new Obj(100,105,1,"line"));
 }
 
 function toPlay(){
     MODE = PLAY;
     objsArray.length = 0;
-    objsArray.push(new Obj(100,7.8125,1,"main_mode")); // main mode
+    objsArray.push(new Obj(100,7.8125,1,"main_mode"));
     loadMusics(musicsArray[cursor.getIndex()]);
 }
 
 function toResult(){
+    objsArray.length = 0;
+    objsArray.push(new Obj(100,7.8125,1,"result_title"));
     MODE = RESULT;
     showResult();
 }
@@ -56,9 +58,9 @@
     }
     if(MODE==PLAY){
 	drawNote(ctx);
-	PutSpriteF(ctx,100,105,1,ctx.obj["line"]); // line
+	PutSpriteF(ctx,100,105,1,ctx.obj["line"]);
     }
-    PutSpriteF(ctx,100,70,1,ctx.obj["back"]); // background
+    PutSpriteF(ctx,100,70,1,ctx.obj["back"]);
     ctx.flush();
 }