void bitman2() { unsigned char data[16]; decode((unsigned char*)"0098e41f1fe49800", data); decode((unsigned char*)"0884e43e3ee48408", data + 8); int ptn = 0; playMML("CDE2CDE2"); for (;;) { setMatrix2((char*)(data + ptn * 8)); wait(10000); ptn = 1 - ptn; if (ux_btn()) { ptn = 1 - ptn; } } }
void MappedValues::fromJson(const Json::Value& root) { Json::Value floats = root["Floats"], ints = root["Ints"], uints = root["Uints"], strings = root["Strings"], vector2s = root["Vector2s"], vector3s = root["Vector3s"], vector4s = root["Vector4s"], matrix2s = root["Matrix2s"], matrix3s = root["Matrix3s"], matrix4s = root["Matrix4s"], textures = root["Textures"]; for (auto i = floats.begin(); i != floats.end(); i++) { setFloat(i.name(), (*i).asFloat()); } for (auto i = ints.begin(); i != ints.end(); i++) { setI32(i.name(), (*i).asInt()); } for (auto i = uints.begin(); i != uints.end(); i++) { setU32(i.name(), (*i).asUInt()); } for (auto i = strings.begin(); i != strings.end(); i++) { setString(i.name(), (*i).asString()); } for (auto i = vector2s.begin(); i != vector2s.end(); i++) { Vector2 vec((*i)[0].asFloat(), (*i)[1].asFloat()); setVector2(i.name(), vec); } for (auto i = vector3s.begin(); i != vector3s.end(); i++) { Vector3 vec((*i)[0].asFloat(), (*i)[1].asFloat(), (*i)[2].asFloat()); setVector3(i.name(), vec); } for (auto i = vector4s.begin(); i != vector4s.end(); i++) { Vector4 vec((*i)[0].asFloat(), (*i)[1].asFloat(), (*i)[2].asFloat(), (*i)[3].asFloat()); setVector4(i.name(), vec); } for (auto i = matrix2s.begin(); i != matrix2s.end(); i++) { Matrix2 mat((*i)[0].asFloat(), (*i)[1].asFloat(), (*i)[2].asFloat(), (*i)[3].asFloat()); setMatrix2(i.name(), mat); } for (auto i = matrix3s.begin(); i != matrix3s.end(); i++) { Matrix3 mat((*i)[0].asFloat(), (*i)[1].asFloat(), (*i)[2].asFloat(), (*i)[3].asFloat(), (*i)[4].asFloat(), (*i)[5].asFloat(), (*i)[6].asFloat(), (*i)[7].asFloat(), (*i)[8].asFloat()); setMatrix3(i.name(), mat); } for (auto i = matrix4s.begin(); i != matrix4s.end(); i++) { Matrix4 mat((*i)[0].asFloat(), (*i)[1].asFloat(), (*i)[2].asFloat(), (*i)[3].asFloat(), (*i)[4].asFloat(), (*i)[5].asFloat(), (*i)[6].asFloat(), (*i)[7].asFloat(), (*i)[8].asFloat(), (*i)[9].asFloat(), (*i)[10].asFloat(), (*i)[11].asFloat(), (*i)[12].asFloat(), (*i)[13].asFloat(), (*i)[14].asFloat(), (*i)[15].asFloat()); setMatrix4(i.name(), mat); } for (auto i = textures.begin(); i != textures.end(); i++) { setTexture(i.name(), resourceManager->fetchTextureLoad((*i).asString())); } }
void app_hit10() { // 10秒あてゲーム for (;;) { playMML("L8ER8EG16E16"); ux_btn(); for (;;) { FILL("afeaaa0067252577"); // title FLUSH(); if (ux_btn()) break; } playMML("C"); FILL(PTN_3); FLUSH(); WAIT(1000); playMML("C"); FILL(PTN_2); FLUSH(); WAIT(1000); playMML("C"); FILL(PTN_1); FLUSH(); WAIT(1000); playMML("G2"); FILL(PTN_GO); FLUSH(); WAIT(1000); CLS(1); systick = 0; int cnt = 0; int bkbtn = 0; for (;;) { int btn = ux_btn(); if (btn && !bkbtn) { playMML("A4"); CLS(0); break; } bkbtn = btn; setMatrix2(buf); wait(10); } unsigned int score = (10 * 100000 - systick) / 1000; if (score < 0) score = -score; playMML("L8CEG"); FILL("00c9aaacacaaaa69"); // ok xprintf("%d\n", systick); xprintf("%d\n", score); /* for (int i = 0;; i++) { int n = time % 10; time /= 10; if (time == 0) break; FILL(PTN_NUM[n]); FLUSH(); WAIT(500); } */ FILL(PTN_NUM[score / 10]); PSET(6, 6); FLUSH(); WAIT(1000); FILL(PTN_NUM[score % 10]); FLUSH(); WAIT(1000); FLUSH(); WAIT(1000); } }
void setMatrixLong(long data) { setMatrix2((char*)&data); }