Completely removed the IRR_SVN macro, makes it confusing for people trying to build STK from autotools. irrlicht version is now detected from irrLicht includes.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4092 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-10-06 19:17:16 +00:00
parent 74c6dd557c
commit 0f14b098cd
13 changed files with 21 additions and 21 deletions

View File

@ -127,7 +127,7 @@ void IrrDriver::initDevice()
for(int bits=32; bits>15; bits -=8)
{
m_device = createDevice(type,
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
core::dimension2d<u32>(UserConfigParams::m_width,
UserConfigParams::m_height ),
#else
@ -712,7 +712,7 @@ bool IrrDriver::OnEvent(const irr::SEvent &event)
* rendering doesn't work if setRenderTarget is called here, but 3d
* rendering doesn't work if it's not called here :(
*/
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
IrrDriver::RTTProvider::RTTProvider(const core::dimension2du &dimension,
const std::string &name)
#else

View File

@ -63,7 +63,7 @@ public:
/** Returns a list of all video modes supports by the graphics card. */
const std::vector<VideoMode>& getVideoModes() const { return m_modes; }
/** Returns the frame size. */
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
const core::dimension2d<u32> getFrameSize() const
{ return m_video_driver->getCurrentRenderTargetSize(); }
#else
@ -146,7 +146,7 @@ public:
video::IVideoDriver *m_video_driver;
public:
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
RTTProvider(const core::dimension2du &dimension,
const std::string &name);
#else

View File

@ -27,7 +27,7 @@ static ModalDialog* modalWindow = NULL;
ModalDialog::ModalDialog(const float percentWidth, const float percentHeight)
{
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
const core::dimension2d<u32>& frame_size = GUIEngine::getDriver()->getCurrentRenderTargetSize();
#else
const core::dimension2d<s32>& frame_size = GUIEngine::getDriver()->getCurrentRenderTargetSize();

View File

@ -293,7 +293,7 @@ void Skin::drawBgImage()
source_area = core::rect<s32>(0, 0, texture_w, texture_h);
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
core::dimension2d<u32> frame_size = GUIEngine::getDriver()->getCurrentRenderTargetSize();
#else
core::dimension2d<s32> frame_size = GUIEngine::getDriver()->getCurrentRenderTargetSize();
@ -619,7 +619,7 @@ void Skin::drawRibbonChild(const core::rect< s32 > &rect, Widget* widget, const
// automatically guess from position on-screen if tabs go up or down
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
const bool vertical_flip = (unsigned int)rect.UpperLeftCorner.Y < GUIEngine::getDriver()->getCurrentRenderTargetSize().Height/2;
#else
const bool vertical_flip = rect.UpperLeftCorner.Y < GUIEngine::getDriver()->getCurrentRenderTargetSize().Height/2;

View File

@ -205,7 +205,7 @@ void Widget::readCoords(Widget* parent)
unsigned int parent_w, parent_h, parent_x, parent_y;
if(parent == NULL)
{
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
core::dimension2d<u32> frame_size = GUIEngine::getDriver()->getCurrentRenderTargetSize();
#else
core::dimension2d<s32> frame_size = GUIEngine::getDriver()->getCurrentRenderTargetSize();
@ -266,7 +266,7 @@ void Widget::readCoords(Widget* parent)
if (m_text.size() > 0)
{
IGUIFont* font = GUIEngine::getFont();
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
core::dimension2d< u32 > dim = font->getDimension( m_text.c_str() );
#else
core::dimension2d< s32 > dim = font->getDimension( m_text.c_str() );

View File

@ -95,7 +95,7 @@ void ModelViewWidget::update(float delta)
{
std::string name = "model view ";
name += m_properties[PROP_ID].c_str();
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
m_rtt_provider = new IrrDriver::RTTProvider(core::dimension2d< u32 >(512, 512), name );
#else
m_rtt_provider = new IrrDriver::RTTProvider(core::dimension2d< s32 >(512, 512), name );

View File

@ -2,7 +2,7 @@
HEADER_SEARCH_PATHS = /usr/local/include /usr/include /usr/local/include/irrlicht/ $(PROJECT_DIR)/../../ $(PROJECT_DIR)/../../bullet/src $(PROJECT_DIR)/../../enet/include
OTHER_CFLAGS = -Wall -DHAVE_OGGVORBIS=1 -DHAS_SOCKLEN_T -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAS_POLL=1 -DHAS_FCNTL=1 -DHAS_INET_PTON=1 -DHAS_INET_NTOP=1 -DHAS_MSGHDR_FLAGS=1 -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_GLUT=1 -DHAVE_IRRLICHT=1 -DPACKAGE="\"supertuxkart\"" -D__MACOSX__=1 -DIRR_SVN
OTHER_CFLAGS = -Wall -DHAVE_OGGVORBIS=1 -DHAS_SOCKLEN_T -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAS_POLL=1 -DHAS_FCNTL=1 -DHAS_INET_PTON=1 -DHAS_INET_NTOP=1 -DHAS_MSGHDR_FLAGS=1 -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_GLUT=1 -DHAVE_IRRLICHT=1 -DPACKAGE="\"supertuxkart\"" -D__MACOSX__=1
OTHER_LDFLAGS = -lirrlicht
LIBRARY_SEARCH_PATHS = /usr/local/lib /usr/lib

View File

@ -373,7 +373,7 @@ void FileManager::listFiles(std::set<std::string>& result, const std::string& di
{
result.clear();
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
std::string previous_cwd1 = std::string(m_file_system->getWorkingDirectory().c_str());
#else
std::string previous_cwd1 = m_file_system->getWorkingDirectory();
@ -390,7 +390,7 @@ void FileManager::listFiles(std::set<std::string>& result, const std::string& di
if(stat(path.c_str(), &mystat) < 0) return;
if(! S_ISDIR(mystat.st_mode)) return;
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
std::string previous_cwd = std::string(m_file_system->getWorkingDirectory().c_str());
#else
std::string previous_cwd = m_file_system->getWorkingDirectory();
@ -406,7 +406,7 @@ void FileManager::listFiles(std::set<std::string>& result, const std::string& di
for(int n=0; n<(int)files->getFileCount(); n++)
{
//printf("---- Entry : %s \n", (make_full_path ? path+"/"+ files->getFileName(n) : files->getFileName(n)).c_str());
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
result.insert(make_full_path ? path+"/"+ files->getFileName(n).c_str() : files->getFileName(n).c_str());
#else
result.insert(make_full_path ? path+"/"+ files->getFileName(n) : files->getFileName(n));

View File

@ -81,7 +81,7 @@ void RaceGUI::createMarkerTexture()
while(npower2<n) npower2*=2;
int radius = (m_marker_rendered_size>>1)-1;
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
IrrDriver::RTTProvider rttProvider(core::dimension2du(m_marker_rendered_size * npower2,
m_marker_rendered_size),
"RaceGUI::markers");
@ -430,7 +430,7 @@ void RaceGUI::drawSpeed(Kart* kart, int offset_x, int offset_y,
if(speed_ratio>1) speed_ratio = 1;
video::ITexture *bar_texture = m_speed_bar_icon->getTexture();
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
core::dimension2du bar_size = bar_texture->getOriginalSize();
#else
core::dimension2di bar_size = bar_texture->getOriginalSize();
@ -615,7 +615,7 @@ void RaceGUI::drawMusicDescription()
// Draw text
core::stringw thetext(s.c_str());
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
core::dimension2d< u32 > textSize = font->getDimension(thetext.c_str());
#else
core::dimension2d< s32 > textSize = font->getDimension(thetext.c_str());

View File

@ -171,7 +171,7 @@ public:
const video::SColor &color=video::SColor(255, 255, 0, 255));
/** Returns the size of the texture on which to render the minimap to. */
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
const core::dimension2du getMiniMapSize() const
{ return core::dimension2du(m_map_width, m_map_height); }
#else

View File

@ -464,7 +464,7 @@ int QuadGraph::findOutOfRoadSector(const Vec3& xyz,
/** Draws the mini map on the screen.
* \param where the top left and lower right corner for the mini map.
*/
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
video::ITexture *QuadGraph::makeMiniMap(const core::dimension2du &dimension,
const std::string &name,
const video::SColor &fill_color)

View File

@ -79,7 +79,7 @@ public:
const int curr_sector=UNKNOWN_SECTOR,
std::vector<int> *all_sectors=NULL
) const;
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
video::ITexture *makeMiniMap(const core::dimension2du &where,
const std::string &name,
const video::SColor &fill_color

View File

@ -806,7 +806,7 @@ void Track::loadTrackModel(unsigned int mode_id)
if(m_use_fog)
{
#ifdef IRR_SVN
#if IRRLICHT_VERSION_MAJOR > 1 || IRRLICHT_VERSION_MINOR >= 6
irr_driver->getVideoDriver()->setFog(m_fog_color, video::EFT_FOG_LINEAR, m_fog_start, m_fog_end, m_fog_density);
#else
irr_driver->getVideoDriver()->setFog(m_fog_color, true, m_fog_start, m_fog_end, m_fog_density);