All translations
Jump to navigation
Jump to search
Enter a message name below to show all available translations.
Found 3 translations.
Name | Current message text |
---|---|
h English (en) | <source lang="c++"> bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString& weapon_to_look_up, WeaponModifier required_modifier, const char** weapon_to_use_name, WeaponModifier* modifier_to_use, void* unknown) { // some checks using 'unknown' here which seems to be a pointer to the actor // for (weapon_table : this->byml["weapon"]) { // find the first weapon entry for which the player has enough points // with the specified name and modifier i = -1; for (j = 0; j < weapon_table["actors"].size; ++j) { entry = weapon_table["actors"][j]; float points_for_next_transition = entry["value"]; // if (this->weapon_points > points_for_next_transition && weapon_to_look_up == entry["name"] && convert_to_modifier(entry["plus"]) == required_modifier) { i = j; break; } } // if (i == -1) continue; // do { entry = weapon_table["actors"][i]; // // not_rank_up means there is no link between weapons; // this table is just used to look up modifiers. // so go down the list until there are no more entries for the requested weapon // or until we reach a modifier that requires more points. if (weapon_table["not_rank_up"] && entry["name"] != weapon_to_look_up) break; // // otherwise, just go down the list until we reach the end or a weapon which // requires more points. this will possibly upgrade the weapon (e.g. Knight -> Royal). if (this->weapon_points <= entry["value"]) break; // ++i; } while (i < weapon_table["actors"].size); // *weapon_to_use_name = entry["name"]; *modifier_to_use = convert_to_modifier(entry["plus"]); return true; } return false; // cannot scale up } </source> |
h French (fr) | <source lang="c++"> bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString& weapon_to_look_up, WeaponModifier required_modifier, const char** weapon_to_use_name, WeaponModifier* modifier_to_use, void* unknown) { // quelques checks utilisant 'unknown' ici qui semble être un pointeur vers l'acteur // for (weapon_table : this->byml["weapon"]) { // trouve la première arme pour laquelle le joueur a assez de points // avec le nom spécifié et les bonus i = -1; for (j = 0; j < weapon_table["actors"].size; ++j) { entry = weapon_table["actors"][j]; float points_for_next_transition = entry["value"]; // if (this->weapon_points > points_for_next_transition && weapon_to_look_up == entry["name"] && convert_to_modifier(entry["plus"]) == required_modifier) { i = j; break; } } // if (i == -1) continue; // do { entry = weapon_table["actors"][i]; // // not_rank_up signifie qu'il n'y a pas de lien entre les armes; // ce tableau est juste utilisé pour parcourir les bonus. // donc parcourt la liste jusqu'à ce qu'il n'y ait plus d'entrée pour l'arme demandée // ou jusqu'à ce que l'on atteigne un bonus qui nécessite plus de points. if (weapon_table["not_rank_up"] && entry["name"] != weapon_to_look_up) break; // // sinon, parcourt juste la liste jusqu'à atteindre la fin ou une arme qui // requiert plus de points. Cela peut améliorer l'arme (par ex. Chevalier -> Royal). if (this->weapon_points <= entry["value"]) break; // ++i; } while (i < weapon_table["actors"].size); // *weapon_to_use_name = entry["name"]; *modifier_to_use = convert_to_modifier(entry["plus"]); return true; } return false; // ne peut pas niveller } </source> |
h Chinese (zh) | <source lang="c++"> bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString& weapon_to_look_up, // 基礎武器 WeaponModifier required_modifier, // 預設至少加這麼多 const char** weapon_to_use_name, // 回傳的武器寫在這裡 WeaponModifier* modifier_to_use, // 回傳的加成寫在這裡 void* unknown) { // some checks using 'unknown' here which seems to be a pointer to the actor for (weapon_table : this->byml["weapon"]) { // find the first weapon entry for which the player has enough points // with the specified name and modifier // 不同的武器系列儲存在不同的 table 裡,要枚舉 table 再枚舉 table 裡的細項 i = -1; // 應該是 index,但是 -1 代表尚未找到 for (j = 0; j < weapon_table["actors"].size; ++j) { // 枚舉含有加成訊息的武器 entry = weapon_table["actors"][j]; float points_for_next_transition = entry["value"]; // 這個加成過的武器所需的經驗值 if (this->weapon_points > points_for_next_transition && // 你的經驗值夠 weapon_to_look_up == entry["name"] && // 武器的名字是對的 convert_to_modifier(entry["plus"]) == required_modifier) { // 加成的方向跟程度是對的 i = j; break; // 找到一個了(但是可能還有更多) } } if (i == -1) continue; // 找不到就試下一個 do { // 已知找到一個的情況下,試圖找更多 entry = weapon_table["actors"][i]; // not_rank_up means there is no link between weapons; // this table is just used to look up modifiers. // so go down the list until there are no more entries for the requested weapon // or until we reach a modifier that requires more points. if (weapon_table["not_rank_up"] && entry["name"] != weapon_to_look_up) break; // ???這個 table 裡的武器不能升級,或是 entry 是 null (boundary check) // otherwise, just go down the list until we reach the end or a weapon which // requires more points. this will possibly upgrade the weapon (e.g. Knight -> Royal). if (this->weapon_points <= entry["value"]) break; // 枚舉到經驗值最高又符合條件的才停 ++i; } while (i < weapon_table["actors"].size); *weapon_to_use_name = entry["name"]; *modifier_to_use = convert_to_modifier(entry["plus"]); return true; // 有找到 } return false; // cannot scale up // 沒找到 } </source> |