SpellView SpellView::deserialize(std::istream& input) { SpellView _obj = SpellView(); // CurrentCooldown float _obj_CurrentCooldown; input >> _obj_CurrentCooldown; input.ignore(1000, '\n'); _obj.CurrentCooldown = (float)_obj_CurrentCooldown; // SourceCaster int _obj_SourceCaster; input >> _obj_SourceCaster; input.ignore(1000, '\n'); _obj.SourceCaster = (int)_obj_SourceCaster; // Model int _obj_Model; input >> _obj_Model; input.ignore(1000, '\n'); _obj.Model = (int)_obj_Model; // Level int _obj_Level; input >> _obj_Level; input.ignore(1000, '\n'); _obj.Level = (int)_obj_Level; return _obj; }
void MainLoop() { int a=0,b=0; while(1) { you.player_move = true; if(you.s_timestep) { turn_skip(); Sleep(16); continue; } int char_ = waitkeyinput(); you.prev_hp[1] = you.hp; you.prev_mp[1] = you.mp; switch(char_) { case 'j': Move(coord_def(you.position.x,you.position.y-1)); //위 break; case 'k': Move(coord_def(you.position.x,you.position.y+1)); //아래 break; case 'h': Move(coord_def(you.position.x-1,you.position.y)); //왼쪽 break; case 'l': Move(coord_def(you.position.x+1,you.position.y)); //오른쪽 break; case 'b': Move(coord_def(you.position.x-1,you.position.y+1)); break; case 'n': Move(coord_def(you.position.x+1,you.position.y+1)); break; case 'y': Move(coord_def(you.position.x-1,you.position.y-1)); break; case 'u': Move(coord_def(you.position.x+1,you.position.y-1)); break; case 'x': //주위탐색 Search(); break; case 's': //턴스킵 case '.': //턴스킵 turn_skip(); break; case 'g': case ',': //줍기 PickUp(); break; case 'i': //아이템확인 iteminfor(); break; case 'd': //아이템버리기 iteminfor_discard(); break; case 'D': //마지막에 먹은 아이템 버리기 fast_discard(); break; case 'w': //무기장착 Equip_Weapon(); break; case 'W': //방어구장착 Equip_Armor(); break; case 'T': //방어구해제 Unequip_Armor(); break; case 'C': //문닫기 Close_door(); break; case 'O': //문열기 Open_door(); break; case 'o': //자동이동 auto_Move(); break; case '5': //100턴넘기기 long_rest(); break; case 0x88: //컨트롤P - 로그 view_log(); break; case 15: //컨트롤o if(isNormalGame()) dungeonView(); break; case 'e': //먹기 Eatting(); break; case 'q': //마시기 Drinking(); break; case 'r': //읽기 Reading(); break; case 'm': //스킬정보창 skill_view(); break; case 'P': //장신구장착 Equip_Jewelry(); break; case 'R': //장신구해제 Unequip_Jewelry(); break; case 'S': //체크후 종료 saveandcheckexit(); break; case 0x89: //강제종료 nosaveandexit(); break; case 0x8A: //저장과 종료 saveandexit(); break; case 'X': //넓은탐색 Wide_Search(); break; case 'f': //던지기(빠른) Quick_Throw(you.GetThrowIter(),you.GetTargetIter()); break; case 'F': //던지기(선택) Select_Throw(); break; case '\\': //식별템 확인 Iden_Show(); break; case '>': Stair_move(true); break; case '<': Stair_move(false); break; case '%': stat_view(); break; case '}': Weapon_Show(); break; case '[': Armour_Show(); break; case ']': rune_Show(); break; case '\"': Amulet_Show(); break; case '@': Simple_State_Show(); break; case 'N': //sendScore(); break; case 'E': Experience_Show(); break; //case 'c': // Spelllcard_Declare(); // //Eat_Power(); // break; case 'v': case 'V': Spelllcard_Evoke(); break; case 'p': Pray(); break; case '#': if(isNormalGame() && Dump(0,NULL)) printlog("덤프에 성공했습니다.",true,false,false,CL_normal); break; case 'Z': case 'z': SpellUse(); break; case 'I': SpellView(); break; case 'a': SkillUse(); break; case 'A': PropertyView(); break; case 'M': run_spell(); break; case 't': shout(); break; case '^': God_show(); break; case '&': //위자드모드! //waitkeyinput(); wiz_mode(); break; case '_': save_mode(); break; case 0x8B: auto_pick_onoff(false); break; case '?'://도움말 Help_Show(); break; case VK_ESCAPE://esc escape(); break; case VK_TAB: auto_battle(); break; default: break; } } }