Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7767


Ignore:
Timestamp:
Dec 15, 2010, 5:45:16 PM (13 years ago)
Author:
youngk
Message:

Committing a few minor changes to some files. They affect: Keyboard input on the Mac; Introduction of new Moods and debugging of Mac sound.

Location:
code/branches/ois_update
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ois_update/data/gui/scripts/AudioMenu.lua

    r6746 r7767  
    3232    table.insert(themeList, "Default")
    3333    table.insert(themeList, "Drum n' Bass")
     34    table.insert(themeList, "8-Bit Style")
     35    table.insert(themeList, "Corny Jazz")
    3436    for k,v in pairs(themeList) do
    3537        item = CEGUI.createListboxTextItem(v)
     
    3941    if orxonox.getConfig("MoodManager", "mood_") == "dnb" then
    4042        listboxwindow:setItemSelectState(1,true)
     43    elseif orxonox.getConfig("MoodManager", "mood_") == "eightbit" then
     44        listboxwindow:setItemSelectState(2,true)
     45    elseif orxonox.getConfig("MoodManager", "mood_") == "jazzy" then
     46        listboxwindow:setItemSelectState(3,true)
    4147    else
    4248        listboxwindow:setItemSelectState(0,true)
     
    163169    if listboxwindow:isItemSelected(1) then
    164170        orxonox.config("MoodManager", "mood_", "dnb")
     171    elseif listboxwindow:isItemSelected(2) then
     172        orxonox.config("MoodManager", "mood_", "eightbit")
     173    elseif listboxwindow:isItemSelected(3) then
     174        orxonox.config("MoodManager", "mood_", "jazzy")
    165175    else
    166176        orxonox.config("MoodManager", "mood_", "default")
  • code/branches/ois_update/src/external/ois/mac/MacKeyboard.cpp

    r7691 r7767  
    199199        char macChar;
    200200       
    201         // @TODO clean this up
    202201        if (mTextMode == Unicode)
    203202        {
    204203                //get string size
    205204                UInt32 stringsize;
    206                 //status = GetEventParameter( theEvent, 'kuni', typeUnicodeText, NULL, 0, &stringsize, NULL);
    207                 //status = GetEventParameter( theEvent, 'kuni', typeUnicodeText, NULL, sizeof(UniChar)*10, NULL, &text );
    208205                status = GetEventParameter( theEvent, 'kuni', typeUnicodeText, NULL, sizeof(UniChar) * 10, &stringsize, &text );
    209                 std::cout << "OIS: MacKeyboard::_keyDownCallback(): String length: " << stringsize << std::endl;
    210                
    211                 //wstring unitext;
    212                 //for (int i=0;i<10;i++) unitext += (wchar_t)text[i];
    213                 //wcout << "Unicode out: " << unitext << endl;
    214206               
    215207                if(stringsize > 0)
  • code/branches/ois_update/src/libraries/core/GUIManager.cc

    r7719 r7767  
    345345    void GUIManager::buttonPressed(MouseButtonCode::ByEnum id)
    346346    {
     347        //guiSystem_->injectMouseButtonDown(convertButton(id));
    347348        this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonDown, _1, convertButton(id)));
    348349    }
  • code/branches/ois_update/src/orxonox/MoodManager.cc

    r7284 r7767  
    5050
    5151        // Checking for the existence of the folder for the default mood
    52         const std::string& path = "ambient/" + MoodManager::defaultMood_ + "/.";
    53         if (!Resource::exists(path))
     52        const std::string& patha = "ambient/" + MoodManager::defaultMood_ + "/.";
     53        if (!Resource::exists(patha))
    5454        {
    5555            // TODO: Non-fatal error handling (non-critical resource missing)
    5656            COUT(2) << "Mood Warning: Folder for default mood (" << MoodManager::defaultMood_ << ") does not exist!" << std::endl;
    5757        }
     58       
     59        // @TODO
     60        // Creating a vector of the available moods to enable easy mood selection by Lua/CEGUI       
    5861    }
    5962
  • code/branches/ois_update/src/orxonox/sound/AmbientSound.cc

    r6417 r7767  
    4848
    4949        // Ambient sounds always fade in
    50         this->setVolume(0);
     50        this->setVolume(0.0f);
    5151        this->registerVariables();
    5252    }
  • code/branches/ois_update/src/orxonox/sound/SoundManager.cc

    r7701 r7767  
    8383        SetConfigValue(bDisableSound_, false);
    8484        if (bDisableSound_)
    85             ThrowException(InitialisationAborted, "Sound: Not loading at all");
    86 
     85            ThrowException(InitialisationAborted, "Sound: Not loading at all");       
    8786        if (!alutInitWithoutContext(NULL, NULL))
    8887            ThrowException(InitialisationFailed, "Sound Error: ALUT initialisation failed: " << alutGetErrorString(alutGetError()));
     
    132131        GameMode::setPlaysSound(true);
    133132        Loki::ScopeGuard resetPlaysSoundGuard = Loki::MakeGuard(&GameMode::setPlaysSound, false);
    134 
     133       
    135134        // Get some information about the sound
    136135        if (const char* version = alGetString(AL_VERSION))
    137             COUT(4) << "Sound: --- OpenAL Version: " << version << std::endl;
     136            COUT(4) << "Sound: --- OpenAL Version: " << version << std::endl;           
    138137        if (const char* vendor = alGetString(AL_VENDOR))
    139138            COUT(4) << "Sound: --- OpenAL Vendor : " << vendor << std::endl;
Note: See TracChangeset for help on using the changeset viewer.