\8fÍ/5.1_\8e\9e\8aÔ\82Ì\8cv\91ª1.cpp - RSS feed" href="/view?p=psychlops/cpp_document.git;a=rss;f=Psychlops.manual/sample_cpp_file/5%C2%8F%C3%8D/5.1_%C2%8E%C2%9E%C2%8A%C3%94%C2%82%C3%8C%C2%8Cv%C2%91%C2%AA1.cpp" type="application/rss+xml" /> \8fÍ/5.1_\8e\9e\8aÔ\82Ì\8cv\91ª1.cpp - RSS feed (no merges)" href="/view?p=psychlops/cpp_document.git;a=rss;f=Psychlops.manual/sample_cpp_file/5%C2%8F%C3%8D/5.1_%C2%8E%C2%9E%C2%8A%C3%94%C2%82%C3%8C%C2%8Cv%C2%91%C2%AA1.cpp;opt=--no-merges" type="application/rss+xml" /> \8fÍ/5.1_\8e\9e\8aÔ\82Ì\8cv\91ª1.cpp - Atom feed" href="/view?p=psychlops/cpp_document.git;a=atom;f=Psychlops.manual/sample_cpp_file/5%C2%8F%C3%8D/5.1_%C2%8E%C2%9E%C2%8A%C3%94%C2%82%C3%8C%C2%8Cv%C2%91%C2%AA1.cpp" type="application/atom+xml" /> \8fÍ/5.1_\8e\9e\8aÔ\82Ì\8cv\91ª1.cpp - Atom feed (no merges)" href="/view?p=psychlops/cpp_document.git;a=atom;f=Psychlops.manual/sample_cpp_file/5%C2%8F%C3%8D/5.1_%C2%8E%C2%9E%C2%8A%C3%94%C2%82%C3%8C%C2%8Cv%C2%91%C2%AA1.cpp;opt=--no-merges" type="application/atom+xml" />

OSDN Git Service

hk
[psychlops/cpp_document.git] / Psychlops.manual / sample_cpp_file / 5\8fÍ / 5.1_\8e\9e\8aÔ\82Ì\8cv\91ª1.cpp
1 #include <psychlops.h>\r
2 using namespace Psychlops;\r
3 \r
4 void psychlops_main() {\r
5  \r
6  Canvas sampleA(Canvas::fullscreen);\r
7  double elapsed=0.0, dcx, dcy;\r
8  Clock Start, End;\r
9  \r
10  dcx=sampleA.getHcenter();\r
11  dcy=sampleA.getVcenter();\r
12  sampleA.clear(Color(0.5));\r
13  sampleA.flip();\r
14  \r
15  while(!Input::get(Keyboard::esc)) {\r
16  \r
17         if(Input::get(Keyboard::spc, Keyboard::released)){\r
18                 End.update();\r
19                 elapsed=(End-Start).at_msec();\r
20                 sampleA.clear(Color(0.5));\r
21                 sampleA.flip();\r
22                 sampleA.clear(Color(0.5));\r
23                 sampleA.msg("Elapsed Time(msec)", dcx-100,dcy-30, Color::white);\r
24                 sampleA.var((int)elapsed,dcx ,dcy, Color::white);\r
25                 sampleA.flip();\r
26                 }\r
27   \r
28         if(Input::get(Keyboard::spc, Keyboard::pushed)){\r
29                 Start.update();\r
30                 Input::refresh();\r
31                 } \r
32         }\r
33 }