Misc nitpicking
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4675 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
4e36fc1f78
commit
f78001c7b2
@ -39,6 +39,9 @@ private:
|
||||
Challenge *getChallenge (const std::string& id);
|
||||
void computeActive ();
|
||||
void load ();
|
||||
|
||||
void unlockFeature (Challenge* c, bool do_save=true);
|
||||
|
||||
public:
|
||||
UnlockManager ();
|
||||
~UnlockManager ();
|
||||
@ -64,7 +67,6 @@ public:
|
||||
|
||||
void raceFinished ();
|
||||
void grandPrixFinished ();
|
||||
void unlockFeature (Challenge* c, bool do_save=true);
|
||||
void lockFeature (Challenge* challenge);
|
||||
bool isLocked (const std::string& feature);
|
||||
void check () const;
|
||||
|
@ -60,6 +60,7 @@ const int MIN_SUPPORTED_WIDTH = 800;
|
||||
IrrDriver::IrrDriver()
|
||||
{
|
||||
m_res_switching = false;
|
||||
m_device = NULL;
|
||||
file_manager->dropFileSystem();
|
||||
initDevice();
|
||||
} // IrrDriver
|
||||
@ -67,7 +68,10 @@ IrrDriver::IrrDriver()
|
||||
// ----------------------------------------------------------------------------
|
||||
IrrDriver::~IrrDriver()
|
||||
{
|
||||
//std::cout << "^^^^^^^^ Dropping m_device ^^^^^^^^\n";
|
||||
assert(m_device != NULL);
|
||||
m_device->drop();
|
||||
m_device = NULL;
|
||||
} // ~IrrDriver
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@ -78,6 +82,7 @@ void IrrDriver::initDevice()
|
||||
// ---- the first time, get a list of available video modes
|
||||
if (firstTime)
|
||||
{
|
||||
//std::cout << "^^^^^^^^ Creating m_device (as NULL) ^^^^^^^^\n";
|
||||
m_device = createDevice(video::EDT_NULL);
|
||||
|
||||
video::IVideoModeList* modes = m_device->getVideoModeList();
|
||||
@ -107,6 +112,7 @@ void IrrDriver::initDevice()
|
||||
//" resolution=" << modes->getVideoModeResolution(i).Width <<
|
||||
//"x" << modes->getVideoModeResolution(i).Height << std::endl;
|
||||
}
|
||||
//std::cout << "^^^^^^^^ Closing m_device ^^^^^^^^\n";
|
||||
m_device->closeDevice();
|
||||
|
||||
firstTime = false;
|
||||
@ -145,6 +151,7 @@ void IrrDriver::initDevice()
|
||||
// Try 32 and, upon failure, 24 then 16 bit per pixels
|
||||
for(int bits=32; bits>15; bits -=8)
|
||||
{
|
||||
//std::cout << "^^^^^^^^ CREATING m_device ^^^^^^^^\n";
|
||||
m_device = createDevice(type,
|
||||
core::dimension2d<u32>(UserConfigParams::m_width,
|
||||
UserConfigParams::m_height ),
|
||||
@ -317,7 +324,9 @@ void IrrDriver::doApplyResSettings()
|
||||
GUIEngine::clear();
|
||||
GUIEngine::cleanUp();
|
||||
|
||||
//std::cout << "^^^^^^^^ Closing m_device ^^^^^^^^\n";
|
||||
m_device->closeDevice();
|
||||
//std::cout << "^^^^^^^^ Dropping m_device ^^^^^^^^\n";
|
||||
m_device->drop();
|
||||
m_device = NULL;
|
||||
m_video_driver = NULL;
|
||||
|
@ -109,6 +109,7 @@ FileManager::FileManager(char *argv[])
|
||||
getcwd(buffer, 256);
|
||||
#endif
|
||||
|
||||
//std::cout << "^^^^^^^^ CREATING m_device (NULL) in FileManager ^^^^^^^^\n";
|
||||
m_device = createDevice(video::EDT_NULL);
|
||||
|
||||
#ifdef __APPLE__
|
||||
@ -161,6 +162,8 @@ FileManager::FileManager(char *argv[])
|
||||
*/
|
||||
void FileManager::dropFileSystem()
|
||||
{
|
||||
//std::cout << "^^^^^^^^ Dropping m_device (in FileManager) ^^^^^^^^\n";
|
||||
|
||||
m_device->drop();
|
||||
} // dropFileSystem
|
||||
|
||||
@ -171,6 +174,8 @@ void FileManager::dropFileSystem()
|
||||
void FileManager::setDevice(IrrlichtDevice *device)
|
||||
{
|
||||
m_device = device;
|
||||
|
||||
//std::cout << "^^^^^^^^ GRABBING m_device (FileManager) ^^^^^^^^\n";
|
||||
m_device->grab(); // To make sure that the device still exists while
|
||||
// file_manager has a pointer to the file system.
|
||||
m_file_system = m_device->getFileSystem();
|
||||
@ -200,6 +205,7 @@ FileManager::~FileManager()
|
||||
popTextureSearchPath();
|
||||
// m_file_system is ref-counted, so no delete/drop necessary.
|
||||
m_file_system = NULL;
|
||||
//std::cout << "^^^^^^^^ Dropping m_device (FileManager) ^^^^^^^^\n";
|
||||
m_device->drop();
|
||||
} // ~FileManager
|
||||
|
||||
|
@ -31,16 +31,6 @@ StandardRace::~StandardRace()
|
||||
{
|
||||
} // ~StandardRace
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark clock events
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark overridden from World
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Called once per frame to update race specific data structures.
|
||||
* \param dt TIme step size.
|
||||
|
@ -58,8 +58,7 @@ PlayerKart* RaceManager::getPlayerKart(const unsigned int n)
|
||||
}
|
||||
Kart* RaceManager::getKart(const unsigned int n)
|
||||
{
|
||||
if(n<0||n>2)
|
||||
printf("X");
|
||||
//if (n<0||n>2) printf("X");
|
||||
return m_world->getKart(n);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -53,11 +53,6 @@ RaceOverDialog::RaceOverDialog(const float percentWidth,
|
||||
const int margin_between_buttons = 12;
|
||||
const int buttons_y_from = m_area.getHeight() - 3*(button_h + margin_between_buttons);
|
||||
|
||||
if (unlock_manager->getRecentlyUnlockedFeatures().size()>0)
|
||||
{
|
||||
// TODO: unlocked features
|
||||
}
|
||||
|
||||
// ---- Ranking
|
||||
core::rect< s32 > area(0, 0, m_area.getWidth()*2/3, text_height);
|
||||
IGUIStaticText* caption = GUIEngine::getGUIEnv()->addStaticText( _("Race Results"),
|
||||
@ -192,7 +187,6 @@ RaceOverDialog::RaceOverDialog(const float percentWidth,
|
||||
|
||||
|
||||
// ---- Buttons at the bottom
|
||||
// TODO: make these buttons work
|
||||
if (race_manager->getMajorMode() == RaceManager::MAJOR_MODE_SINGLE)
|
||||
{
|
||||
ButtonWidget* new_race_btn = new ButtonWidget();
|
||||
|
Loading…
Reference in New Issue
Block a user