Cleanup christmas branch from all Christmas/Halloween things (replaced by hiker's hat code in trunk) to prepare for merging soccer mode
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/christmas@12469 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
5ec7bd3a2d
commit
cf0c4c920f
BIN
media/goal.xcf
BIN
media/goal.xcf
Binary file not shown.
Binary file not shown.
@ -97,13 +97,9 @@ KartModel::KartModel(bool is_master)
|
|||||||
* does not actually load the models (see load()).
|
* does not actually load the models (see load()).
|
||||||
* \param node XML object of configuration file.
|
* \param node XML object of configuration file.
|
||||||
*/
|
*/
|
||||||
void KartModel::loadInfo(const XMLNode &node, bool xmas_mode, bool halloween_mode)
|
void KartModel::loadInfo(const XMLNode &node)
|
||||||
{
|
{
|
||||||
node.get("model-file", &m_model_filename);
|
node.get("model-file", &m_model_filename);
|
||||||
if(xmas_mode)
|
|
||||||
node.get("xmas-model-file", &m_model_filename);
|
|
||||||
if(halloween_mode)
|
|
||||||
node.get("halloween-model-file", &m_model_filename);
|
|
||||||
if(const XMLNode *animation_node=node.getNode("animations"))
|
if(const XMLNode *animation_node=node.getNode("animations"))
|
||||||
{
|
{
|
||||||
animation_node->get("left", &m_animation_frame[AF_LEFT] );
|
animation_node->get("left", &m_animation_frame[AF_LEFT] );
|
||||||
|
@ -142,7 +142,7 @@ public:
|
|||||||
~KartModel();
|
~KartModel();
|
||||||
KartModel* makeCopy();
|
KartModel* makeCopy();
|
||||||
void reset();
|
void reset();
|
||||||
void loadInfo(const XMLNode &node, bool xmas_mode, bool halloween_mode);
|
void loadInfo(const XMLNode &node);
|
||||||
bool loadModels(const KartProperties &kart_properties);
|
bool loadModels(const KartProperties &kart_properties);
|
||||||
void update(float rotation_dt, float steer,
|
void update(float rotation_dt, float steer,
|
||||||
const float suspension[4]);
|
const float suspension[4]);
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <ctime>
|
|
||||||
|
|
||||||
#include "config/stk_config.hpp"
|
#include "config/stk_config.hpp"
|
||||||
#include "config/user_config.hpp"
|
#include "config/user_config.hpp"
|
||||||
@ -56,13 +55,6 @@ KartProperties::KartProperties(const std::string &filename)
|
|||||||
m_shadow_x_offset = 0.0f;
|
m_shadow_x_offset = 0.0f;
|
||||||
m_shadow_y_offset = 0.0f;
|
m_shadow_y_offset = 0.0f;
|
||||||
|
|
||||||
time_t rawtime;
|
|
||||||
struct tm* timeinfo;
|
|
||||||
std::time(&rawtime);
|
|
||||||
timeinfo = std::localtime(&rawtime);
|
|
||||||
m_xmas_mode = (timeinfo->tm_mon == 12-1); // Xmas mode happens in December
|
|
||||||
m_halloween_mode = (timeinfo->tm_mon == 10-1); // Halloween mode appears in October
|
|
||||||
|
|
||||||
m_groups.clear();
|
m_groups.clear();
|
||||||
m_custom_sfx_id.resize(SFXManager::NUM_CUSTOMS);
|
m_custom_sfx_id.resize(SFXManager::NUM_CUSTOMS);
|
||||||
|
|
||||||
@ -282,22 +274,6 @@ void KartProperties::getAllData(const XMLNode * root)
|
|||||||
|
|
||||||
root->get("minimap-icon-file", &m_minimap_icon_file);
|
root->get("minimap-icon-file", &m_minimap_icon_file);
|
||||||
|
|
||||||
// Override file paths on Christmas
|
|
||||||
root->get("force-xmas-mode", &m_xmas_mode);
|
|
||||||
if(m_xmas_mode)
|
|
||||||
{
|
|
||||||
root->get("xmas-icon-file", &m_icon_file);
|
|
||||||
root->get("xmas-minimap-icon-file", &m_minimap_icon_file);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Override file paths on Halloween
|
|
||||||
root->get("force-halloween-mode", &m_halloween_mode);
|
|
||||||
if(m_halloween_mode)
|
|
||||||
{
|
|
||||||
root->get("halloween-icon-file", &m_icon_file);
|
|
||||||
root->get("halloween-minimap-icon-file", &m_minimap_icon_file);
|
|
||||||
}
|
|
||||||
|
|
||||||
root->get("shadow-file", &m_shadow_file );
|
root->get("shadow-file", &m_shadow_file );
|
||||||
Vec3 c;
|
Vec3 c;
|
||||||
root->get("rgb", &c );
|
root->get("rgb", &c );
|
||||||
@ -584,7 +560,7 @@ void KartProperties::getAllData(const XMLNode * root)
|
|||||||
} // if sounds-node exist
|
} // if sounds-node exist
|
||||||
|
|
||||||
if(m_kart_model)
|
if(m_kart_model)
|
||||||
m_kart_model->loadInfo(*root, m_xmas_mode, m_halloween_mode);
|
m_kart_model->loadInfo(*root);
|
||||||
} // getAllData
|
} // getAllData
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -84,9 +84,6 @@ private:
|
|||||||
* the kart_properties object is const. */
|
* the kart_properties object is const. */
|
||||||
mutable KartModel *m_kart_model;
|
mutable KartModel *m_kart_model;
|
||||||
|
|
||||||
bool m_xmas_mode;
|
|
||||||
bool m_halloween_mode;
|
|
||||||
|
|
||||||
/** List of all groups the kart belongs to. */
|
/** List of all groups the kart belongs to. */
|
||||||
std::vector<std::string> m_groups;
|
std::vector<std::string> m_groups;
|
||||||
static float UNDEFINED;
|
static float UNDEFINED;
|
||||||
|
Loading…
Reference in New Issue
Block a user