void Piezo::ohhh() { for (int i=1000; i<2000; i=i*1.02) { _beep(i,10); } for (int i=2000; i>1000; i=i*.98) { _beep(i,10); } }
void Piezo::uhoh() { for (int i=1000; i<1244; i=i*1.01) { _beep(i,30); } delay(200); for (int i=1244; i>1108; i=i*.99) { _beep(i,30); } }
void Piezo::squeak() { for (int i=100; i<5000; i=i*1.45) { _beep(i,60); } delay(10); for (int i=100; i<6000; i=i*1.5) { _beep(i,20); } }
void Piezo::catcall() { for (int i=1000; i<5000; i=i*1.05) { _beep(i,10); } delay(300); for (int i=1000; i<3000; i=i*1.03) { _beep(i,10); } for (int i=3000; i>1000; i=i*.97) { _beep(i,10); } }
void Piezo::laugh() { for (int i=1000; i<2000; i=i*1.10) { _beep(i,10); } delay(50); for (int i=1000; i>500; i=i*.90) { _beep(i,10); } delay(50); for (int i=1000; i<2000; i=i*1.10) { _beep(i,10); } delay(50); for (int i=1000; i>500; i=i*.90) { _beep(i,10); } delay(50); for (int i=1000; i<2000; i=i*1.10) { _beep(i,10); } delay(50); for (int i=1000; i>500; i=i*.90) { _beep(i,10); } delay(50); for (int i=1000; i<2000; i=i*1.10) { _beep(i,10); } delay(50); for (int i=1000; i>500; i=i*.90) { _beep(i,10); } delay(50); }
void Piezo::waka() { for (int i=1000; i<3000; i=i*1.05) { _beep(i,10); } delay(100); for (int i=2000; i>1000; i=i*.95) { _beep(i,10); } for (int i=1000; i<3000; i=i*1.05) { _beep(i,10); } delay(100); for (int i=2000; i>1000; i=i*.95) { _beep(i,10); } for (int i=1000; i<3000; i=i*1.05) { _beep(i,10); } delay(100); for (int i=2000; i>1000; i=i*.95) { _beep(i,10); } for (int i=1000; i<3000; i=i*1.05) { _beep(i,10); } delay(100); for (int i=2000; i>1000; i=i*.95) { _beep(i,10); } }
void Piezo::scale() { _beep(note_C7,500); //C: play the note C for 500ms _beep(note_D7,500); //D _beep(note_E7,500); //E _beep(note_F7,500); //F _beep(note_G7,500); //G _beep(note_A7,500); //A _beep(note_B7,500); //B _beep(note_C8,500); //C }
void Piezo::closeEncounters() { _beep(note_Bb5,300); //B b delay(50); _beep(note_C6,300); //C delay(50); _beep(note_Ab5,300); //A b delay(50); _beep(note_Ab4,300); //A b delay(50); _beep(note_Eb5,500); //E b delay(500); _beep(note_Bb4,300); //B b delay(100); _beep(note_C5,300); //C delay(100); _beep(note_Ab4,300); //A b delay(100); _beep(note_Ab3,300); //A b delay(100); _beep(note_Eb4,500); //E b delay(500); _beep(note_Bb3,300); //B b delay(200); _beep(note_C4,300); //C delay(200); _beep(note_Ab3,300); //A b delay(500); _beep(note_Ab2,300); //A b delay(550); _beep(note_Eb3,500); //E b }
void Piezo::r2D2(){ _beep(note_A7,100); //A _beep(note_G7,100); //G _beep(note_E7,100); //E _beep(note_C7,100); //C _beep(note_D7,100); //D _beep(note_B7,100); //B _beep(note_F7,100); //F _beep(note_C8,100); //C _beep(note_A7,100); //A _beep(note_G7,100); //G _beep(note_E7,100); //E _beep(note_C7,100); //C _beep(note_D7,100); //D _beep(note_B7,100); //B _beep(note_F7,100); //F _beep(note_C8,100); //C }
void Piezo::laugh2() { _beep(note_C6,200); //C _beep(note_E6,200); //E _beep(note_G6,200); //G _beep(note_C7,200); //C _beep(note_C6,200); //C delay(50); _beep(note_C6,200); //C _beep(note_E6,200); //E _beep(note_G6,200); //G _beep(note_C7,200); //C _beep(note_C6,200); //C delay(50); _beep(note_C6,50); //C delay(50); _beep(note_C6,50); //C delay(50); _beep(note_C6,50); //C delay(50); _beep(note_C6,50); //C delay(50); _beep(note_C6,50); //C delay(50); _beep(note_C6,50); //C delay(50); _beep(note_C6,50); //C }
void Piezo::ariel() { _beep(note_C6,300); //C delay(50); _beep(note_D6,300); //D delay(50); _beep(note_Eb6,600); //D# delay(250); _beep(note_D6,300); //D delay(50); _beep(note_Eb6,300); //D# delay(50); _beep(note_F6,600); //F delay(250); _beep(note_C6,300); //C delay(50); _beep(note_D6,300); //D delay(50); _beep(note_Eb6,500); //D# delay(50); _beep(note_D6,300); //D delay(50); _beep(note_Eb6,300); //D# delay(50); _beep(note_D6,300); //D delay(50); _beep(note_Eb6,300); //D# delay(50); _beep(note_F6,600); //F delay(50); }
/* -------------------------------------------------- int PassClipboardDataToObject(ENTITY *e) Desc: Copies general information from the clipboard struct to ENTITY *e, and continues to copy the remaining unique characteristics information based on clipboard.of_objtype. Returns: -1 if e.ObjectType falls out of range (rare) or the clipboard is empty. (clipboard.AnyData = 0) -------------------------------------------------- */ int PassClipboardDataToObject(ENTITY *e) { while(!e) wait(1); WriteLog("[ ] Copying back data from clipboard to "); WriteLog( (STRING *) e->type); NewLine(); // Double check if(!clipboard.AnyData) { _beep(); WriteLog("!! [ERROR] Clipboard contains no data, returns -1."); NewLine(); return -1; } //////////////////////////////////////////////////////////// // As usual, pass general data first. //////////////////////////////////////////////////////////// e.ambient = clipboard._ambient; e.alpha = clipboard._alpha; e.scale_x = clipboard._scale_x; e.scale_y = clipboard._scale_y; e.scale_z = clipboard._scale_z; e.pan = clipboard._pan; e.tilt = clipboard._tilt; e.roll = clipboard._roll; int i = 0; for(; i < MAX_PUBLIC_SKILLS + MAX_PRIVATE_SKILLS;i++) e.skill[i] = clipboard._skill[i]; if(clipboard.of_objtype > Object && clipboard.of_objtype <= ObjectNode) { WriteLog("[ ] Clipboard contains information of a neutral object."); NewLine(); e.ObjectType = clipboard.of_objtype; if(clipboard._flags[0]) set(e,BRIGHT); else reset(e,BRIGHT); if(clipboard._flags[1]) set(e,INVISIBLE); else reset(e,INVISIBLE); if(clipboard._flags[2]) set(e,NOFOG); else reset(e,NOFOG); if(clipboard._flags[3]) set(e,OVERLAY); else reset(e,OVERLAY); if(clipboard._flags[4]) set(e,PASSABLE); else reset(e,PASSABLE); if(clipboard._flags[5]) set(e,POLYGON); else reset(e,POLYGON); if(clipboard._flags[6]) set(e,SHADOW); else reset(e,SHADOW); if(clipboard._flags[7]) set(e,TRANSLUCENT); else reset(e,TRANSLUCENT); WriteLog("[X] Task completed."); NewLine(); return 1; } if(clipboard.of_objtype == Light) { WriteLog("[ ] Clipboard contains information of a light object."); NewLine(); e.red = clipboard._red; e.green = clipboard._green; e.blue = clipboard._blue; e.lightrange = clipboard._range; e.LightMode = clipboard._LightMode; #ifndef A7_DEVELOPMENT e.material = mtl_model; #endif WriteLog("[X] Task completed."); NewLine(); return 1; } if(clipboard.of_objtype == Particle) { WriteLog("[ ] Clipboard contains information of a particle object."); NewLine(); #ifndef A7_DEVELOPMENT e.material = mtl_model; #endif WriteLog("[X] Task completed."); NewLine(); return 1; } if(clipboard.of_objtype == Sound) { WriteLog("[ ] Clipboard contains information of a sound object."); NewLine(); #ifndef A7_DEVELOPMENT e.material = mtl_sprite; #endif WriteLog("[X] Task completed."); NewLine(); return 1; } if(clipboard.of_objtype == Sprite) { WriteLog("[ ] Clipboard contains information of a sprite object."); NewLine(); WriteLog("[X] Task completed."); NewLine(); return 1; } if(clipboard.of_objtype == Terrain) { WriteLog("[ ] Clipboard contains information of a terrain."); NewLine(); WriteLog("[X] Task completed."); NewLine(); return 1; } if(clipboard.of_objtype == ObjectNode) { WriteLog("[ ] Clipboard contains data of a node object."); NewLine(); WriteLog("[X] Task completed."); NewLine(); return 1; } return -1; }