forked from speed-dreams/speed-dreams-code
Fixed Windows port of #240 fix (messy Race Select menu) + removed minor warnings.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3175 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: ab159b4b057a539883d88040fb2d2f3bf4e22e81 Former-commit-id: 75fb7b3c636233a49ee1308fd970163357b0e982
This commit is contained in:
parent
1743e24477
commit
8a51168ff8
5 changed files with 13 additions and 9 deletions
|
@ -45,7 +45,6 @@ void ReStartWeather(void)
|
|||
int timeofday;
|
||||
int rain;
|
||||
int clouds;
|
||||
int water;
|
||||
int rainprob;
|
||||
int problrain;
|
||||
int probrain;
|
||||
|
|
|
@ -256,7 +256,6 @@ rmdsChangeSkin(void *vp)
|
|||
GfuiLabelSetText(ScrHandle, SkinEditId, pszCurSkinName);
|
||||
|
||||
// Load associated preview image (or "no preview" panel if none available).
|
||||
struct stat st;
|
||||
if (GfFileExists(MapCurDriverSkinPreviewFiles[pszCurSkinName].c_str()))
|
||||
GfuiStaticImageSet(ScrHandle, CarImageId,
|
||||
MapCurDriverSkinPreviewFiles[pszCurSkinName].c_str(),
|
||||
|
@ -612,7 +611,6 @@ RmDriversSelect(void *vs)
|
|||
void *carhdle;
|
||||
void *cathdle;
|
||||
int human;
|
||||
const char* initCarCat;
|
||||
|
||||
// Initialize drivers selection
|
||||
MenuData = (tRmDriverSelect*)vs;
|
||||
|
|
|
@ -2,6 +2,8 @@ INCLUDE(../../../cmake/macros.cmake)
|
|||
|
||||
#PROJECT(tgfdata)
|
||||
|
||||
ADD_PLIB_INCLUDEDIR()
|
||||
|
||||
ADD_INTERFACE_INCLUDEDIR()
|
||||
ADD_OSSPEC_INCLUDEDIR()
|
||||
ADD_SDLIB_INCLUDEDIR(portability txml math tgf)
|
||||
|
@ -12,6 +14,9 @@ SET(TGFDATA_SOURCES carinfo.cpp racemanagers.cpp ${TGFDATA_HEADERS})
|
|||
IF(WIN32)
|
||||
# DLL export stuff under Windows (to avoid .def file)
|
||||
ADD_DEFINITIONS(-DTGFDATA_DLL)
|
||||
|
||||
# Ignore some run-time libs to avoid link time warnings and sometimes even crashes.
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt.lib")
|
||||
ENDIF(WIN32)
|
||||
|
||||
# Disable developer warning
|
||||
|
@ -27,7 +32,7 @@ ENDIF(CMAKE_SKIP_RPATH OR CMAKE_SKIP_BUILD_RPATH)
|
|||
|
||||
ADD_SDLIB_LIBRARY(tgfdata txml tgf)
|
||||
|
||||
ADD_SDL_LIBRARY(tgfdata)
|
||||
ADD_PLIB_LIBRARY(tgfdata sg ul)
|
||||
|
||||
IF(WIN32)
|
||||
SD_INSTALL_FILES(BIN TARGETS tgfdata)
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
||||
#include <tgf.h>
|
||||
|
||||
#include "carinfo.h"
|
||||
|
||||
|
||||
|
@ -113,7 +115,7 @@ CarInfo::CarInfo()
|
|||
// has to be completed before we can GetCategoryRealNames().
|
||||
const std::vector<std::string> vecCatRealNames = GetCategoryRealNames();
|
||||
std::vector<std::string>::const_iterator iterCatName;
|
||||
for (int nCatIndex = 0; nCatIndex < m_priv->vecCategoryNames.size(); nCatIndex++)
|
||||
for (unsigned nCatIndex = 0; nCatIndex < m_priv->vecCategoryNames.size(); nCatIndex++)
|
||||
{
|
||||
std::vector<CarData*> vecCarsInCat =
|
||||
GetCarsInCategory(m_priv->vecCategoryNames[nCatIndex]);
|
||||
|
@ -247,7 +249,7 @@ void CarInfo::print() const
|
|||
GfLogDebug("Found %d cars in %d categories\n",
|
||||
m_priv->vecCars.size(), m_priv->vecCategoryNames.size());
|
||||
std::vector<std::string>::const_iterator iterCat;
|
||||
for (int nCatIndex = 0; nCatIndex < m_priv->vecCategoryNames.size(); nCatIndex++)
|
||||
for (unsigned nCatIndex = 0; nCatIndex < m_priv->vecCategoryNames.size(); nCatIndex++)
|
||||
{
|
||||
GfLogDebug(" %s (%s) :\n", m_priv->vecCategoryRealNames[nCatIndex].c_str(),
|
||||
m_priv->vecCategoryNames[nCatIndex].c_str());
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "tgf.h"
|
||||
#include "tgfdata.h"
|
||||
|
||||
|
||||
/** @file
|
||||
Singleton holding information on available cars and categories
|
||||
*/
|
||||
|
||||
class TGF_API CarData
|
||||
class TGFDATA_API CarData
|
||||
{
|
||||
public:
|
||||
std::string strName; // XML file / folder name (ex: "sc-boxer-96")
|
||||
|
@ -39,7 +39,7 @@ public:
|
|||
std::string strXMLPath; // Path-name of the car XML file.
|
||||
};
|
||||
|
||||
class TGF_API CarInfo
|
||||
class TGFDATA_API CarInfo
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
Loading…
Reference in a new issue