char16 GetUnknownCharacter(DecodeOptions options = doDefault) { if ((options & doThrowOnInvalidWCHARs) != 0) { throw InvalidWideCharException(); } return char16(UNICODE_UNKNOWN_CHAR_MARK); }
// Test C++ cast'ing of vector types. void casts(longlong16 ll16, longlong16_e ll16e) { // C-style casts. (void)(char16)ll16; (void)(char16_e)ll16; (void)(longlong16)ll16; (void)(longlong16_e)ll16; (void)(char16)ll16e; (void)(char16_e)ll16e; (void)(longlong16)ll16e; (void)(longlong16_e)ll16e; // Function-style casts. (void)char16(ll16); (void)char16_e(ll16); (void)longlong16(ll16); (void)longlong16_e(ll16); (void)char16(ll16e); (void)char16_e(ll16e); (void)longlong16(ll16e); (void)longlong16_e(ll16e); // static_cast (void)static_cast<char16>(ll16); (void)static_cast<char16_e>(ll16); (void)static_cast<longlong16>(ll16); (void)static_cast<longlong16_e>(ll16); (void)static_cast<char16>(ll16e); (void)static_cast<char16_e>(ll16e); // expected-error{{static_cast from 'longlong16_e' (vector of 2 'long long' values) to 'char16_e' (vector of 16 'char' values) is not allowed}} (void)static_cast<longlong16>(ll16e); (void)static_cast<longlong16_e>(ll16e); // reinterpret_cast (void)reinterpret_cast<char16>(ll16); (void)reinterpret_cast<char16_e>(ll16); (void)reinterpret_cast<longlong16>(ll16); (void)reinterpret_cast<longlong16_e>(ll16); (void)reinterpret_cast<char16>(ll16e); (void)reinterpret_cast<char16_e>(ll16e); (void)reinterpret_cast<longlong16>(ll16e); (void)reinterpret_cast<longlong16_e>(ll16e); }
StateMenu::StateMenu() { m_bDrawGorilla = false; m_konami = {sf::Keyboard::Up, sf::Keyboard::Up, sf::Keyboard::Down, sf::Keyboard::Down, sf::Keyboard::Left, sf::Keyboard::Right, sf::Keyboard::Left, sf::Keyboard::Right, sf::Keyboard::B, sf::Keyboard::A,}; m_TileSet.loadFromFile("Ressources/Texture/Vaisseaux.png"); m_CheatFont.loadFromFile("Ressources/fonts/Hanken-Book.ttf"); m_CheatText.setFont(m_CheatFont); m_CheatText.setString("Invincibility"); m_PlayButton.setTexture(m_TileSet); m_PlayButton.setTextureRect(sf::IntRect(0, 0, 78, 72)); m_PlayButton.setPosition(473, 450); const float beginX = 278; const float beginY = 50; std::shared_ptr<Enemie> char1(new EnemieL(m_TileSet)); char1->SetPos(beginX, beginY); m_EnemieList.push_back(char1); std::shared_ptr<Enemie> char2(new EnemieA(m_TileSet)); char2->SetPos(beginX + 78, beginY); m_EnemieList.push_back(char2); std::shared_ptr<Enemie> char3(new EnemieR(m_TileSet)); char3->SetPos(beginX + 78*2, beginY); m_EnemieList.push_back(char3); std::shared_ptr<Enemie> char4(new EnemieG(m_TileSet)); char4->SetPos(beginX + 78*3, beginY); m_EnemieList.push_back(char4); std::shared_ptr<Enemie> char5(new EnemieE(m_TileSet)); char5->SetPos(beginX + 78*4, beginY); m_EnemieList.push_back(char5); std::shared_ptr<Enemie> char6(new EnemieR(m_TileSet)); char6->SetPos(beginX + 78*5, beginY); m_EnemieList.push_back(char6); std::shared_ptr<Enemie> char7(new EnemieD(m_TileSet)); char7->SetPos(beginX - 78 * 0.5f - 78, beginY + 72); m_EnemieList.push_back(char7); std::shared_ptr<Enemie> char8(new EnemieI(m_TileSet)); char8->SetPos(beginX - 78 * 0.5f, beginY + 72); m_EnemieList.push_back(char8); std::shared_ptr<Enemie> char9(new EnemieM(m_TileSet)); char9->SetPos(beginX + 78 * 0.5f, beginY + 72); m_EnemieList.push_back(char9); std::shared_ptr<Enemie> char10(new EnemieE(m_TileSet)); char10->SetPos(beginX + 78 * 0.5f + 78, beginY + 72); m_EnemieList.push_back(char10); std::shared_ptr<Enemie> char11(new EnemieN(m_TileSet)); char11->SetPos(beginX + 78 * 0.5f + 78*2, beginY + 72); m_EnemieList.push_back(char11); std::shared_ptr<Enemie> char12(new EnemieS(m_TileSet)); char12->SetPos(beginX + 78 * 0.5f + 78*3, beginY + 72); m_EnemieList.push_back(char12); std::shared_ptr<Enemie> char13(new EnemieI(m_TileSet)); char13->SetPos(beginX + 78 * 0.5f + 78*4, beginY + 72); m_EnemieList.push_back(char13); std::shared_ptr<Enemie> char14(new EnemieO(m_TileSet)); char14->SetPos(beginX + 78 * 0.5f + 78*5, beginY + 72); m_EnemieList.push_back(char14); std::shared_ptr<Enemie> char15(new EnemieN(m_TileSet)); char15->SetPos(beginX + 78 * 0.5f + 78*6, beginY + 72); m_EnemieList.push_back(char15); std::shared_ptr<Enemie> char16(new Enemie3(m_TileSet)); char16->SetPos(beginX + 78*2, beginY + 144); m_EnemieList.push_back(char16); std::shared_ptr<Enemie> char17(new Enemie1(m_TileSet)); char17->SetPos(beginX + 78*3, beginY + 144); m_EnemieList.push_back(char17); }
String& String::operator =(const ConstChar& right) { getUnsharedImplementation(1)->setChar(0, right.operator char16()); return *this; }
// The XOR prefix bits mapped to n - 1. // 1xxx -> 00 (8 - 15) // 01xx -> 00 (4 - 7) // 001x -> 01 (2 - 3) // 0001 -> 10 (1) // 0000 -> 11 (0) // This produces the following bit sequence: // 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 // 00 00 00 00 00 00 00 00 00 00 00 00 01 01 10 11 // which is 0x5B return ((0x5B >> (((prefix ^ 0xF0) >> 3) & 0x1E)) & 0x03) + 1; } const char16 WCH_UTF16_HIGH_FIRST = char16(0xd800); const char16 WCH_UTF16_HIGH_LAST = char16(0xdbff); const char16 WCH_UTF16_LOW_FIRST = char16(0xdc00); const char16 WCH_UTF16_LOW_LAST = char16(0xdfff); char16 GetUnknownCharacter(DecodeOptions options = doDefault) { if ((options & doThrowOnInvalidWCHARs) != 0) { throw InvalidWideCharException(); } return char16(UNICODE_UNKNOWN_CHAR_MARK); } inline BOOL InRange(const char16 ch, const char16 chMin, const char16 chMax) {