--- a/QTfrontend/CMakeLists.txt Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/CMakeLists.txt Tue Nov 30 22:46:47 2010 +0100
@@ -150,7 +150,6 @@
set( hwfr_hdrs
binds.h
ui_hwform.h
- predefteams.h
KB.h
hwconsts.h
)
--- a/QTfrontend/ammoSchemeModel.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/ammoSchemeModel.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -60,6 +60,7 @@
<< QVariant(25) // health case amt 34
<< QVariant(47) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
@@ -120,6 +121,7 @@
<< "healthcaseamount" // 34
<< "waterrise" // 35
<< "healthdecrease" // 36
+ << "ropepct" // 37
;
QList<QVariant> proMode;
@@ -161,6 +163,7 @@
<< QVariant(25) // health case amt 34
<< QVariant(47) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
QList<QVariant> shoppa;
@@ -202,6 +205,7 @@
<< QVariant(25) // health case amt 34
<< QVariant(47) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
QList<QVariant> cleanslate;
@@ -243,6 +247,7 @@
<< QVariant(25) // health case amt 34
<< QVariant(47) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
QList<QVariant> minefield;
@@ -284,6 +289,7 @@
<< QVariant(25) // health case amt 34
<< QVariant(47) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
QList<QVariant> barrelmayhem;
@@ -325,6 +331,7 @@
<< QVariant(25) // health case amt 34
<< QVariant(47) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
QList<QVariant> tunnelhogs;
@@ -366,6 +373,7 @@
<< QVariant(25) // health case amt 34
<< QVariant(47) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
QList<QVariant> forts;
@@ -407,6 +415,7 @@
<< QVariant(25) // health case amt 34
<< QVariant(47) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
QList<QVariant> timeless;
@@ -448,6 +457,7 @@
<< QVariant(30) // health case amt 34
<< QVariant(0) // water rise amt 35
<< QVariant(0) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
QList<QVariant> thinkingportals;
@@ -489,6 +499,7 @@
<< QVariant(25) // health case amt 34
<< QVariant(47) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
QList<QVariant> kingmode;
@@ -530,6 +541,7 @@
<< QVariant(30) // health case amt 34
<< QVariant(30) // water rise amt 35
<< QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
--- a/QTfrontend/ammoSchemeModel.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/ammoSchemeModel.h Tue Nov 30 22:46:47 2010 +0100
@@ -42,6 +42,7 @@
int numberOfDefaultSchemes;
QStringList predefSchemesNames;
+ QStringList spNames;
public slots:
void Save();
@@ -54,8 +55,6 @@
private:
QSettings fileConfig;
-
- QStringList spNames;
};
class NetAmmoSchemeModel : public QAbstractTableModel
--- a/QTfrontend/game.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/game.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -40,6 +40,7 @@
this->config = config;
this->gamecfg = gamecfg;
TeamCount = 0;
+ netSuspend = false;
}
HWGame::~HWGame()
@@ -88,7 +89,7 @@
HWProto::addStringToBuffer(buf, QString("eammprob %1").arg(ammostr.mid(cAmmoNumber, cAmmoNumber)));
HWProto::addStringToBuffer(buf, QString("eammdelay %1").arg(ammostr.mid(2 * cAmmoNumber, cAmmoNumber)));
HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber)));
- HWProto::addStringToBuffer(buf, QString("eammstore"));
+ if(!gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore"));
HWProto::addStringListToBuffer(buf,
(*it).TeamGameConfig(gamecfg->getInitHealth()));
}
@@ -245,7 +246,7 @@
break;
}
default: {
- if (gameType == gtNet)
+ if (gameType == gtNet && !netSuspend)
{
emit SendNet(msg);
}
@@ -377,3 +378,15 @@
gameState = state;
emit GameStateChanged(state);
}
+
+void HWGame::KillAllTeams()
+{
+ if (m_pTeamSelWidget)
+ {
+ QByteArray buf;
+ QList<HWTeam> teams = m_pTeamSelWidget->getPlayingTeams();
+ for(QList<HWTeam>::iterator it = teams.begin(); it != teams.end(); ++it)
+ HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg((*it).TeamName));
+ RawSendIPC(buf);
+ }
+}
--- a/QTfrontend/game.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/game.h Tue Nov 30 22:46:47 2010 +0100
@@ -53,6 +53,9 @@
void StartNet();
void StartTraining(const QString & file);
void StartCampaign(const QString & file);
+ void KillAllTeams();
+ GameState gameState;
+ bool netSuspend;
protected:
virtual QStringList setArguments();
@@ -89,7 +92,6 @@
GameCFGWidget * gamecfg;
TeamSelWidget* m_pTeamSelWidget;
GameType gameType;
- GameState gameState;
void commonConfig();
void SendConfig();
--- a/QTfrontend/gamecfgwidget.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/gamecfgwidget.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -47,7 +47,7 @@
QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions);
GameSchemes = new QComboBox(GBoxOptions);
- GBoxOptionsLayout->addWidget(GameSchemes, 0, 1);
+ GBoxOptionsLayout->addWidget(GameSchemes, 0, 2);
connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Game scheme"), GBoxOptions), 0, 0);
@@ -59,13 +59,13 @@
goToSchemePage->setIconSize(pmEdit.size());
goToSchemePage->setIcon(pmEdit);
goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
- GBoxOptionsLayout->addWidget(goToSchemePage, 0, 2);
- connect(goToSchemePage, SIGNAL(clicked()), this, SIGNAL(goToSchemes()));
+ GBoxOptionsLayout->addWidget(goToSchemePage, 0, 3);
+ connect(goToSchemePage, SIGNAL(clicked()), this, SLOT(jumpToSchemes()));
GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Weapons"), GBoxOptions), 1, 0);
WeaponsName = new QComboBox(GBoxOptions);
- GBoxOptionsLayout->addWidget(WeaponsName, 1, 1);
+ GBoxOptionsLayout->addWidget(WeaponsName, 1, 2);
connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int)));
@@ -74,16 +74,19 @@
goToWeaponPage->setIconSize(pmEdit.size());
goToWeaponPage->setIcon(pmEdit);
goToWeaponPage->setMaximumWidth(pmEdit.width() + 6);
- GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 2);
-
+ GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 3);
connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons()));
- GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Bind schemes and weapons"), GBoxOptions), 2, 0);
+ //GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Bind schemes with weapons"), GBoxOptions), 2, 0);
bindEntries = new QCheckBox(GBoxOptions);
- bindEntries->setToolTip(tr("When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)"));
+ bindEntries->setToolTip(tr("When this option is enabled selecting a game scheme will auto-select a weapon"));
bindEntries->setChecked(true);
- GBoxOptionsLayout->addWidget(bindEntries, 2, 2);
+ bindEntries->setMaximumWidth(42);
+ bindEntries->setStyleSheet( "QCheckBox::indicator:checked { image: url(\":/res/lock.png\"); }"
+ "QCheckBox::indicator:unchecked { image: url(\":/res/unlock.png\"); }" );
+ GBoxOptionsLayout->addWidget(bindEntries, 0, 1, 0, 1, Qt::AlignVCenter);
+ //GBoxOptionsLayout->addWidget(bindEntries, 2, 2);
connect(pMapContainer, SIGNAL(seedChanged(const QString &)), this, SLOT(seedChanged(const QString &)));
connect(pMapContainer, SIGNAL(mapChanged(const QString &)), this, SLOT(mapChanged(const QString &)));
@@ -93,9 +96,14 @@
connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int)));
}
+void GameCFGWidget::jumpToSchemes()
+{
+ emit goToSchemes(GameSchemes->currentIndex());
+}
+
void GameCFGWidget::jumpToWeapons()
{
- emit goToWeapons(WeaponsName->currentText());
+ emit goToWeapons(WeaponsName->currentIndex());
}
QVariant GameCFGWidget::schemeData(int column) const
@@ -179,6 +187,7 @@
sl.append(QString("e$hcaseamount %1").arg(schemeData(34).toInt()));
sl.append(QString("e$waterrise %1").arg(schemeData(35).toInt()));
sl.append(QString("e$healthdec %1").arg(schemeData(36).toInt()));
+ sl.append(QString("e$ropepct %1").arg(schemeData(37).toInt()));
sl.append(QString("e$template_filter %1").arg(pMapContainer->getTemplateFilter()));
sl.append(QString("e$mapgen %1").arg(pMapContainer->get_mapgen()));
sl.append(QString("e$maze_size %1").arg(pMapContainer->get_maze_size()));
@@ -279,17 +288,6 @@
"AMMO",
QStringList() << WeaponsName->itemText(index) << WeaponsName->itemData(index).toString()
);
- if (bindEntries->isChecked() == true) {
- QString weapName = WeaponsName->itemText(index);
- for (int i = 0; i < GameSchemes->count(); i++) {
- QString schemeName = GameSchemes->itemText(i);
- int res = QString::compare(weapName, schemeName, Qt::CaseSensitive);
- if (0 == res) {
- GameSchemes->setCurrentIndex(i);
- break;
- }
- }
- }
}
}
@@ -344,6 +342,7 @@
int res = QString::compare(weapName, schemeName, Qt::CaseSensitive);
if (0 == res) {
WeaponsName->setCurrentIndex(i);
+ emit ammoChanged(i);
break;
}
}
--- a/QTfrontend/gamecfgwidget.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/gamecfgwidget.h Tue Nov 30 22:46:47 2010 +0100
@@ -44,6 +44,7 @@
QComboBox * WeaponsName;
HWMapContainer* pMapContainer;
QTableView * tv;
+ QVariant schemeData(int column) const;
public slots:
void setParam(const QString & param, const QStringList & value);
@@ -52,8 +53,8 @@
signals:
void paramChanged(const QString & param, const QStringList & value);
- void goToSchemes();
- void goToWeapons(const QString & name);
+ void goToSchemes(int);
+ void goToWeapons(int);
private slots:
void ammoChanged(int index);
@@ -62,6 +63,7 @@
void seedChanged(const QString &);
void themeChanged(const QString &);
void schemeChanged(int);
+ void jumpToSchemes();
void jumpToWeapons();
void mapgenChanged(MapGenerator m);
void maze_sizeChanged(int s);
@@ -74,7 +76,6 @@
void setNetAmmo(const QString& name, const QString& ammo);
- QVariant schemeData(int column) const;
};
#endif // GAMECONFIGWIDGET_H
--- a/QTfrontend/hedgehogerWidget.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/hedgehogerWidget.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -20,8 +20,8 @@
#include "frameTeam.h"
-CHedgehogerWidget::CHedgehogerWidget(const QImage& im, QWidget * parent) :
- ItemNum(im, parent, 1)
+CHedgehogerWidget::CHedgehogerWidget(const QImage& im, const QImage& img, QWidget * parent) :
+ ItemNum(im, img, parent, 1)
{
// TODO: maxHedgehogsPerGame doesn't reset properly and won't match map limits for now
/*if(parent) {
--- a/QTfrontend/hedgehogerWidget.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/hedgehogerWidget.h Tue Nov 30 22:46:47 2010 +0100
@@ -28,7 +28,7 @@
Q_OBJECT
public:
- CHedgehogerWidget(const QImage& im, QWidget * parent);
+ CHedgehogerWidget(const QImage& im, const QImage& img, QWidget * parent);
virtual ~CHedgehogerWidget();
unsigned char getHedgehogsNum() const;
void setHHNum (unsigned int num);
--- a/QTfrontend/hedgewars.qrc Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/hedgewars.qrc Tue Nov 30 22:46:47 2010 +0100
@@ -2,8 +2,15 @@
<qresource>
<file alias="Ammos.png">../share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png</file>
<file>res/hh25x25.png</file>
+ <file>res/hh25x25grey.png</file>
<file>res/ammopic.png</file>
+ <file>res/ammopicgrey.png</file>
+ <file>res/ammopicbox.png</file>
+ <file>res/ammopicboxgrey.png</file>
+ <file>res/ammopicdelay.png</file>
+ <file>res/ammopicdelaygrey.png</file>
<file>res/infinity.png</file>
+ <file>res/infinitygrey.png</file>
<file>res/botlevels/0.png</file>
<file>res/botlevels/1.png</file>
<file>res/botlevels/2.png</file>
@@ -80,6 +87,7 @@
<file>res/iconTime.png</file>
<file>res/iconMine.png</file>
<file>res/iconDud.png</file>
+ <file>res/iconRope.png</file>
<file>res/dice.png</file>
<file>res/Star.png</file>
<file>res/file_save.png</file>
@@ -93,8 +101,6 @@
<file>res/chat_default_off.png</file>
<file>res/chat_ignore_off.png</file>
<file>res/chat_friend_off.png</file>
- <file>res/ammopicbox.png</file>
- <file>res/ammopicdelay.png</file>
<file>res/addfriend.png</file>
<file>res/remfriend.png</file>
<file>res/ignore.png</file>
@@ -102,6 +108,8 @@
<file>res/follow.png</file>
<file>res/info.png</file>
<file>res/kick.png</file>
+ <file>res/lock.png</file>
+ <file>res/unlock.png</file>
<file>res/StatsMedal1.png</file>
<file>res/StatsMedal2.png</file>
<file>res/StatsMedal3.png</file>
--- a/QTfrontend/hwform.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/hwform.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -77,6 +77,7 @@
#ifdef USE_XFIRE
xfire_init();
#endif
+ game = NULL;
gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
frontendEffects = gameSettings->value("frontend/effects", true).toBool();
playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toLatin1(), QCryptographicHash::Md5).toHex());
@@ -127,9 +128,9 @@
connect(ui.pageMultiplayer->BtnStartMPGame, SIGNAL(clicked()), this, SLOT(StartMPGame()));
connect(ui.pageMultiplayer->teamsSelect, SIGNAL(setEnabledGameStart(bool)),
ui.pageMultiplayer->BtnStartMPGame, SLOT(setEnabled(bool)));
- connect(ui.pageMultiplayer->teamsSelect, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
- connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToSchemes()), this, SLOT(GoToSchemes()));
- connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToWeapons(const QString &)), this, SLOT(GoToSelectWeaponSet(const QString &)));
+ connect(ui.pageMultiplayer, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
+ connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToSchemes(int)), this, SLOT(GoToScheme(int)));
+ connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToWeapons(int)), this, SLOT(GoToSelectWeaponSet(int)));
connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pagePlayDemo->BtnPlayDemo, SIGNAL(clicked()), this, SLOT(PlayDemo()));
@@ -146,7 +147,11 @@
#endif
connect(ui.pageOptions->WeaponEdit, SIGNAL(clicked()), this, SLOT(GoToSelectWeapon()));
- connect(ui.pageOptions->WeaponsButt, SIGNAL(clicked()), this, SLOT(GoToSelectNewWeapon()));
+ connect(ui.pageOptions->WeaponNew, SIGNAL(clicked()), this, SLOT(GoToSelectNewWeapon()));
+ connect(ui.pageOptions->WeaponDelete, SIGNAL(clicked()), this, SLOT(DeleteWeaponSet()));
+ connect(ui.pageOptions->SchemeEdit, SIGNAL(clicked()), this, SLOT(GoToEditScheme()));
+ connect(ui.pageOptions->SchemeNew, SIGNAL(clicked()), this, SLOT(GoToNewScheme()));
+ connect(ui.pageOptions->SchemeDelete, SIGNAL(clicked()), this, SLOT(DeleteScheme()));
connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsChanged()), this, SLOT(UpdateWeapons()));
connect(ui.pageNet->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
@@ -162,9 +167,9 @@
ui.pageNetGame->BtnGo, SLOT(setEnabled(bool)));
connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(setEnabledGameStart(bool)),
ui.pageNetGame->BtnStart, SLOT(setEnabled(bool)));
- connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
- connect(ui.pageNetGame->pGameCFG, SIGNAL(goToSchemes()), this, SLOT(GoToSchemes()));
- connect(ui.pageNetGame->pGameCFG, SIGNAL(goToWeapons(const QString &)), this, SLOT(GoToSelectWeaponSet(const QString &)));
+ connect(ui.pageNetGame, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
+ connect(ui.pageNetGame->pGameCFG, SIGNAL(goToSchemes(int)), this, SLOT(GoToScheme(int)));
+ connect(ui.pageNetGame->pGameCFG, SIGNAL(goToWeapons(int)), this, SLOT(GoToSelectWeaponSet(int)));
connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), this, SLOT(GoToAdmin()));
@@ -194,8 +199,8 @@
ui.pageSelectWeapon->pWeapons, SLOT(deleteWeaponsName())); // executed first
connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()),
this, SLOT(UpdateWeapons())); // executed second
- connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()),
- this, SLOT(GoBack())); // executed third
+ //connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()),
+ // this, SLOT(GoBack())); // executed third
connect(ui.pageScheme->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
@@ -209,6 +214,7 @@
ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini");
ui.pageScheme->setModel(ammoSchemeModel);
ui.pageMultiplayer->gameCFG->GameSchemes->setModel(ammoSchemeModel);
+ ui.pageOptions->SchemesName->setModel(ammoSchemeModel);
wBackground = NULL;
if (config->isFrontendEffects()) {
@@ -276,7 +282,7 @@
void HWForm::keyReleaseEvent(QKeyEvent *event)
{
- if (event->key() == Qt::Key_Escape /*|| event->key() == Qt::Key_Backspace*/ )
+ if (event->key() == Qt::Key_Escape /*|| event->key() == Qt::Key_Backspace*/ )
this->GoBack();
}
@@ -299,6 +305,7 @@
combos.push_back(ui.pageOptions->WeaponsName);
combos.push_back(ui.pageMultiplayer->gameCFG->WeaponsName);
combos.push_back(ui.pageNetGame->pGameCFG->WeaponsName);
+ combos.push_back(ui.pageSelectWeapon->selectWeaponSet);
QStringList names = ui.pageSelectWeapon->pWeapons->getWeaponNames();
@@ -363,19 +370,19 @@
void HWForm::GoToSelectNewWeapon()
{
- ui.pageSelectWeapon->pWeapons->setWeaponsName(tr("new"));
+ ui.pageSelectWeapon->pWeapons->newWeaponsName();
GoToPage(ID_PAGE_SELECTWEAPON);
}
void HWForm::GoToSelectWeapon()
{
- ui.pageSelectWeapon->pWeapons->setWeaponsName(ui.pageOptions->WeaponsName->currentText());
+ ui.pageSelectWeapon->selectWeaponSet->setCurrentIndex(ui.pageOptions->WeaponsName->currentIndex());
GoToPage(ID_PAGE_SELECTWEAPON);
}
-void HWForm::GoToSelectWeaponSet(const QString & name)
+void HWForm::GoToSelectWeaponSet(int index)
{
- ui.pageSelectWeapon->pWeapons->setWeaponsName(name);
+ ui.pageSelectWeapon->selectWeaponSet->setCurrentIndex(index);
GoToPage(ID_PAGE_SELECTWEAPON);
}
@@ -420,8 +427,21 @@
GoToPage(ID_PAGE_NETSERVER);
}
-void HWForm::GoToSchemes()
+void HWForm::GoToScheme(int index)
+{
+ ui.pageScheme->selectScheme->setCurrentIndex(index);
+ GoToPage(ID_PAGE_SCHEME);
+}
+
+void HWForm::GoToNewScheme()
{
+ ui.pageScheme->newRow();
+ GoToPage(ID_PAGE_SCHEME);
+}
+
+void HWForm::GoToEditScheme()
+{
+ ui.pageScheme->selectScheme->setCurrentIndex(ui.pageOptions->SchemesName->currentIndex());
GoToPage(ID_PAGE_SCHEME);
}
@@ -490,8 +510,14 @@
if(id == ID_PAGE_NETGAME) // joining a room
ui.pageNetGame->pChatWidget->loadLists(ui.pageOptions->editNetNick->text());
- else if(id == ID_PAGE_ROOMSLIST) // joining the lobby
+// joining the lobby
+ else if(id == ID_PAGE_ROOMSLIST) {
+ if ( hwnet && game && game->gameState == gsStarted) { // abnormal exit - kick or room destruction - send kills.
+ game->netSuspend = true;
+ game->KillAllTeams();
+ }
ui.pageRoomsList->chatWidget->loadLists(ui.pageOptions->editNetNick->text());
+ }
}
void HWForm::GoToPage(quint8 id)
@@ -521,6 +547,9 @@
GoBack();
if (curid == ID_PAGE_ROOMSLIST) NetDisconnect();
+ if (curid == ID_PAGE_NETGAME) hwnet->partRoom();
+ // need to work on this, can cause invalid state for admin quit trying to prevent bad state message on kick
+ //if (curid == ID_PAGE_NETGAME && (!game || game->gameState != gsStarted)) hwnet->partRoom();
if (curid == ID_PAGE_SCHEME)
ammoSchemeModel->Save();
@@ -588,11 +617,15 @@
void HWForm::DeleteTeam()
{
- editedTeam = new HWTeam(ui.pageOptions->CBTeamName->currentText());
- editedTeam->DeleteFile();
+ QMessageBox reallyDelete(QMessageBox::Question, QMessageBox::tr("Teams"), QMessageBox::tr("Really delete this team?"), QMessageBox::Ok | QMessageBox::Cancel);
- // Remove from lists
- ui.pageOptions->CBTeamName->removeItem(ui.pageOptions->CBTeamName->currentIndex());
+ if (reallyDelete.exec() == QMessageBox::Ok) {
+ editedTeam = new HWTeam(ui.pageOptions->CBTeamName->currentText());
+ editedTeam->DeleteFile();
+
+ // Remove from lists
+ ui.pageOptions->CBTeamName->removeItem(ui.pageOptions->CBTeamName->currentIndex());
+ }
}
void HWForm::RandomNames()
@@ -626,6 +659,22 @@
GoBack();
}
+void HWForm::DeleteScheme()
+{
+ ui.pageScheme->selectScheme->setCurrentIndex(ui.pageOptions->SchemesName->currentIndex());
+ if (ui.pageOptions->SchemesName->currentIndex() < ammoSchemeModel->numberOfDefaultSchemes) {
+ QMessageBox::warning(0, QMessageBox::tr("Schemes"), QMessageBox::tr("Can not delete default scheme '%1'!").arg(ui.pageOptions->SchemesName->currentText()));
+ } else {
+ ui.pageScheme->deleteRow();
+ }
+}
+
+void HWForm::DeleteWeaponSet()
+{
+ ui.pageSelectWeapon->selectWeaponSet->setCurrentIndex(ui.pageOptions->WeaponsName->currentIndex());
+ ui.pageSelectWeapon->pWeapons->deleteWeaponsName();
+}
+
void HWForm::SimpleGame()
{
CreateGame(0, 0, *cDefaultAmmoStore);
@@ -678,7 +727,7 @@
connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
connect(hwnet, SIGNAL(LeftRoom()), this, SLOT(NetLeftRoom()));
connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&)));
- connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom()));
+ //connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom()));
// rooms list page stuff
connect(hwnet, SIGNAL(roomsList(const QStringList&)),
@@ -892,11 +941,12 @@
void HWForm::GameStateChanged(GameState gameState)
{
+ quint8 id = ui.Pages->currentIndex();
switch(gameState) {
case gsStarted: {
Music(false);
if (wBackground) wBackground->stopAnimation();
- GoToPage(ID_PAGE_INGAME);
+ if (!hwnet || (!hwnet->isRoomChief() || !hwnet->isInRoom())) GoToPage(ID_PAGE_INGAME);
ui.pageGameStats->clear();
if (pRegisterServer)
{
@@ -910,19 +960,23 @@
case gsFinished: {
//setVisible(true);
setFocusPolicy(Qt::StrongFocus);
- GoBack();
+ if (id == ID_PAGE_INGAME) GoBack();
Music(ui.pageOptions->CBEnableFrontendMusic->isChecked());
if (wBackground) wBackground->startAnimation();
GoToPage(ID_PAGE_GAMESTATS);
- if (hwnet) hwnet->gameFinished();
+ if (hwnet && (!game || !game->netSuspend)) hwnet->gameFinished();
+ if (game) game->netSuspend = false;
break;
}
default: {
//setVisible(true);
setFocusPolicy(Qt::StrongFocus);
quint8 id = ui.Pages->currentIndex();
- if (id == ID_PAGE_INGAME) {
- GoBack();
+ if (id == ID_PAGE_INGAME ||
+// was room chief and the game was aborted
+ (hwnet && hwnet->isRoomChief() && hwnet->isInRoom() &&
+ (gameState == gsInterrupted || gameState == gsStopped || gameState == gsDestroyed))) {
+ if (id == ID_PAGE_INGAME) GoBack();
Music(ui.pageOptions->CBEnableFrontendMusic->isChecked());
if (wBackground) wBackground->startAnimation();
if (hwnet) hwnet->gameFinished();
@@ -1089,7 +1143,7 @@
void HWForm::NetLeftRoom()
{
- if (ui.Pages->currentIndex() == ID_PAGE_NETGAME)
+ if (ui.Pages->currentIndex() == ID_PAGE_NETGAME || ui.Pages->currentIndex() == ID_PAGE_INGAME)
GoBack();
else
qWarning("Left room while not in room");
--- a/QTfrontend/hwform.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/hwform.h Tue Nov 30 22:46:47 2010 +0100
@@ -71,10 +71,12 @@
void GoToTraining();
void GoToCampaign();
void GoToSelectWeapon();
- void GoToSelectWeaponSet(const QString & name);
+ void GoToSelectWeaponSet(int index);
void GoToSelectNewWeapon();
void GoToNetServer();
- void GoToSchemes();
+ void GoToScheme(int index);
+ void GoToEditScheme();
+ void GoToNewScheme();
void GoToAdmin();
void GoToPage(quint8 id);
void GoBack();
@@ -89,6 +91,8 @@
void RandomName(const int &i);
void TeamSave();
void TeamDiscard();
+ void DeleteScheme();
+ void DeleteWeaponSet();
void SimpleGame();
void PlayDemo();
void StartTraining();
--- a/QTfrontend/hwmap.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/hwmap.h Tue Nov 30 22:46:47 2010 +0100
@@ -31,6 +31,7 @@
{
MAPGEN_REGULAR,
MAPGEN_MAZE,
+ MAPGEN_LAST
};
class HWMap : public TCPBase
--- a/QTfrontend/itemNum.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/itemNum.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -22,10 +22,11 @@
#include <QMouseEvent>
#include <QPainter>
-ItemNum::ItemNum(const QImage& im, QWidget * parent, unsigned char min, unsigned char max) :
- QFrame(parent), m_im(im), infinityState(false), nonInteractive(false), minItems(min), maxItems(max),
+ItemNum::ItemNum(const QImage& im, const QImage& img, QWidget * parent, unsigned char min, unsigned char max) :
+ QFrame(parent), m_im(im), m_img(img), infinityState(false), nonInteractive(false), minItems(min), maxItems(max),
numItems(min+2 >= max ? min : min+2)
{
+ enabled = true;
if(frontendEffects) setAttribute(Qt::WA_PaintOnScreen, true);
}
@@ -36,7 +37,7 @@
void ItemNum::mousePressEvent ( QMouseEvent * event )
{
if(nonInteractive) return;
- if(event->button()==Qt::LeftButton) {
+ if(event->button()==Qt::LeftButton && enabled) {
event->accept();
if((infinityState && numItems <= maxItems) || (!infinityState && numItems < maxItems)) {
incItems();
@@ -45,7 +46,7 @@
// appears there's an emit in there
decItems();
}
- } else if (event->button()==Qt::RightButton) {
+ } else if (event->button()==Qt::RightButton && enabled) {
event->accept();
if(numItems > minItems) {
decItems();
@@ -71,11 +72,19 @@
if (numItems==maxItems+1) {
QRect target(0, 0, 100, 32);
- painter.drawImage(target, QImage(":/res/infinity.png"));
+ if (enabled) {
+ painter.drawImage(target, QImage(":/res/infinity.png"));
+ } else {
+ painter.drawImage(target, QImage(":/res/infinitygrey.png"));
+ }
} else {
for(int i=0; i<numItems; i++) {
QRect target(11 * i, i % 2, 25, 35);
- painter.drawImage(target, m_im);
+ if (enabled) {
+ painter.drawImage(target, m_im);
+ } else {
+ painter.drawImage(target, m_img);
+ }
}
}
}
@@ -88,9 +97,16 @@
void ItemNum::setItemsNum(const unsigned char num)
{
numItems=num;
+ repaint();
}
void ItemNum::setInfinityState(bool value)
{
infinityState=value;
}
+
+void ItemNum::setEnabled(bool value)
+{
+ enabled=value;
+ repaint();
+}
--- a/QTfrontend/itemNum.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/itemNum.h Tue Nov 30 22:46:47 2010 +0100
@@ -28,15 +28,18 @@
public:
void setInfinityState(bool value);
+ void setEnabled(bool value);
unsigned char getItemsNum() const;
void setItemsNum(const unsigned char num);
private:
QImage m_im;
+ QImage m_img;
bool infinityState;
+ bool enabled;
protected:
- ItemNum(const QImage& im, QWidget * parent, unsigned char min=2, unsigned char max=8);
+ ItemNum(const QImage& im, const QImage& img, QWidget * parent, unsigned char min=2, unsigned char max=8);
virtual QSize sizeHint () const;
virtual ~ItemNum()=0;
--- a/QTfrontend/mapContainer.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/mapContainer.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -370,7 +370,8 @@
void HWMapContainer::setSeed(const QString & seed)
{
m_seed = seed;
- changeImage();
+ if (chooseMap->currentIndex() < MAPGEN_LAST)
+ changeImage();
}
void HWMapContainer::setMap(const QString & map)
@@ -410,11 +411,11 @@
#include <QMessageBox>
void HWMapContainer::setRandomMap()
{
+ setRandomSeed();
switch(chooseMap->currentIndex())
{
case MAPGEN_REGULAR:
case MAPGEN_MAZE:
- setRandomSeed();
setRandomTheme();
break;
default:
@@ -429,20 +430,21 @@
void HWMapContainer::setRandomStatic()
{
chooseMap->setCurrentIndex(4 + numMissions + rand() % (chooseMap->count() - 4 - numMissions));
- m_seed = QUuid::createUuid().toString();
+ setRandomSeed();
}
void HWMapContainer::setRandomMission()
{
chooseMap->setCurrentIndex(3 + rand() % numMissions);
- m_seed = QUuid::createUuid().toString();
+ setRandomSeed();
}
void HWMapContainer::setRandomSeed()
{
m_seed = QUuid::createUuid().toString();
emit seedChanged(m_seed);
- changeImage();
+ if (chooseMap->currentIndex() < MAPGEN_LAST)
+ changeImage();
}
void HWMapContainer::setRandomTheme()
--- a/QTfrontend/pages.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/pages.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -440,17 +440,22 @@
{
QGridLayout * pageLayout = new QGridLayout(this);
- BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
+ BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
gameCFG = new GameCFGWidget(this);
pageLayout->addWidget(gameCFG, 0, 0, 1, 2);
- pageLayout->setRowStretch(1, 1);
+ QPushButton * btnSetup = new QPushButton(this);
+ btnSetup->setText(QPushButton::tr("Setup"));
+ connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
+ pageLayout->addWidget(btnSetup, 1, 0, 1, 2);
+
+ pageLayout->setRowStretch(2, 1);
teamsSelect = new TeamSelWidget(this);
- pageLayout->addWidget(teamsSelect, 0, 2, 2, 2);
+ pageLayout->addWidget(teamsSelect, 0, 2, 3, 2);
- BtnStartMPGame = addButton(tr("Start"), pageLayout, 2, 3);
+ BtnStartMPGame = addButton(tr("Start"), pageLayout, 3, 3);
}
PageOptions::PageOptions(QWidget* parent) :
@@ -522,45 +527,75 @@
}
{
- // TODO: This box should contain controls for all schemes: game modes and weapons
-
IconedGroupBox* groupWeapons = new IconedGroupBox(this);
+
//groupWeapons->setContentTopPadding(0);
//groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
groupWeapons->setIcon(QIcon(":/res/weaponsicon.png"));
groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
- groupWeapons->setTitle(QGroupBox::tr("Weapons"));
+ groupWeapons->setTitle(QGroupBox::tr("Schemes and Weapons"));
QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons);
+ QLabel* SchemeLabel = new QLabel(groupWeapons);
+ SchemeLabel->setText(QLabel::tr("Game scheme"));
+ WeaponsLayout->addWidget(SchemeLabel, 1, 0);
+
+ SchemesName = new QComboBox(groupWeapons);
+ WeaponsLayout->addWidget(SchemesName, 1, 1);
+
+ SchemeNew = new QPushButton(groupWeapons);
+ SchemeNew->setToolTip(tr("New scheme"));
+ SchemeNew->setIconSize(pmNew.size());
+ SchemeNew->setIcon(pmNew);
+ SchemeNew->setMaximumWidth(pmNew.width() + 6);
+ WeaponsLayout->addWidget(SchemeNew, 1, 2);
+
+ SchemeEdit = new QPushButton(groupWeapons);
+ SchemeEdit->setToolTip(tr("Edit scheme"));
+ SchemeEdit->setIconSize(pmEdit.size());
+ SchemeEdit->setIcon(pmEdit);
+ SchemeEdit->setMaximumWidth(pmEdit.width() + 6);
+ WeaponsLayout->addWidget(SchemeEdit, 1, 3);
+
+ SchemeDelete = new QPushButton(groupWeapons);
+ SchemeDelete->setToolTip(tr("Delete scheme"));
+ SchemeDelete->setIconSize(pmDelete.size());
+ SchemeDelete->setIcon(pmDelete);
+ SchemeDelete->setMaximumWidth(pmDelete.width() + 6);
+ SchemeDelete->setEnabled(false);
+ WeaponsLayout->addWidget(SchemeDelete, 1, 4);
+
+ QLabel* WeaponLabel = new QLabel(groupWeapons);
+ WeaponLabel->setText(QLabel::tr("Weapons"));
+ WeaponsLayout->addWidget(WeaponLabel, 2, 0);
+
WeaponsName = new QComboBox(groupWeapons);
- WeaponsLayout->addWidget(WeaponsName, 0, 0);
+ WeaponsLayout->addWidget(WeaponsName, 2, 1);
- WeaponsButt = new QPushButton(groupWeapons);
- WeaponsButt->setToolTip(tr("New weapon scheme"));
- WeaponsButt->setIconSize(pmNew.size());
- WeaponsButt->setIcon(pmNew);
- WeaponsButt->setMaximumWidth(pmNew.width() + 6);
- WeaponsLayout->addWidget(WeaponsButt, 0, 1);
+ WeaponNew = new QPushButton(groupWeapons);
+ WeaponNew->setToolTip(tr("New weapon set"));
+ WeaponNew->setIconSize(pmNew.size());
+ WeaponNew->setIcon(pmNew);
+ WeaponNew->setMaximumWidth(pmNew.width() + 6);
+ WeaponsLayout->addWidget(WeaponNew, 2, 2);
WeaponEdit = new QPushButton(groupWeapons);
- WeaponEdit->setToolTip(tr("Edit weapon scheme"));
+ WeaponEdit->setToolTip(tr("Edit weapon set"));
WeaponEdit->setIconSize(pmEdit.size());
WeaponEdit->setIcon(pmEdit);
WeaponEdit->setMaximumWidth(pmEdit.width() + 6);
- WeaponsLayout->addWidget(WeaponEdit, 0, 2);
+ WeaponsLayout->addWidget(WeaponEdit, 2, 3);
WeaponDelete = new QPushButton(groupWeapons);
- WeaponDelete->setToolTip(tr("Delete weapon scheme"));
+ WeaponDelete->setToolTip(tr("Delete weapon set"));
WeaponDelete->setIconSize(pmDelete.size());
WeaponDelete->setIcon(pmDelete);
WeaponDelete->setMaximumWidth(pmDelete.width() + 6);
- WeaponDelete->setEnabled(false);
- WeaponDelete->setVisible(false); // hide for now
- WeaponsLayout->addWidget(WeaponDelete, 0, 3);
+ WeaponsLayout->addWidget(WeaponDelete, 2, 4);
WeaponTooltip = new QCheckBox(this);
WeaponTooltip->setText(QCheckBox::tr("Show ammo menu tooltips"));
- WeaponsLayout->addWidget(WeaponTooltip, 1, 0, 1, 3);
+ WeaponsLayout->addWidget(WeaponTooltip, 3, 0, 1, 4);
gbTBLayout->addWidget(groupWeapons, 1, 0);
}
@@ -730,7 +765,7 @@
hr->setFixedHeight(10);
GBAlayout->addWidget(hr);
- QLabel *restartNote = new QLabel(this);
+ QLabel *restartNote = new QLabel(this);
restartNote->setText(QString("* ") + QLabel::tr("Restart game to apply"));
restartNote->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
GBAlayout->addWidget(restartNote);
@@ -895,19 +930,24 @@
// chatwidget
pChatWidget = new HWChatWidget(this, gameSettings, sdli, true);
pChatWidget->setShowReady(true); // show status bulbs by default
- pageLayout->addWidget(pChatWidget, 1, 0, 1, 2);
+ pageLayout->addWidget(pChatWidget, 2, 0, 1, 2);
pageLayout->setRowStretch(1, 100);
pGameCFG = new GameCFGWidget(this);
pageLayout->addWidget(pGameCFG, 0, 0);
+ QPushButton * btnSetup = new QPushButton(this);
+ btnSetup->setText(QPushButton::tr("Setup"));
+ connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
+ pageLayout->addWidget(btnSetup, 1, 0);
+
pNetTeamsWidget = new TeamSelWidget(this);
pNetTeamsWidget->setAcceptOuter(true);
- pageLayout->addWidget(pNetTeamsWidget, 0, 1);
+ pageLayout->addWidget(pNetTeamsWidget, 0, 1, 2, 1);
QHBoxLayout * bottomLayout = new QHBoxLayout;
- pageLayout->addLayout(bottomLayout, 3, 0, 1, 2);
+ pageLayout->addLayout(bottomLayout, 4, 0, 1, 2);
BtnBack = addButton(":/res/Exit.png", bottomLayout, 0, true);
@@ -988,7 +1028,7 @@
BtnCampaignPage = addButton(":/res/Campaign.png", middleLine, 0, true);
BtnCampaignPage->setToolTip(tr("Campaign Mode (...). IN DEVELOPMENT"));
- BtnCampaignPage->setVisible(false);
+ //BtnCampaignPage->setVisible(false);
BtnTrainPage = addButton(":/res/Trainings.png", middleLine, 1, true);
BtnTrainPage->setToolTip(tr("Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT"));
@@ -1063,18 +1103,24 @@
QGridLayout * pageLayout = new QGridLayout(this);
pWeapons = new SelWeaponWidget(cAmmoNumber, this);
- pageLayout->addWidget(pWeapons, 0, 0, 1, 4);
+ pageLayout->addWidget(pWeapons, 0, 0, 1, 6);
BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true);
- BtnDefault = addButton(tr("Default"), pageLayout, 1, 1);
- BtnDelete = addButton(tr("Delete"), pageLayout, 1, 2);
- BtnSave = addButton(":/res/Save.png", pageLayout, 1, 3, true);
+ BtnDefault = addButton(tr("Default"), pageLayout, 1, 2);
+ BtnNew = addButton(tr("New"), pageLayout, 1, 3);
+ BtnDelete = addButton(tr("Delete"), pageLayout, 1, 4);
+ BtnSave = addButton(":/res/Save.png", pageLayout, 1, 5, true);
BtnSave->setStyleSheet("QPushButton{margin: 24px 0px 0px 0px;}");
BtnBack->setFixedHeight(BtnSave->height());
BtnBack->setStyleSheet("QPushButton{margin-top: 31px;}");
+ selectWeaponSet = new QComboBox(this);
+ pageLayout->addWidget(selectWeaponSet, 1, 1);
+
connect(BtnDefault, SIGNAL(clicked()), pWeapons, SLOT(setDefault()));
connect(BtnSave, SIGNAL(clicked()), pWeapons, SLOT(save()));
+ connect(BtnNew, SIGNAL(clicked()), pWeapons, SLOT(newWeaponsName()));
+ connect(selectWeaponSet, SIGNAL(currentIndexChanged(const QString&)), pWeapons, SLOT(setWeaponsName(const QString&)));
}
PageInGame::PageInGame(QWidget* parent) :
@@ -1658,105 +1704,118 @@
glBSLayout->addWidget(SB_HealthDecrease,5,2,1,1);
l = new QLabel(gbBasicSettings);
- l->setText(QLabel::tr("Crate Drops"));
+ l->setText(QLabel::tr("% Rope Length"));
l->setWordWrap(true);
glBSLayout->addWidget(l,6,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconBox.png"));
+ l->setPixmap(QPixmap(":/res/iconRope.png"));
glBSLayout->addWidget(l,6,1,1,1);
- SB_CaseProb = new FreqSpinBox(gbBasicSettings);
- SB_CaseProb->setRange(0, 9);
- SB_CaseProb->setValue(5);
- glBSLayout->addWidget(SB_CaseProb,6,2,1,1);
+ SB_RopeModifier = new QSpinBox(gbBasicSettings);
+ SB_RopeModifier->setRange(25, 999);
+ SB_RopeModifier->setValue(100);
+ SB_RopeModifier->setSingleStep(25);
+ glBSLayout->addWidget(SB_RopeModifier,6,2,1,1);
l = new QLabel(gbBasicSettings);
- l->setText(QLabel::tr("% Health Crates"));
+ l->setText(QLabel::tr("Crate Drops"));
l->setWordWrap(true);
glBSLayout->addWidget(l,7,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
- l->setPixmap(QPixmap(":/res/iconHealth.png")); // TODO: icon
+ l->setPixmap(QPixmap(":/res/iconBox.png"));
glBSLayout->addWidget(l,7,1,1,1);
- SB_HealthCrates = new QSpinBox(gbBasicSettings);
- SB_HealthCrates->setRange(0, 100);
- SB_HealthCrates->setValue(35);
- SB_HealthCrates->setSingleStep(5);
- glBSLayout->addWidget(SB_HealthCrates,7,2,1,1);
+ SB_CaseProb = new FreqSpinBox(gbBasicSettings);
+ SB_CaseProb->setRange(0, 9);
+ SB_CaseProb->setValue(5);
+ glBSLayout->addWidget(SB_CaseProb,7,2,1,1);
l = new QLabel(gbBasicSettings);
- l->setText(QLabel::tr("Health in Crates"));
+ l->setText(QLabel::tr("% Health Crates"));
l->setWordWrap(true);
glBSLayout->addWidget(l,8,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
l->setPixmap(QPixmap(":/res/iconHealth.png")); // TODO: icon
glBSLayout->addWidget(l,8,1,1,1);
+ SB_HealthCrates = new QSpinBox(gbBasicSettings);
+ SB_HealthCrates->setRange(0, 100);
+ SB_HealthCrates->setValue(35);
+ SB_HealthCrates->setSingleStep(5);
+ glBSLayout->addWidget(SB_HealthCrates,8,2,1,1);
+
+ l = new QLabel(gbBasicSettings);
+ l->setText(QLabel::tr("Health in Crates"));
+ l->setWordWrap(true);
+ glBSLayout->addWidget(l,9,0,1,1);
+ l = new QLabel(gbBasicSettings);
+ l->setFixedSize(32,32);
+ l->setPixmap(QPixmap(":/res/iconHealth.png")); // TODO: icon
+ glBSLayout->addWidget(l,9,1,1,1);
SB_CrateHealth = new QSpinBox(gbBasicSettings);
SB_CrateHealth->setRange(0, 200);
SB_CrateHealth->setValue(25);
SB_CrateHealth->setSingleStep(5);
- glBSLayout->addWidget(SB_CrateHealth,8,2,1,1);
+ glBSLayout->addWidget(SB_CrateHealth,9,2,1,1);
l = new QLabel(gbBasicSettings);
l->setText(QLabel::tr("Mines Time"));
l->setWordWrap(true);
- glBSLayout->addWidget(l,9,0,1,1);
+ glBSLayout->addWidget(l,10,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
l->setPixmap(QPixmap(":/res/iconTime.png")); // TODO: icon
- glBSLayout->addWidget(l,9,1,1,1);
+ glBSLayout->addWidget(l,10,1,1,1);
SB_MinesTime = new QSpinBox(gbBasicSettings);
SB_MinesTime->setRange(-1, 5);
SB_MinesTime->setValue(3);
SB_MinesTime->setSingleStep(1);
SB_MinesTime->setSpecialValueText(tr("Random"));
SB_MinesTime->setSuffix(" "+ tr("Seconds"));
- glBSLayout->addWidget(SB_MinesTime,9,2,1,1);
+ glBSLayout->addWidget(SB_MinesTime,10,2,1,1);
l = new QLabel(gbBasicSettings);
l->setText(QLabel::tr("Mines"));
l->setWordWrap(true);
- glBSLayout->addWidget(l,10,0,1,1);
+ glBSLayout->addWidget(l,11,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
l->setPixmap(QPixmap(":/res/iconMine.png")); // TODO: icon
- glBSLayout->addWidget(l,10,1,1,1);
+ glBSLayout->addWidget(l,11,1,1,1);
SB_Mines = new QSpinBox(gbBasicSettings);
SB_Mines->setRange(0, 80);
SB_Mines->setValue(0);
SB_Mines->setSingleStep(5);
- glBSLayout->addWidget(SB_Mines,10,2,1,1);
+ glBSLayout->addWidget(SB_Mines,11,2,1,1);
l = new QLabel(gbBasicSettings);
l->setText(QLabel::tr("% Dud Mines"));
l->setWordWrap(true);
- glBSLayout->addWidget(l,11,0,1,1);
+ glBSLayout->addWidget(l,12,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
l->setPixmap(QPixmap(":/res/iconDud.png"));
- glBSLayout->addWidget(l,11,1,1,1);
+ glBSLayout->addWidget(l,12,1,1,1);
SB_MineDuds = new QSpinBox(gbBasicSettings);
SB_MineDuds->setRange(0, 100);
SB_MineDuds->setValue(0);
SB_MineDuds->setSingleStep(5);
- glBSLayout->addWidget(SB_MineDuds,11,2,1,1);
+ glBSLayout->addWidget(SB_MineDuds,12,2,1,1);
l = new QLabel(gbBasicSettings);
l->setText(QLabel::tr("Explosives"));
l->setWordWrap(true);
- glBSLayout->addWidget(l,12,0,1,1);
+ glBSLayout->addWidget(l,13,0,1,1);
l = new QLabel(gbBasicSettings);
l->setFixedSize(32,32);
l->setPixmap(QPixmap(":/res/iconDamage.png"));
- glBSLayout->addWidget(l,12,1,1,1);
+ glBSLayout->addWidget(l,13,1,1,1);
SB_Explosives = new QSpinBox(gbBasicSettings);
SB_Explosives->setRange(0, 40);
SB_Explosives->setValue(0);
SB_Explosives->setSingleStep(1);
- glBSLayout->addWidget(SB_Explosives,12,2,1,1);
-
+ glBSLayout->addWidget(SB_Explosives,13,2,1,1);
l = new QLabel(gbBasicSettings);
l->setText(QLabel::tr("Scheme Name:"));
@@ -1823,6 +1882,7 @@
mapper->addMapping(SB_CrateHealth, 34);
mapper->addMapping(SB_WaterRise, 35);
mapper->addMapping(SB_HealthDecrease, 36);
+ mapper->addMapping(SB_RopeModifier, 37);
mapper->toFirst();
}
@@ -1836,8 +1896,12 @@
void PageScheme::deleteRow()
{
- QAbstractItemModel * model = mapper->model();
- model->removeRow(selectScheme->currentIndex());
+ QMessageBox reallyDelete(QMessageBox::Question, QMessageBox::tr("Schemes"), QMessageBox::tr("Really delete this game scheme?"), QMessageBox::Ok | QMessageBox::Cancel);
+
+ if (reallyDelete.exec() == QMessageBox::Ok) {
+ QAbstractItemModel * model = mapper->model();
+ model->removeRow(selectScheme->currentIndex());
+ }
}
void PageScheme::schemeSelected(int n)
--- a/QTfrontend/pages.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/pages.h Tue Nov 30 22:46:47 2010 +0100
@@ -196,6 +196,9 @@
GameCFGWidget *gameCFG;
TeamSelWidget *teamsSelect;
QPushButton *BtnStartMPGame;
+
+signals:
+ void SetupClicked();
};
class PageOptions : public AbstractPage
@@ -205,11 +208,16 @@
public:
PageOptions(QWidget* parent = 0);
- QPushButton *WeaponsButt;
+ QCheckBox *WeaponTooltip;
+ QPushButton *WeaponNew;
QPushButton *WeaponEdit;
QPushButton *WeaponDelete;
QComboBox *WeaponsName;
- QCheckBox *WeaponTooltip;
+ QPushButton *SchemeNew;
+ QPushButton *SchemeEdit;
+ QPushButton *SchemeDelete;
+ QComboBox *SchemesName;
+
QComboBox *CBLanguage;
QPushButton *BtnBack;
@@ -314,6 +322,9 @@
public slots:
void setReadyStatus(bool isReady);
void setMasterMode(bool isMaster);
+
+signals:
+ void SetupClicked();
};
class PageInfo : public AbstractPage
@@ -379,8 +390,10 @@
QPushButton *BtnSave;
QPushButton *BtnDefault;
QPushButton *BtnDelete;
+ QPushButton *BtnNew;
QPushButton *BtnBack;
SelWeaponWidget* pWeapons;
+ QComboBox* selectWeaponSet;
};
class PageInGame : public AbstractPage
@@ -455,9 +468,14 @@
QPushButton * BtnNew;
QPushButton * BtnDelete;
QPushButton * BtnSave;
+ QComboBox * selectScheme;
void setModel(QAbstractItemModel * model);
+public slots:
+ void newRow();
+ void deleteRow();
+
private:
QDataWidgetMapper * mapper;
ToggleButtonWidget * TBW_mode_Forts;
@@ -497,16 +515,15 @@
QSpinBox * SB_Mines;
QSpinBox * SB_MineDuds;
QSpinBox * SB_Explosives;
+ QSpinBox * SB_RopeModifier;
QLineEdit * LE_name;
- QComboBox * selectScheme;
QGroupBox * gbGameModes;
QGroupBox * gbBasicSettings;
private slots:
- void newRow();
- void deleteRow();
void schemeSelected(int);
+
};
class PageAdmin : public AbstractPage
--- a/QTfrontend/predefteams.h Mon Nov 29 09:11:31 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * Hedgewars, a free turn based strategy game
- * Copyright (c) 2006-2010 Andrey Korotaev <unC0Rr@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
-
-#ifndef PREDEFTEAMS_H
-#define PREDEFTEAMS_H
-
-#include <QtGlobal>
-
-#define PREDEFTEAMS_COUNT 3
-/*
-struct PredefinedTeam
-{
- const char * TeamName;
- const char * hh0name;
- const char * hh1name;
- const char * hh2name;
- const char * hh3name;
- const char * hh4name;
- const char * hh5name;
- const char * hh6name;
- const char * hh7name;
- const char * hh0hat;
- const char * hh1hat;
- const char * hh2hat;
- const char * hh3hat;
- const char * hh4hat;
- const char * hh5hat;
- const char * hh6hat;
- const char * hh7hat;
- QString Grave;
- QString Fort;
-};
-
-
-const PredefinedTeam pteams[PREDEFTEAMS_COUNT] =
-{
- {
- QT_TRANSLATE_NOOP("teams", "Hedgehogs"),
- QT_TRANSLATE_NOOP("teams", "hedgehog 1"),
- QT_TRANSLATE_NOOP("teams", "hedgehog 2"),
- QT_TRANSLATE_NOOP("teams", "hedgehog 3"),
- QT_TRANSLATE_NOOP("teams", "hedgehog 4"),
- QT_TRANSLATE_NOOP("teams", "hedgehog 5"),
- QT_TRANSLATE_NOOP("teams", "hedgehog 6"),
- QT_TRANSLATE_NOOP("teams", "hedgehog 7"),
- QT_TRANSLATE_NOOP("teams", "hedgehog 8"),
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "Simple", "Island"
- },
- {
- QT_TRANSLATE_NOOP("teams", "Goddess"),
- QT_TRANSLATE_NOOP("teams", "Isis"),
- QT_TRANSLATE_NOOP("teams", "Astarte"),
- QT_TRANSLATE_NOOP("teams", "Diana"),
- QT_TRANSLATE_NOOP("teams", "Aphrodite"),
- QT_TRANSLATE_NOOP("teams", "Hecate"),
- QT_TRANSLATE_NOOP("teams", "Demeter"),
- QT_TRANSLATE_NOOP("teams", "Kali"),
- QT_TRANSLATE_NOOP("teams", "Inanna"),
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "Bone", "Island"
- },
- {
- QT_TRANSLATE_NOOP("teams", "Fruits"),
- QT_TRANSLATE_NOOP("teams", "Banana"),
- QT_TRANSLATE_NOOP("teams", "Apple"),
- QT_TRANSLATE_NOOP("teams", "Orange"),
- QT_TRANSLATE_NOOP("teams", "Lemon"),
- QT_TRANSLATE_NOOP("teams", "Pineapple"),
- QT_TRANSLATE_NOOP("teams", "Mango"),
- QT_TRANSLATE_NOOP("teams", "Peach"),
- QT_TRANSLATE_NOOP("teams", "Plum"),
- "banana",
- "apple",
- "orange",
- "lemon",
- "NoHat",
- "NoHat",
- "NoHat",
- "NoHat",
- "coffin", "Barrelhouse"
- }
-};
-*/
-#endif // PREDEFTEAMS_H
Binary file QTfrontend/res/ammopicboxgrey.png has changed
Binary file QTfrontend/res/ammopicdelaygrey.png has changed
Binary file QTfrontend/res/ammopicgrey.png has changed
Binary file QTfrontend/res/hh25x25grey.png has changed
Binary file QTfrontend/res/iconRope.png has changed
Binary file QTfrontend/res/infinitygrey.png has changed
Binary file QTfrontend/res/lock.png has changed
Binary file QTfrontend/res/unlock.png has changed
--- a/QTfrontend/selectWeapon.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/selectWeapon.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -40,7 +40,7 @@
return ammo.copy(x, y, 32, 32);
}
-SelWeaponItem::SelWeaponItem(bool allowInfinite, int iconNum, int wNum, QImage image, QWidget* parent) :
+SelWeaponItem::SelWeaponItem(bool allowInfinite, int iconNum, int wNum, QImage image, QImage imagegrey, QWidget* parent) :
QWidget(parent)
{
QHBoxLayout* hbLayout = new QHBoxLayout(this);
@@ -53,7 +53,7 @@
lbl->setGeometry(0, 0, 30, 30);
hbLayout->addWidget(lbl);
- item = new WeaponItem(image, this);
+ item = new WeaponItem(image, imagegrey, this);
item->setItemsNum(wNum);
item->setInfinityState(allowInfinite);
hbLayout->addWidget(item);
@@ -74,6 +74,11 @@
return item->getItemsNum();
}
+void SelWeaponItem::setEnabled(bool value)
+{
+ item->setEnabled(value);
+}
+
SelWeaponWidget::SelWeaponWidget(int numItems, QWidget* parent) :
QFrame(parent),
m_numItems(numItems)
@@ -124,19 +129,19 @@
for(; i < m_numItems; ++i) {
if (i == 6) continue;
if (k % 4 == 0) ++j;
- SelWeaponItem * swi = new SelWeaponItem(true, i, currentState[i].digitValue(), QImage(":/res/ammopic.png"), this);
+ SelWeaponItem * swi = new SelWeaponItem(true, i, currentState[i].digitValue(), QImage(":/res/ammopic.png"), QImage(":/res/ammopicgrey.png"), this);
weaponItems[i].append(swi);
p1Layout->addWidget(swi, j, k % 4);
- SelWeaponItem * pwi = new SelWeaponItem(false, i, currentState[numItems + i].digitValue(), QImage(":/res/ammopicbox.png"), this);
+ SelWeaponItem * pwi = new SelWeaponItem(false, i, currentState[numItems + i].digitValue(), QImage(":/res/ammopicbox.png"), QImage(":/res/ammopicboxgrey.png"), this);
weaponItems[i].append(pwi);
p2Layout->addWidget(pwi, j, k % 4);
- SelWeaponItem * dwi = new SelWeaponItem(false, i, currentState[numItems*2 + i].digitValue(), QImage(":/res/ammopicdelay.png"), this);
+ SelWeaponItem * dwi = new SelWeaponItem(false, i, currentState[numItems*2 + i].digitValue(), QImage(":/res/ammopicdelay.png"), QImage(":/res/ammopicdelaygrey.png"), this);
weaponItems[i].append(dwi);
p3Layout->addWidget(dwi, j, k % 4);
- SelWeaponItem * awi = new SelWeaponItem(false, i, currentState[numItems*3 + i].digitValue(), QImage(":/res/ammopic.png"), this);
+ SelWeaponItem * awi = new SelWeaponItem(false, i, currentState[numItems*3 + i].digitValue(), QImage(":/res/ammopic.png"), QImage(":/res/ammopicgrey.png"), this);
weaponItems[i].append(awi);
p4Layout->addWidget(awi, j, k % 4);
@@ -150,6 +155,11 @@
void SelWeaponWidget::setWeapons(const QString& ammo)
{
+ bool enable = true;
+ for(int i = 0; i < cDefaultAmmos.size(); i++)
+ if (!cDefaultAmmos[i].first.compare(m_name->text())) {
+ enable = false;
+ }
for(int i = 0; i < m_numItems; ++i) {
twi::iterator it = weaponItems.find(i);
if (it == weaponItems.end()) continue;
@@ -157,12 +167,20 @@
it.value()[1]->setItemsNum(ammo[m_numItems + i].digitValue());
it.value()[2]->setItemsNum(ammo[m_numItems*2 + i].digitValue());
it.value()[3]->setItemsNum(ammo[m_numItems*3 + i].digitValue());
+ it.value()[0]->setEnabled(enable);
+ it.value()[1]->setEnabled(enable);
+ it.value()[2]->setEnabled(enable);
+ it.value()[3]->setEnabled(enable);
}
- update();
+ m_name->setEnabled(enable);
}
void SelWeaponWidget::setDefault()
{
+ for(int i = 0; i < cDefaultAmmos.size(); i++)
+ if (!cDefaultAmmos[i].first.compare(m_name->text())) {
+ return;
+ }
setWeapons(*cDefaultAmmoStore);
}
@@ -215,11 +233,11 @@
{
if (curWeaponsName == "") return;
- if (curWeaponsName == "Default") {
- QMessageBox impossible(QMessageBox::Warning, QMessageBox::tr("Weapons"), QMessageBox::tr("Can not delete default weapon set"));
- impossible.exec();
- return;
- }
+ for(int i = 0; i < cDefaultAmmos.size(); i++)
+ if (!cDefaultAmmos[i].first.compare(m_name->text())) {
+ QMessageBox::warning(0, QMessageBox::tr("Weapons"), QMessageBox::tr("Can not delete default weapon set '%1'!").arg(cDefaultAmmos[i].first));
+ return;
+ }
QMessageBox reallyDelete(QMessageBox::Question, QMessageBox::tr("Weapons"), QMessageBox::tr("Really delete this weapon set?"), QMessageBox::Ok | QMessageBox::Cancel);
@@ -229,15 +247,22 @@
}
}
+void SelWeaponWidget::newWeaponsName()
+{
+ setWeaponsName(tr("new"));
+}
+
void SelWeaponWidget::setWeaponsName(const QString& name)
{
- if(name != "" && wconf->contains(name)) {
- setWeapons(wconf->value(name).toString());
- }
+ m_name->setText(name);
curWeaponsName = name;
- m_name->setText(name);
+ if(name != "" && wconf->contains(name)) {
+ setWeapons(wconf->value(name).toString());
+ } else {
+ setWeapons(*cDefaultAmmoStore);
+ }
}
QStringList SelWeaponWidget::getWeaponNames() const
--- a/QTfrontend/selectWeapon.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/selectWeapon.h Tue Nov 30 22:46:47 2010 +0100
@@ -33,10 +33,11 @@
Q_OBJECT
public:
- SelWeaponItem(bool allowInfinite, int iconNum, int wNum, QImage image, QWidget* parent=0);
+ SelWeaponItem(bool allowInfinite, int iconNum, int wNum, QImage image, QImage imagegrey, QWidget* parent=0);
unsigned char getItemsNum() const;
void setItemsNum(const unsigned char num);
+ void setEnabled(bool value);
private:
WeaponItem* item;
@@ -56,6 +57,7 @@
void setWeapons(const QString& ammo);
void setWeaponsName(const QString& name);
void deleteWeaponsName();
+ void newWeaponsName();
void save();
signals:
--- a/QTfrontend/teamselect.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/teamselect.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -233,10 +233,6 @@
p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
addScrArea(framePlaying, p.color(QPalette::Window).light(105), 250);
addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 0);
- QPushButton * btnSetup = new QPushButton(this);
- btnSetup->setText(QPushButton::tr("Setup"));
- connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
- mainLayout.addWidget(btnSetup);
}
void TeamSelWidget::setAcceptOuter(bool acceptOuter)
--- a/QTfrontend/teamselect.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/teamselect.h Tue Nov 30 22:46:47 2010 +0100
@@ -56,7 +56,6 @@
signals:
void setEnabledGameStart(bool);
- void SetupClicked();
void teamWillPlay(HWTeam team);
void teamNotPlaying(const HWTeam& team);
void hhogsNumChanged(const HWTeam&);
--- a/QTfrontend/teamselhelper.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/teamselhelper.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -73,7 +73,7 @@
connect(colorButt, SIGNAL(clicked()), this, SLOT(changeTeamColor()));
mainLayout.addWidget(colorButt);
- phhoger = new CHedgehogerWidget(QImage(":/res/hh25x25.png"), this);
+ phhoger = new CHedgehogerWidget(QImage(":/res/hh25x25.png"), QImage(":/res/hh25x25grey.png"), this);
connect(phhoger, SIGNAL(hedgehogsNumChanged()), this, SLOT(hhNumChanged()));
phhoger->setHHNum(team.numHedgehogs);
mainLayout.addWidget(phhoger);
--- a/QTfrontend/weaponItem.cpp Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/weaponItem.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -18,8 +18,8 @@
#include "weaponItem.h"
-WeaponItem::WeaponItem(const QImage& im, QWidget * parent) :
- ItemNum(im, parent, 0)
+WeaponItem::WeaponItem(const QImage& im, const QImage& img, QWidget * parent) :
+ ItemNum(im, img, parent, 0)
{
}
--- a/QTfrontend/weaponItem.h Mon Nov 29 09:11:31 2010 +0100
+++ b/QTfrontend/weaponItem.h Tue Nov 30 22:46:47 2010 +0100
@@ -26,7 +26,7 @@
Q_OBJECT
public:
- WeaponItem(const QImage& im, QWidget * parent);
+ WeaponItem(const QImage& im, const QImage& img, QWidget * parent);
virtual ~WeaponItem();
signals:
--- a/hedgewars/CCHandlers.inc Mon Nov 29 09:11:31 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,848 +0,0 @@
-(*
-* Hedgewars, a free turn based strategy game
-* Copyright (c) 2004-2010 Andrey Korotaev <unC0Rr@gmail.com>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; version 2 of the License
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-*)
-
-function CheckNoTeamOrHH: boolean;
-var bRes: boolean;
-begin
-bRes:= (CurrentTeam = nil) or (CurrentHedgehog^.Gear = nil);
-{$IFDEF DEBUGFILE}
-if bRes then
-if CurrentTeam = nil then AddFileLog('CONSOLE: CurTeam = nil')
- else AddFileLog('CONSOLE: CurTeam <> nil, Gear = nil');
-{$ENDIF}
-CheckNoTeamOrHH:= bRes;
-end;
-////////////////////////////////////////////////////////////////////////////////
-procedure chQuit(var s: shortstring);
-const prevGState: TGameState = gsConfirm;
-begin
-s:= s; // avoid compiler hint
-if GameState <> gsConfirm then
- begin
- prevGState:= GameState;
- GameState:= gsConfirm
- end else
- GameState:= prevGState
-end;
-
-procedure chConfirm(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if GameState = gsConfirm then
- begin
- SendIPC('Q');
- GameState:= gsExit
- end
-else
- begin
- GameState:= gsChat;
- KeyPressChat(27);
- KeyPressChat(47);
- KeyPressChat(116);
- KeyPressChat(101);
- KeyPressChat(97);
- KeyPressChat(109);
- KeyPressChat(32)
- end
-end;
-
-procedure chCheckProto(var s: shortstring);
-var i, c: LongInt;
-begin
-if isDeveloperMode then
-begin
-val(s, i, c);
-if (c <> 0) or (i = 0) then exit;
-TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old', true);
-TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new', true)
-end
-end;
-
-procedure chAddTeam(var s: shortstring);
-var Color: Longword;
- ts, cs: shortstring;
-begin
-cs:= '';
-ts:= '';
-if isDeveloperMode then
-begin
-SplitBySpace(s, cs);
-SplitBySpace(cs, ts);
-val(cs, Color);
-TryDo(Color <> 0, 'Error: black team color', true);
-
-// color is always little endian so the mask must be constant also in big endian archs
-Color:= Color or $FF000000;
-
-AddTeam(Color);
-CurrentTeam^.TeamName:= ts;
-CurrentTeam^.PlayerHash:= s;
-if GameType in [gmtDemo, gmtSave] then CurrentTeam^.ExtDriven:= true;
-
-CurrentTeam^.voicepack:= AskForVoicepack('Default')
-end
-end;
-
-procedure chTeamLocal(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if not isDeveloperMode then exit;
-if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/rdriven"', true);
-CurrentTeam^.ExtDriven:= true
-end;
-
-procedure chGrave(var s: shortstring);
-begin
-if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/grave"', true);
-if s[1]='"' then Delete(s, 1, 1);
-if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
-CurrentTeam^.GraveName:= s
-end;
-
-procedure chFort(var s: shortstring);
-begin
-if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/fort"', true);
-if s[1]='"' then Delete(s, 1, 1);
-if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
-CurrentTeam^.FortName:= s
-end;
-
-procedure chVoicepack(var s: shortstring);
-begin
-if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/voicepack"', true);
-if s[1]='"' then Delete(s, 1, 1);
-if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
-CurrentTeam^.voicepack:= AskForVoicepack(s)
-end;
-
-procedure chFlag(var s: shortstring);
-begin
-if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/flag"', true);
-if s[1]='"' then Delete(s, 1, 1);
-if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
-CurrentTeam^.flag:= s
-end;
-
-procedure chScript(var s: shortstring);
-begin
-if s[1]='"' then Delete(s, 1, 1);
-if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
-ScriptLoad(s)
-end;
-
-procedure chAddHH(var id: shortstring);
-var s: shortstring;
- Gear: PGear;
-begin
-s:= '';
-if (not isDeveloperMode) or (CurrentTeam = nil) then exit;
-with CurrentTeam^ do
- begin
- SplitBySpace(id, s);
- CurrentHedgehog:= @Hedgehogs[HedgehogsNumber];
- val(id, CurrentHedgehog^.BotLevel);
- Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0);
- SplitBySpace(s, id);
- val(s, Gear^.Health);
- TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true);
- PHedgehog(Gear^.Hedgehog)^.Team:= CurrentTeam;
- if (GameFlags and gfSharedAmmo) <> 0 then CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex
- else if (GameFlags and gfPerHogAmmo) <> 0 then
- begin
- AddAmmoStore;
- CurrentHedgehog^.AmmoStore:= StoreCnt - 1
- end
- else CurrentHedgehog^.AmmoStore:= TeamsCount - 1;
- CurrentHedgehog^.Gear:= Gear;
- CurrentHedgehog^.Name:= id;
- CurrentHedgehog^.InitialHealth:= Gear^.Health;
- CurrHedgehog:= HedgehogsNumber;
- inc(HedgehogsNumber)
- end
-end;
-
-procedure chSetHat(var s: shortstring);
-begin
-if (not isDeveloperMode) or (CurrentTeam = nil) then exit;
-with CurrentTeam^ do
- begin
- if not CurrentHedgehog^.King then
- if (s = '') or
- (((GameFlags and gfKing) <> 0) and (s = 'crown')) or
- ((Length(s) > 39) and (Copy(s,1,8) = 'Reserved') and (Copy(s,9,32) <> PlayerHash)) then
- CurrentHedgehog^.Hat:= 'NoHat'
- else
- CurrentHedgehog^.Hat:= s
- end;
-end;
-
-procedure chSetHHCoords(var x: shortstring);
-var y: shortstring;
- t: Longint;
-begin
-y:= '';
-if (not isDeveloperMode) or (CurrentHedgehog = nil) or (CurrentHedgehog^.Gear = nil) then exit;
-SplitBySpace(x, y);
-val(x, t);
-CurrentHedgehog^.Gear^.X:= int2hwFloat(t);
-val(y, t);
-CurrentHedgehog^.Gear^.Y:= int2hwFloat(t)
-end;
-
-procedure chSetAmmoLoadout(var descr: shortstring);
-begin
-SetAmmoLoadout(descr)
-end;
-
-procedure chSetAmmoDelay(var descr: shortstring);
-begin
-SetAmmoDelay(descr)
-end;
-
-procedure chSetAmmoProbability(var descr: shortstring);
-begin
-SetAmmoProbability(descr)
-end;
-
-procedure chSetAmmoReinforcement(var descr: shortstring);
-begin
-SetAmmoReinforcement(descr)
-end;
-
-procedure chAddAmmoStore(var descr: shortstring);
-begin
-descr:= ''; // avoid compiler hint
-AddAmmoStore
-end;
-
-procedure chBind(var id: shortstring);
-var s: shortstring;
- b: LongInt;
-begin
-s:= '';
-if CurrentTeam = nil then exit;
-SplitBySpace(id, s);
-if s[1]='"' then Delete(s, 1, 1);
-if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
-b:= KeyNameToCode(id);
-if b = 0 then OutError(errmsgUnknownVariable + ' "' + id + '"', false)
- else CurrentTeam^.Binds[b]:= s
-end;
-
-procedure chCurU_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-CursorMovementY:= -1;
-end;
-
-procedure chCurU_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-CursorMovementY:= 0;
-end;
-
-procedure chCurD_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-CursorMovementY:= 1;
-end;
-
-procedure chCurD_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-CursorMovementY:= 0;
-end;
-
-procedure chCurL_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-CursorMovementX:= -1;
-end;
-
-procedure chCurL_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-CursorMovementX:= 0;
-end;
-
-procedure chCurR_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-CursorMovementX:= 1;
-end;
-
-procedure chCurR_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-CursorMovementX:= 0;
-end;
-
-procedure chLeft_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('L');
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- Message:= Message or gmLeft
-end;
-
-procedure chLeft_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('l');
-with CurrentHedgehog^.Gear^ do
- Message:= Message and not gmLeft
-end;
-
-procedure chRight_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('R');
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- Message:= Message or gmRight
-end;
-
-procedure chRight_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('r');
-with CurrentHedgehog^.Gear^ do
- Message:= Message and not gmRight
-end;
-
-procedure chUp_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('U');
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- Message:= Message or gmUp
-end;
-
-procedure chUp_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('u');
-with CurrentHedgehog^.Gear^ do
- Message:= Message and not gmUp
-end;
-
-procedure chDown_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('D');
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- Message:= Message or gmDown
-end;
-
-procedure chDown_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('d');
-with CurrentHedgehog^.Gear^ do
- Message:= Message and not gmDown
-end;
-
-procedure chPrecise_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('Z');
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- Message:= Message or gmPrecise
-end;
-
-procedure chPrecise_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('z');
-with CurrentHedgehog^.Gear^ do
- Message:= Message and not gmPrecise
-end;
-
-procedure chLJump(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('j');
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- Message:= Message or gmLJump
-end;
-
-procedure chHJump(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('J');
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- Message:= Message or gmHJump
-end;
-
-procedure chAttack_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- begin
- {$IFDEF DEBUGFILE}AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State));{$ENDIF}
- if ((State and gstHHDriven) <> 0) then
- begin
- FollowGear:= CurrentHedgehog^.Gear;
- if not CurrentTeam^.ExtDriven then SendIPC('A');
- Message:= Message or gmAttack
- end
- end
-end;
-
-procedure chAttack_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH then exit;
-with CurrentHedgehog^.Gear^ do
- begin
- if not CurrentTeam^.ExtDriven and
- ((Message and gmAttack) <> 0) then SendIPC('a');
- Message:= Message and not gmAttack
- end
-end;
-
-procedure chSwitch(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-if not CurrentTeam^.ExtDriven then SendIPC('S');
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- Message:= Message or gmSwitch
-end;
-
-procedure chNextTurn(var s: shortstring);
-begin
- s:= s; // avoid compiler hint
- TryDo(AllInactive, '/nextturn called when not all gears are inactive', true);
-
- if not CurrentTeam^.ExtDriven then SendIPC('N');
-{$IFDEF DEBUGFILE}
- AddFileLog('Doing SwitchHedgehog: time '+inttostr(GameTicks));
-{$ENDIF}
-end;
-
-procedure chSay(var s: shortstring);
-begin
-SendIPC('s' + s);
-
-if copy(s, 1, 4) = '/me ' then
- s:= #2'* ' + UserNick + ' ' + copy(s, 5, Length(s) - 4)
-else
- s:= #1 + UserNick + ': ' + s;
-
-AddChatString(s)
-end;
-
-procedure chTeamSay(var s: shortstring);
-begin
-SendIPC('b' + s);
-
-s:= #4 + '[Team] ' + UserNick + ': ' + s;
-
-AddChatString(s)
-end;
-
-procedure chTimer(var s: shortstring);
-begin
-if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5') or CheckNoTeamOrHH then exit;
-
-if not CurrentTeam^.ExtDriven then SendIPC(s);
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- begin
- Message:= Message or gmTimer;
- MsgParam:= byte(s[1]) - ord('0')
- end
-end;
-
-procedure chSlot(var s: shortstring);
-var slot: LongWord;
-begin
-if (s[0] <> #1) or CheckNoTeamOrHH then exit;
-slot:= byte(s[1]) - 49;
-if slot > cMaxSlotIndex then exit;
-if not CurrentTeam^.ExtDriven then SendIPC(char(byte(s[1]) + 79));
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-with CurrentHedgehog^.Gear^ do
- begin
- Message:= Message or gmSlot;
- MsgParam:= slot
- end
-end;
-
-procedure chSetWeapon(var s: shortstring);
-begin
- if (s[0] <> #1) or CheckNoTeamOrHH then exit;
-
- if TAmmoType(s[1]) > High(TAmmoType) then exit;
-
- if not CurrentTeam^.ExtDriven then SendIPC('w' + s);
-
- with CurrentHedgehog^.Gear^ do
- begin
- Message:= Message or gmWeapon;
- MsgParam:= byte(s[1]);
- end;
-end;
-
-procedure chTaunt(var s: shortstring);
-begin
-if (s[0] <> #1) or CheckNoTeamOrHH then exit;
-
-if TWave(s[1]) > High(TWave) then exit;
-
-if not CurrentTeam^.ExtDriven then SendIPC('t' + s);
-
-with CurrentHedgehog^.Gear^ do
- begin
- Message:= Message or gmAnimate;
- MsgParam:= byte(s[1])
- end
-end;
-
-procedure chHogSay(var s: shortstring);
-var Gear: PVisualGear;
- text: shortstring;
-begin
-text:= copy(s, 2, Length(s)-1);
-if CheckNoTeamOrHH
-or ((CurrentHedgehog^.Gear^.State and gstHHDriven) = 0) then
- begin
- chSay(text);
- exit
- end;
-
-if not CurrentTeam^.ExtDriven then SendIPC('h' + s);
-
-if byte(s[1]) < 4 then
- begin
- Gear:= AddVisualGear(0, 0, vgtSpeechBubble);
- if Gear <> nil then
- begin
- Gear^.Hedgehog:= CurrentHedgehog;
- Gear^.Text:= text;
- Gear^.FrameTicks:= byte(s[1])
- end
- end
-else
- begin
- SpeechType:= byte(s[1])-3;
- SpeechText:= text
- end;
-
-end;
-
-procedure doPut(putX, putY: LongInt; fromAI: boolean);
-begin
-if CheckNoTeamOrHH or isPaused then exit;
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-bShowFinger:= false;
-if not CurrentTeam^.ExtDriven and bShowAmmoMenu then
- begin
- bSelected:= true;
- exit
- end;
-
-with CurrentHedgehog^.Gear^,
- CurrentHedgehog^ do
- if (State and gstHHChooseTarget) <> 0 then
- begin
- isCursorVisible:= false;
- if not CurrentTeam^.ExtDriven then
- begin
- if fromAI then
- begin
- TargetPoint.X:= putX;
- TargetPoint.Y:= putY
- end else
- begin
- TargetPoint.X:= CursorPoint.X - WorldDx;
- TargetPoint.Y:= cScreenHeight - CursorPoint.Y - WorldDy;
- end;
- SendIPCXY('p', TargetPoint.X, TargetPoint.Y);
- end
- else
- begin
- TargetPoint.X:= putX;
- TargetPoint.Y:= putY
- end;
- {$IFDEF DEBUGFILE}AddFilelog('put: ' + inttostr(TargetPoint.X) + ', ' + inttostr(TargetPoint.Y));{$ENDIF}
- State:= State and not gstHHChooseTarget;
- if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) <> 0 then
- Message:= Message or gmAttack;
- end
- else
- if CurrentTeam^.ExtDriven then
- OutError('got /put while not being in choose target mode', false)
-end;
-
-procedure chPut(var s: shortstring);
-begin
- s:= s; // avoid compiler hint
- doPut(0, 0, false);
-end;
-
-procedure chCapture(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-flagMakeCapture:= true
-end;
-
-procedure chSkip(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if not CurrentTeam^.ExtDriven then SendIPC(',');
-uStats.Skipped;
-skipFlag:= true
-end;
-
-procedure chSetMap(var s: shortstring);
-begin
-if isDeveloperMode then
-begin
-Pathz[ptMapCurrent]:= Pathz[ptMaps] + '/' + s;
-InitStepsFlags:= InitStepsFlags or cifMap
-end
-end;
-
-procedure chSetTheme(var s: shortstring);
-begin
-if isDeveloperMode then
-begin
-Pathz[ptCurrTheme]:= Pathz[ptThemes] + '/' + s;
-InitStepsFlags:= InitStepsFlags or cifTheme
-end
-end;
-
-procedure chSetSeed(var s: shortstring);
-begin
-if isDeveloperMode then
-begin
-SetRandomSeed(s);
-cSeed:= s;
-InitStepsFlags:= InitStepsFlags or cifRandomize
-end
-end;
-
-procedure chAmmoMenu(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH then
- bShowAmmoMenu:= true
-else
- begin
- with CurrentTeam^ do
- with Hedgehogs[CurrHedgehog] do
- begin
- bSelected:= false;
-
- if bShowAmmoMenu then bShowAmmoMenu:= false
- else if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or
- ((MultiShootAttacks > 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) = 0)) or
- ((Gear^.State and gstHHDriven) = 0) then else bShowAmmoMenu:= true
- end;
- if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1
- end
-end;
-
-procedure chFullScr(var s: shortstring);
-var flags: Longword = 0;
- ico: PSDL_Surface;
-{$IFDEF DEBUGFILE}
- buf: array[byte] of char;
-{$ENDIF}
-begin
- s:= s; // avoid compiler hint
- if Length(s) = 0 then cFullScreen:= not cFullScreen
- else cFullScreen:= s = '1';
-
-{$IFDEF DEBUGFILE}
- buf[0]:= char(0); // avoid compiler hint
- AddFileLog('Prepare to change video parameters...');
-{$ENDIF}
-
- flags:= SDL_OPENGL;// or SDL_RESIZABLE;
-
- if cFullScreen then
- flags:= flags or SDL_FULLSCREEN;
-
-{$IFDEF SDL_IMAGE_NEWER}
- WriteToConsole('Init SDL_image... ');
- SDLTry(IMG_Init(IMG_INIT_PNG) <> 0, true);
- WriteLnToConsole(msgOK);
-{$ENDIF}
- // load engine icon
-{$IFDEF DARWIN}
- ico:= LoadImage(Pathz[ptGraphics] + '/hwengine_mac', ifIgnoreCaps);
-{$ELSE}
- ico:= LoadImage(Pathz[ptGraphics] + '/hwengine', ifIgnoreCaps);
-{$ENDIF}
- if ico <> nil then
- begin
- SDL_WM_SetIcon(ico, 0);
- SDL_FreeSurface(ico)
- end;
-
- // set window caption
- SDL_WM_SetCaption('Hedgewars', nil);
-
- if SDLPrimSurface <> nil then
- begin
-{$IFDEF DEBUGFILE}
- AddFileLog('Freeing old primary surface...');
-{$ENDIF}
- SDL_FreeSurface(SDLPrimSurface);
- SDLPrimSurface:= nil;
- end;
-
-{$IFDEF SDL13}
- if SDLwindow = nil then
- begin
- SDLwindow:= SDL_CreateWindow('Hedgewars', 0, 0, cScreenWidth, cScreenHeight,
- SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN
- {$IFDEF IPHONEOS} or SDL_WINDOW_BORDERLESS{$ENDIF});
- SDL_CreateRenderer(SDLwindow, -1, 0);
- end;
-
- SDL_SetRenderDrawColor(0, 0, 0, 255);
- SDL_RenderFill(nil);
- SDL_RenderPresent();
-{$ELSE}
- SDLPrimSurface:= SDL_SetVideoMode(cScreenWidth, cScreenHeight, cBits, flags);
- SDLTry(SDLPrimSurface <> nil, true);
- PixelFormat:= SDLPrimSurface^.format;
-{$ENDIF}
-
-{$IFDEF DEBUGFILE}
- AddFileLog('Setting up OpenGL...');
- AddFileLog('SDL video driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))));
-{$ENDIF}
- SetupOpenGL();
-end;
-
-procedure chVol_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-inc(cVolumeDelta, 3)
-end;
-
-procedure chVol_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-dec(cVolumeDelta, 3)
-end;
-
-procedure chFindhh(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if CheckNoTeamOrHH or isPaused then exit;
-bShowFinger:= true;
-FollowGear:= CurrentHedgehog^.Gear
-end;
-
-procedure chPause(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
-if gameType <> gmtNet then
- isPaused:= not isPaused;
-SDL_ShowCursor(ord(isPaused))
-end;
-
-procedure chRotateMask(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-if ((GameFlags and gfInvulnerable) = 0) then cTagsMask:= cTagsMasks[cTagsMask] else cTagsMask:= cTagsMasksNoHealth[cTagsMask];
-end;
-
-procedure chSpeedup_p(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-isSpeed:= true
-end;
-
-procedure chSpeedup_m(var s: shortstring);
-begin
-s:= s; // avoid compiler hint
-isSpeed:= false
-end;
-
-procedure chZoomIn(var s: shortstring);
-begin
- s:= s; // avoid compiler hint
- if ZoomValue < cMinZoomLevel then
- ZoomValue:= ZoomValue + cZoomDelta;
-end;
-
-procedure chZoomOut(var s: shortstring);
-begin
- s:= s; // avoid compiler hint
- if ZoomValue > cMaxZoomLevel then
- ZoomValue:= ZoomValue - cZoomDelta;
-end;
-
-procedure chZoomReset(var s: shortstring);
-begin
- s:= s; // avoid compiler hint
- ZoomValue:= cDefaultZoomLevel;
-end;
-
-procedure chChat(var s: shortstring);
-begin
- s:= s; // avoid compiler hint
- GameState:= gsChat;
- KeyPressChat(27)
-end;
-
-procedure chHistory(var s: shortstring);
-begin
- s:= s; // avoid compiler hint
- uChat.showAll:= not uChat.showAll
-end;
--- a/hedgewars/CMakeLists.txt Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/CMakeLists.txt Tue Nov 30 22:46:47 2010 +0100
@@ -11,24 +11,24 @@
#if the headers are not installed, the newer apis won't be activated
find_file(sdlmixer_h SDL_mixer.h ${SDLMIXER_INCLUDE_DIR})
if(sdlmixer_h)
- file(STRINGS ${sdlmixer_h} sdlmixer_version_tmp REGEX "SDL_MIXER_PATCHLEVEL[\t' ']+[0-9]+")
- string(REGEX MATCH ".([0-9]+)" sdlmixer_version "${sdlmixer_version_tmp}")
+ file(STRINGS ${sdlmixer_h} sdlmixer_version_tmp REGEX "SDL_MIXER_PATCHLEVEL[\t' ']+[0-9]+")
+ string(REGEX MATCH ".([0-9]+)" sdlmixer_version "${sdlmixer_version_tmp}")
- if(sdlmixer_version GREATER 9)
- message(STATUS "Enabling enhanced SDL_Mixer calls")
- set(pascal_compiler_flags_cmn "-dSDL_MIXER_NEWER" ${pascal_compiler_flags_cmn})
- endif()
+ if(sdlmixer_version GREATER 9)
+ message(STATUS "Enabling enhanced SDL_Mixer calls")
+ set(pascal_compiler_flags_cmn "-dSDL_MIXER_NEWER" ${pascal_compiler_flags_cmn})
+ endif()
endif()
find_file(sdlimage_h SDL_image.h ${SDLIMAGE_INCLUDE_DIR})
if(sdlimage_h)
- file(STRINGS ${sdlimage_h} sdlimage_version_tmp REGEX "SDL_IMAGE_PATCHLEVEL[\t' ']+[0-9]+")
- string(REGEX MATCH ".([0-9]+)" sdlimage_version "${sdlimage_version_tmp}")
+ file(STRINGS ${sdlimage_h} sdlimage_version_tmp REGEX "SDL_IMAGE_PATCHLEVEL[\t' ']+[0-9]+")
+ string(REGEX MATCH ".([0-9]+)" sdlimage_version "${sdlimage_version_tmp}")
- if(sdlimage_version GREATER 7)
- message(STATUS "Enabling enhanced SDL_Image calls")
- set(pascal_compiler_flags_cmn "-dSDL_IMAGE_NEWER" ${pascal_compiler_flags_cmn})
- endif()
+ if(sdlimage_version GREATER 7)
+ message(STATUS "Enabling enhanced SDL_Image calls")
+ set(pascal_compiler_flags_cmn "-dSDL_IMAGE_NEWER" ${pascal_compiler_flags_cmn})
+ endif()
endif()
#SOURCE AND PROGRAMS SECTION
@@ -36,86 +36,94 @@
set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas)
set(engine_sources
- ${hwengine_project}
- SDLh.pas
- uAI.pas
- uAIActions.pas
- uAIAmmoTests.pas
- uAIMisc.pas
- uAmmos.pas
- uChat.pas
- uCollisions.pas
- uConsole.pas
- uConsts.pas
- uFloat.pas
- uGame.pas
- uGears.pas
- uIO.pas
- uKeys.pas
- uLand.pas
- uLandGraphics.pas
- uLandObjects.pas
- uLandTemplates.pas
- uLandTexture.pas
- uLocale.pas
- uMisc.pas
- uMobile.pas
- uRandom.pas
- uScript.pas
- adler32.pas
- uSound.pas
- uStats.pas
- uStore.pas
- uTeams.pas
- uVisualGears.pas
- uWorld.pas
- CCHandlers.inc
- GSHandlers.inc
- VGSHandlers.inc
- GearDrawing.inc
- HHHandlers.inc
- SinTable.inc
- ArgParsers.inc
- options.inc
- ${CMAKE_CURRENT_BINARY_DIR}/config.inc
- )
+ ${hwengine_project}
+ SDLh.pas
+ uAI.pas
+ uAIActions.pas
+ uAIAmmoTests.pas
+ uAIMisc.pas
+ uAmmos.pas
+ uCaptions.pas
+ uChat.pas
+ uCollisions.pas
+ uCommands.pas
+ uCommandHandlers.pas
+ uConsole.pas
+ uConsts.pas
+ uDebug.pas
+ uFloat.pas
+ uGame.pas
+ uGears.pas
+ uGearsRender.pas
+ uIO.pas
+ uKeys.pas
+ uLand.pas
+ uLandGraphics.pas
+ uLandObjects.pas
+ uLandTemplates.pas
+ uLandTexture.pas
+ uLocale.pas
+ uMisc.pas
+ uMobile.pas
+ uRandom.pas
+ uRender.pas
+ uRenderUtils.pas
+ uScript.pas
+ uSinTable.pas
+ uSound.pas
+ uStats.pas
+ uStore.pas
+ uTeams.pas
+ uTextures.pas
+ uTypes.pas
+ uUtils.pas
+ uVisualGears.pas
+ uWorld.pas
+ GSHandlers.inc
+ VGSHandlers.inc
+ HHHandlers.inc
+ ArgParsers.inc
+ options.inc
+ adler32.pas
+ ${CMAKE_CURRENT_BINARY_DIR}/config.inc
+ )
if(BUILD_ENGINE_LIBRARY)
- message(STATUS "Engine will be built as library (experimental)")
- set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwLibrary.pas)
- set(engine_sources ${hwengine_project} PascalExports.pas ${engine_sources})
- set(pascal_compiler_flags_cmn "-dHWLIBRARY" "-k-no_order_inits" "-fPIC" ${pascal_compiler_flags_cmn})
+ message(STATUS "Engine will be built as library (experimental)")
+ set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwLibrary.pas)
+ set(engine_sources ${hwengine_project} PascalExports.pas ${engine_sources})
+ set(pascal_compiler_flags_cmn "-dHWLIBRARY" "-k-no_order_inits" "-fPIC" ${pascal_compiler_flags_cmn})
endif(BUILD_ENGINE_LIBRARY)
find_program(fpc_executable ${fpc_tryexe})
if(fpc_executable)
- exec_program(${fpc_executable} ARGS "-iV" OUTPUT_VARIABLE fpc_output)
+ exec_program(${fpc_executable} ARGS "-iV" OUTPUT_VARIABLE fpc_output)
endif(fpc_executable)
set(noexecstack_flags "-k-z" "-knoexecstack")
file(WRITE ${EXECUTABLE_OUTPUT_PATH}/checkstack.pas "begin end.")
exec_program(${fpc_executable} ${EXECUTABLE_OUTPUT_PATH}
- ARGS ${noexecstack_flags} checkstack.pas
- OUTPUT_VARIABLE noout
- RETURN_VALUE testnoexecstack
- )
+ ARGS ${noexecstack_flags} checkstack.pas
+ OUTPUT_VARIABLE noout
+ RETURN_VALUE testnoexecstack
+ )
if(${testnoexecstack})
- set (noexecstack_flags "")
+ set (noexecstack_flags "")
endif(${testnoexecstack})
if(APPLE)
- string(REGEX MATCH "[pP][pP][cC]+" powerpc_build "${CMAKE_OSX_ARCHITECTURES}")
- string(REGEX MATCH "[iI]386+" i386_build "${CMAKE_OSX_ARCHITECTURES}")
- string(REGEX MATCH "[xX]86_64+" x86_64_build "${CMAKE_OSX_ARCHITECTURES}")
+ string(REGEX MATCH "[pP][pP][cC]+" powerpc_build "${CMAKE_OSX_ARCHITECTURES}")
+ string(REGEX MATCH "[iI]386+" i386_build "${CMAKE_OSX_ARCHITECTURES}")
+ string(REGEX MATCH "[xX]86_64+" x86_64_build "${CMAKE_OSX_ARCHITECTURES}")
- if(powerpc_build)
- set(powerpc_build "powerpc")
- endif()
+ if(powerpc_build)
+ set(powerpc_build "powerpc")
+ endif()
endif(APPLE)
@@ -123,19 +131,19 @@
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" fpc_version "${fpc_output}")
if(fpc_version)
- string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}")
- string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}")
- string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" fpc_vers_patch "${fpc_version}")
- message(STATUS "Freepascal version detected: ${fpc_vers_major}.${fpc_vers_minor}")
- math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}")
+ string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}")
+ string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}")
+ string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" fpc_vers_patch "${fpc_version}")
+ message(STATUS "Freepascal version detected: ${fpc_vers_major}.${fpc_vers_minor}")
+ math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}")
- if(fpc_ver LESS "020200")
- message(FATAL_ERROR "Minimum required version of FreePascal is 2.2.0")
- elseif(APPLE AND x86_64_build AND fpc_ver LESS "020400")
- message(FATAL_ERROR "Minimum required version of FreePascal is 2.4.0 for building 64 bit applications!")
- endif()
+ if(fpc_ver LESS "020200")
+ message(FATAL_ERROR "Minimum required version of FreePascal is 2.2.0")
+ elseif(APPLE AND x86_64_build AND fpc_ver LESS "020400")
+ message(FATAL_ERROR "Minimum required version of FreePascal is 2.4.0 for building 64 bit applications!")
+ endif()
else()
- message(FATAL_ERROR "No Pascal compiler found!")
+ message(FATAL_ERROR "No Pascal compiler found!")
endif()
set(pascal_compiler ${fpc_executable})
@@ -144,40 +152,40 @@
#DEPENDECIES AND EXECUTABLES SECTION
IF(NOT APPLE OR BUILD_ENGINE_LIBRARY)
- #here is the command for standard executables or for shared library
- add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine${CMAKE_EXECUTABLE_SUFFIX}"
- COMMAND "${pascal_compiler}"
- ARGS ${pascal_compiler_flags}
- MAIN_DEPENDENCY ${hwengine_project}
- DEPENDS ${engine_sources}
- )
+ #here is the command for standard executables or for shared library
+ add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine${CMAKE_EXECUTABLE_SUFFIX}"
+ COMMAND "${pascal_compiler}"
+ ARGS ${pascal_compiler_flags}
+ MAIN_DEPENDENCY ${hwengine_project}
+ DEPENDS ${engine_sources}
+ )
ELSE()
- #let's build sdlmain, which is absent from the framework
- find_package(SDL REQUIRED)
+ #let's build sdlmain, which is absent from the framework
+ find_package(SDL REQUIRED)
- set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
- include_directories(${SDL_INCLUDE_DIR})
+ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
+ include_directories(${SDL_INCLUDE_DIR})
- add_library (SDLmain STATIC SDLMain.m)
+ add_library (SDLmain STATIC SDLMain.m)
- #these are the dependencies for building a universal binary on Mac OS X
- foreach (build_arch ${powerpc_build} ${i386_build} ${x86_64_build})
- set(lipo_args_list "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" ${lipo_args_list})
- add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}"
- COMMAND "${pascal_compiler}"
- ARGS ${pascal_compiler_flags} -ohwengine.${build_arch} -P${build_arch}
- MAIN_DEPENDENCY ${hwengine_project}
- DEPENDS ${engine_sources} SDLmain lua
- )
- add_custom_target(hwengine.${build_arch} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}")
- endforeach()
+ #these are the dependencies for building a universal binary on Mac OS X
+ foreach (build_arch ${powerpc_build} ${i386_build} ${x86_64_build})
+ set(lipo_args_list "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" ${lipo_args_list})
+ add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}"
+ COMMAND "${pascal_compiler}"
+ ARGS ${pascal_compiler_flags} -ohwengine.${build_arch} -P${build_arch}
+ MAIN_DEPENDENCY ${hwengine_project}
+ DEPENDS ${engine_sources} SDLmain lua
+ )
+ add_custom_target(hwengine.${build_arch} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}")
+ endforeach()
- add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine"
- COMMAND "lipo"
- ARGS ${lipo_args_list} -create -output ${EXECUTABLE_OUTPUT_PATH}/hwengine
- DEPENDS ${lipo_args_list}
- )
+ add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine"
+ COMMAND "lipo"
+ ARGS ${lipo_args_list} -create -output ${EXECUTABLE_OUTPUT_PATH}/hwengine
+ DEPENDS ${lipo_args_list}
+ )
ENDIF()
--- a/hedgewars/GSHandlers.inc Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/GSHandlers.inc Tue Nov 30 22:46:47 2010 +0100
@@ -78,15 +78,15 @@
if (d > 1) and not gi^.Invulnerable and (GetRandom(2) = 0) then
begin
if (CurrentHedgehog^.Gear = gi) then
- PlaySound(sndOops, PHedgehog(gi^.Hedgehog)^.Team^.voicepack)
+ PlaySound(sndOops, gi^.Hedgehog^.Team^.voicepack)
else
begin
if (gi^.State and gstMoving) = 0 then
gi^.State := gi^.State or gstLoser;
if d > r div 2 then
- PlaySound(sndNooo, PHedgehog(gi^.Hedgehog)^.Team^.voicepack)
+ PlaySound(sndNooo, gi^.Hedgehog^.Team^.voicepack)
else
- PlaySound(sndUhOh, PHedgehog(gi^.Hedgehog)^.Team^.voicepack);
+ PlaySound(sndUhOh, gi^.Hedgehog^.Team^.voicepack);
end;
end;
end;
@@ -131,13 +131,13 @@
if (Gear^.Kind <> gtSniperRifleShot) and (Gear^.Kind <> gtShotgunShot) and (Gear^.Kind <> gtDEagleShot) and (Gear^.Kind <> gtSineGunShot) then
if Gear^.Kind = gtHedgehog then
begin
- if PHedgehog(Gear^.Hedgehog)^.Effects[heResurrectable] then
+ if Gear^.Hedgehog^.Effects[heResurrectable] then
ResurrectHedgehog(Gear)
else
begin
Gear^.doStep := @doStepDrowningGear;
Gear^.State := Gear^.State and (not gstHHDriven);
- AddCaption(Format(GetEventString(eidDrowned), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage);
+ AddCaption(Format(GetEventString(eidDrowned), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage);
end
end
else
@@ -173,7 +173,7 @@
CheckGearDrowning := false;
end;
-procedure CheckCollision(Gear: PGear);
+procedure CheckCollision(Gear: PGear); inline;
begin
if TestCollisionXwithGear(Gear, hwSign(Gear^.X)) or TestCollisionYwithGear(Gear, hwSign(Gear^.Y)
)
@@ -203,9 +203,9 @@
if (Gear^.Invulnerable) then exit;
//if _0_6 < Gear^.dY then
- // PlaySound(sndOw4, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
+ // PlaySound(sndOw4, Gear^.Hedgehog^.Team^.voicepack)
//else
- // PlaySound(sndOw1, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
+ // PlaySound(sndOw1, Gear^.Hedgehog^.Team^.voicepack);
ApplyDamage(Gear, dmg, dsFall);
end
@@ -626,8 +626,8 @@
dec(Gear^.Timer);
if Gear^.Timer = 0 then
begin
- PHedgehog(Gear^.Hedgehog)^.Gear^.Message:= PHedgehog(Gear^.Hedgehog)^.Gear^.Message and not gmAttack;
- PHedgehog(Gear^.Hedgehog)^.Gear^.State:= PHedgehog(Gear^.Hedgehog)^.Gear^.State and not gstAttacking;
+ Gear^.Hedgehog^.Gear^.Message:= Gear^.Hedgehog^.Gear^.Message and not gmAttack;
+ Gear^.Hedgehog^.Gear^.State:= Gear^.Hedgehog^.Gear^.State and not gstAttacking;
AttackBar:= 0;
Gear^.SoundChannel := LoopSound(sndBee);
@@ -806,7 +806,7 @@
shell: PVisualGear;
begin
cArtillery := true;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.State := HHGear^.State or gstNotKickable;
HedgehogChAngle(HHGear);
if not cLaserSighting then
@@ -899,7 +899,7 @@
HHGear: PGear;
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
dec(Gear^.Timer);
if (Gear^.Timer = 0)or((Gear^.Message and gmDestroy) <> 0)or((HHGear^.State and gstHHDriven) =
0) then
@@ -973,7 +973,7 @@
HHGear: PGear;
begin
i := 0;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
y := hwRound(Gear^.Y) - cHHRadius * 2;
while y < hwRound(Gear^.Y) do
@@ -1005,7 +1005,7 @@
begin
AllInactive := false;
dec(Gear^.Timer);
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HedgehogChAngle(HHGear);
@@ -1087,7 +1087,7 @@
begin
BTPrevAngle := High(LongInt);
BTSteps := 0;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.Message := 0;
HHGear^.State := HHGear^.State or gstNotKickable;
Gear^.doStep := @doStepBlowTorchWork
@@ -1102,14 +1102,14 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
if ((HHGear^.State and gstHHDriven) = 0)
or (CheckGearDrowning(HHGear))
or TestCollisionYwithGear(HHGear, 1) then
begin
DeleteGear(Gear);
isCursorVisible := false;
- ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^);
+ ApplyAmmoChanges(HHGear^.Hedgehog^);
exit
end;
@@ -1128,11 +1128,11 @@
Gear^.X := HHGear^.X;
Gear^.Y := HHGear^.Y;
- ApplyAngleBounds(PHedgehog(Gear^.Hedgehog)^, amRope);
+ ApplyAngleBounds(Gear^.Hedgehog^, amRope);
Gear^.dX := SignAs(AngleSin(HHGear^.Angle), HHGear^.dX);
Gear^.dY := -AngleCos(HHGear^.Angle);
- Gear^.Friction := _450;
+ Gear^.Friction := _450 * _0_01 * cRopePercent;
Gear^.Elasticity := _0;
Gear^.State := Gear^.State and not gsttmpflag;
Gear^.doStep := @doStepRope;
@@ -1170,7 +1170,7 @@
end;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
if ((HHGear^.State and gstHHDriven) = 0)
or (CheckGearDrowning(HHGear)) then
@@ -1240,7 +1240,7 @@
begin
lx := hwRound(nx);
ly := hwRound(ny);
- if ((ly and LAND_HEIGHT_MASK) = 0) and ((lx and LAND_WIDTH_MASK) = 0) and (Land[ly, lx] <> 0) then
+ if ((ly and LAND_HEIGHT_MASK) = 0) and ((lx and LAND_WIDTH_MASK) = 0) and ((Land[ly, lx] and $FF00) <> 0) then
begin
ny := _1 / Distance(ropeDx, ropeDy);
// old rope pos
@@ -1330,10 +1330,37 @@
HHGear^.dY := HHGear^.dY * len;
end;
-
- if (Gear^.Message and gmAttack) <> 0 then
+ haveCollision:= false;
+ if RopePoints.Count > 0 then
+ begin
+ ly:= hwRound(RopePoints.ar[0].Y);
+ lx:= hwRound(RopePoints.ar[0].X)
+ end
+ else if Gear^.Elasticity.QWordValue > 0 then
+ begin
+ ly:= hwRound(Gear^.Y);
+ lx:= hwRound(Gear^.X)
+ end;
+(* // just in case it turns out we have rounding problems
+ i:= -1;
+ while not haveCollision and (i < 2) do
+ begin
+ j:= -1;
+ while not haveCollision and (j < 2) do
+ begin
+ haveCollision:= ((((ly + i) and LAND_HEIGHT_MASK) = 0) and
+ (((lx + j) and LAND_WIDTH_MASK) = 0) and
+ ((Land[ly + i, lx + j] and $FF00) <> 0));
+ inc(j)
+ end;
+ inc(i)
+ end; *)
+ if ((Gear^.Message and gmAttack) <> 0) or
+ (((ly and LAND_HEIGHT_MASK) = 0) and
+ ((lx and LAND_WIDTH_MASK) = 0) and
+ ((Land[ly, lx] and $FF00) = 0)) then
if (Gear^.State and gsttmpFlag) <> 0 then
- with PHedgehog(Gear^.Hedgehog)^ do
+ with Gear^.Hedgehog^ do
begin
PlaySound(sndRopeRelease);
if CurAmmoType <> amParachute then
@@ -1356,10 +1383,10 @@
begin
if (Gear^.State and gstAttacked) = 0 then
begin
- OnUsedAmmo(PHedgehog(HHGear^.Hedgehog)^);
+ OnUsedAmmo(HHGear^.Hedgehog^);
Gear^.State := Gear^.State or gstAttacked
end;
- ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^)
+ ApplyAmmoChanges(HHGear^.Hedgehog^)
end;
begin
@@ -1367,7 +1394,7 @@
Gear^.Y := Gear^.Y - Gear^.dY;
Gear^.Elasticity := Gear^.Elasticity + _1;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
DeleteCI(HHGear);
if (HHGear^.State and gstMoving) <> 0 then
@@ -1397,8 +1424,7 @@
ty := _0;
while tt > _20 do
begin
- if TestCollisionXwithXYShift(Gear, tx, hwRound(ty), -hwSign(Gear^.dX))
- or TestCollisionYwithXYShift(Gear, hwRound(tx), hwRound(ty), -hwSign(Gear^.dY)) then
+ if ((hwRound(Gear^.Y+ty) and LAND_HEIGHT_MASK) = 0) and ((hwRound(Gear^.X+tx) and LAND_WIDTH_MASK) = 0) and ((Land[hwRound(Gear^.Y+ty), hwRound(Gear^.X+tx)] and $FF00) <> 0) then
begin
Gear^.X := Gear^.X + tx;
Gear^.Y := Gear^.Y + ty;
@@ -1422,7 +1448,9 @@
end;
end;
- CheckCollision(Gear);
+ if ((hwRound(Gear^.Y) and LAND_HEIGHT_MASK) = 0) and ((hwRound(Gear^.X) and LAND_WIDTH_MASK) = 0) and ((Land[hwRound(Gear^.Y), hwRound(Gear^.X)] and $FF00) <> 0) then
+ Gear^.State:= Gear^.State or gstCollision
+ else Gear^.State:= Gear^.State and not gstCollision;
if (Gear^.State and gstCollision) <> 0 then
if Gear^.Elasticity < _10 then
@@ -1447,7 +1475,7 @@
or ((HHGear^.State and gstHHDriven) = 0)
or (HHGear^.Damage > 0) then
begin
- with PHedgehog(Gear^.Hedgehog)^.Gear^ do
+ with Gear^.Hedgehog^.Gear^ do
begin
State := State and not gstAttacking;
Message := Message and not gmAttack
@@ -1808,7 +1836,7 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.State := HHGear^.State or gstNoDamage;
DeleteCI(HHGear);
@@ -1825,7 +1853,7 @@
HHGear: PGear;
i: LongInt;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.State := HHGear^.State or gstNoDamage;
DeleteCI(HHGear);
@@ -1978,7 +2006,7 @@
exit
end;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
if hwRound(HHGear^.Y) <= Gear^.Tag - 2 then
begin
Gear^.Tag := hwRound(HHGear^.Y);
@@ -2008,7 +2036,7 @@
HHGear: PGear;
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
DeleteCI(HHGear);
HHGear^.X := int2hwFloat(hwRound(HHGear^.X)) - _0_5;
HHGear^.dX := SignAs(cLittle, Gear^.dX);
@@ -2021,7 +2049,7 @@
Gear^.doStep := @doStepFirePunchWork;
DrawTunnel(HHGear^.X - int2hwFloat(cHHRadius), HHGear^.Y + _1, _0_5, _0, cHHRadius * 4, 5);
- PlaySound(TSound(ord(sndFirePunch1) + GetRandom(6)), PHedgehog(HHGear^.Hedgehog)^.Team^.
+ PlaySound(TSound(ord(sndFirePunch1) + GetRandom(6)), HHGear^.Hedgehog^.Team^.
voicepack)
end;
@@ -2031,7 +2059,7 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
inc(Gear^.Timer);
@@ -2049,7 +2077,7 @@
end;
DeleteGear(Gear);
isCursorVisible := false;
- ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^);
+ ApplyAmmoChanges(HHGear^.Hedgehog^);
exit
end;
@@ -2070,7 +2098,7 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
DeleteCI(HHGear);
@@ -2167,7 +2195,7 @@
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
tx := int2hwFloat(TargetPoint.X);
ty := int2hwFloat(TargetPoint.Y);
x := HHGear^.X;
@@ -2202,8 +2230,8 @@
var
HHGear: PGear;
begin
- PHedgehog(Gear^.Hedgehog)^.Unplaced := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ Gear^.Hedgehog^.Unplaced := false;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.Y := HHGear^.Y + HHGear^.dY;
// hedgehog falling to collect cases
HHGear^.dY := HHGear^.dY + cGravity;
@@ -2233,7 +2261,7 @@
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
if not TryPlaceOnLand(TargetPoint.X - SpritesData[sprHHTelepMask].Width div 2,
TargetPoint.Y - SpritesData[sprHHTelepMask].Height div 2,
sprHHTelepMask, 0, false) then
@@ -2275,14 +2303,14 @@
if ((Gear^.Message and not gmSwitch) <> 0) or (TurnTimeLeft = 0) then
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
Msg := Gear^.Message and not gmSwitch;
DeleteGear(Gear);
- OnUsedAmmo(PHedgehog(HHGear^.Hedgehog)^);
- ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^);
+ OnUsedAmmo(HHGear^.Hedgehog^);
+ ApplyAmmoChanges(HHGear^.Hedgehog^);
HHGear := CurrentHedgehog^.Gear;
- ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^);
+ ApplyAmmoChanges(HHGear^.Hedgehog^);
HHGear^.Message := Msg;
exit
end;
@@ -2326,7 +2354,7 @@
begin
Gear^.doStep := @doStepSwitcherWork;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
with HHGear^ do
begin
State := State and not gstAttacking;
@@ -2377,7 +2405,7 @@
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.State := HHGear^.State or gstNoDamage;
DeleteCI(HHGear);
@@ -2437,7 +2465,7 @@
if Gear^.Timer = 0 then
begin
Gear^.Pos := 1;
- PlaySound(sndKamikaze, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
+ PlaySound(sndKamikaze, Gear^.Hedgehog^.Team^.voicepack);
Gear^.doStep := @doStepKamikazeWork
end
end;
@@ -2448,7 +2476,7 @@
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.dX := Gear^.dX;
HHGear^.dY := Gear^.dY;
@@ -2637,7 +2665,7 @@
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.Message := HHGear^.Message and (not gmAttack);
DeleteCI(HHGear);
Gear^.IntersectGear:= nil;
@@ -2687,7 +2715,7 @@
Gear^.Timer := 0;
inc(Gear^.Pos);
if Gear^.Pos = 5 then
- PlaySound(sndYoohoo, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
+ PlaySound(sndYoohoo, Gear^.Hedgehog^.Team^.voicepack)
end;
if Gear^.Pos = 14 then
@@ -2697,7 +2725,7 @@
procedure doStepSeduction(Gear: PGear);
begin
AllInactive := false;
- DeleteCI(PHedgehog(Gear^.Hedgehog)^.Gear);
+ DeleteCI(Gear^.Hedgehog^.Gear);
Gear^.doStep := @doStepSeductionWear
end;
@@ -2836,7 +2864,7 @@
begin
AllInactive := false;
dec(Gear^.Timer);
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HedgehogChAngle(HHGear);
gX := hwRound(Gear^.X) + GetLaunchX(amBallgun, hwSign(HHGear^.dX), HHGear^.Angle);
gY := hwRound(Gear^.Y) + GetLaunchY(amBallgun, HHGear^.Angle);
@@ -2864,7 +2892,7 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.Message := HHGear^.Message and not (gmUp or gmDown);
HHGear^.State := HHGear^.State or gstNotKickable;
Gear^.doStep := @doStepBallgunWork
@@ -2889,7 +2917,7 @@
if ((TrainingFlags and tfRCPlane) <> 0) and ((TrainingFlags and tfTimeTrial) <> 0 ) and (
TimeTrialStartTime = 0) then TimeTrialStartTime := RealTicks;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
FollowGear := Gear;
fChanged := false;
@@ -3025,7 +3053,7 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.Message := 0;
HHGear^.State := HHGear^.State or gstNotKickable;
Gear^.Angle := HHGear^.Angle;
@@ -3045,7 +3073,7 @@
isUnderwater:= cWaterLine < hwRound(Gear^.Y) + Gear^.Radius;
if Gear^.Pos > 0 then dec(Gear^.Pos);
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
//dec(Gear^.Timer);
move := _0_2;
fuel := 50;
@@ -3152,7 +3180,7 @@
end;
DeleteGear(Gear);
isCursorVisible := false;
- ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^);
+ ApplyAmmoChanges(HHGear^.Hedgehog^);
// if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);
// Gear^.Tex:= RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(round(Gear^.Health / 20)) + '%', cWhiteColor, fntSmall)
@@ -3169,7 +3197,7 @@
Gear^.Pos:= 0;
Gear^.doStep := @doStepJetpackWork;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
FollowGear := HHGear;
AfterAttack;
with HHGear^ do
@@ -3427,7 +3455,7 @@
// destroy portal if ground it was attached too is gone
if ((Land[hwRound(Gear^.Y), hwRound(Gear^.X)] and $FF00) = 0)
or (Gear^.Timer < 1)
- or (PHedgehog(Gear^.Hedgehog) <> CurrentHedgehog)
+ or (Gear^.Hedgehog <> CurrentHedgehog)
or (hwRound(Gear^.Y) > cWaterLine) then
begin
deleteGear(Gear);
@@ -3754,7 +3782,7 @@
doPortalColorSwitch();
doStepPerPixel(Gear, @doStepMovingPortal_real, true);
if (Gear^.Timer < 1)
- or (PHedgehog(Gear^.Hedgehog) <> CurrentHedgehog) then
+ or (Gear^.Hedgehog <> CurrentHedgehog) then
deleteGear(Gear);
end;
@@ -4047,7 +4075,7 @@
Fire: PGear;
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HedgehogChAngle(HHGear);
gX := hwRound(Gear^.X) + GetLaunchX(amBallgun, hwSign(HHGear^.dX), HHGear^.Angle);
gY := hwRound(Gear^.Y) + GetLaunchY(amBallgun, HHGear^.Angle);
@@ -4111,7 +4139,7 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.Message := HHGear^.Message and not (gmUp or gmDown or gmLeft or gmRight);
HHGear^.State := HHGear^.State or gstNotKickable;
Gear^.doStep := @doStepFlamethrowerWork
@@ -4140,7 +4168,7 @@
t: PGearArray;
i: LongInt;
begin
-HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear;
+HHGear:= Gear^.Hedgehog^.Gear;
HHGear^.State:= HHGear^.State or gstNoDamage;
DeleteCI(HHGear);
@@ -4181,7 +4209,7 @@
HHGear: PGear;
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
dec(Gear^.Timer);
if (HHGear = nil) or (Gear^.Timer = 0) or ((Gear^.Message and gmDestroy) <> 0) then
begin
@@ -4234,7 +4262,7 @@
HHGear: PGear;
begin
i := 0;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
y := hwRound(Gear^.Y) - cHHRadius * 2;
while y < hwRound(Gear^.Y) do
@@ -4265,9 +4293,12 @@
dec(TurnTimeLeft);
AllInactive := false;
- hh := PHedgehog(Gear^.Hedgehog);
- DrawCentered(hwRound(hh^.Gear^.X) + WorldDx, hwRound(hh^.Gear^.Y) + WorldDy -
+ hh := Gear^.Hedgehog;
+
+ // no, you can't do that here
+ {DrawCentered(hwRound(hh^.Gear^.X) + WorldDx, hwRound(hh^.Gear^.Y) + WorldDy -
cHHRadius - 14 - hh^.HealthTagTex^.h, hh^.HealthTagTex);
+ }
(*DrawCircle(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Radius, 1.5, 0, 0, $FF,
$FF);*)
@@ -4321,13 +4352,13 @@
resgear^.Health := graves[i]^.Health;
PHedgehog(graves[i]^.Hedgehog)^.Gear := resgear;
DeleteGear(graves[i]);
- RenderHealth(PHedgehog(resgear^.Hedgehog)^);
- RecountTeamHealth(Phedgehog(resgear^.Hedgehog)^.Team);
- PHedgehog(resgear^.Hedgehog)^.Effects[heResurrected]:= true;
- if PHedgehog(resgear^.Hedgehog)^.Hat = 'NoHat' then
+ RenderHealth(resgear^.Hedgehog^);
+ RecountTeamHealth(resgear^.Hedgehog^.Team);
+ resgear^.Hedgehog^.Effects[heResurrected]:= true;
+ if resgear^.Hedgehog^.Hat = 'NoHat' then
begin
- FreeTexture(PHedgehog(resgear^.Hedgehog)^.HatTex);
- PHedgehog(resgear^.Hedgehog)^.HatTex := Surface2Tex(
+ FreeTexture(resgear^.Hedgehog^.HatTex);
+ resgear^.Hedgehog^.HatTex := Surface2Tex(
LoadImage(Pathz[ptHats] + '/Reserved/Zombie', ifNone),
True)
end
--- a/hedgewars/GearDrawing.inc Mon Nov 29 09:11:31 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,854 +0,0 @@
-procedure DrawHH(Gear: PGear; ox, oy: LongInt);
-var i, t: LongInt;
- amt: TAmmoType;
- sign, hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite, direction
- dx, dy, ax, ay, aAngle, dAngle, hAngle, lx, ly: real; // laser, change
- defaultPos, HatVisible: boolean;
- HH: PHedgehog;
- CurWeapon: PAmmo;
-begin
-HH:= PHedgehog(Gear^.Hedgehog);
-if HH^.Unplaced then exit;
-m:= 1;
-if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1;
-sx:= ox + 1; // this offset is very common
-sy:= oy - 3;
-sign:= hwSign(Gear^.dX);
-
-if (Gear^.State and gstHHDeath) <> 0 then
- begin
- DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos);
- Tint(HH^.Team^.Clan^.Color);
- DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos + 8);
- Tint($FF, $FF, $FF, $FF);
- exit
- end
-else if (Gear^.State and gstHHGone) <> 0 then
- begin
- DrawRotatedF(sprTeleport, sx, sy, Gear^.Pos, sign, 0);
- exit
- end;
-
-defaultPos:= true;
-HatVisible:= false;
-
-
-if HH^.Effects[hePoisoned] then
- begin
- Tint($00, $FF, $40, $40);
- DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360);
- Tint($FF, $FF, $FF, $FF)
- end;
-
-if ((Gear^.State and gstWinner) <> 0) and
- ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then
- begin
- DrawHedgehog(sx, sy,
- sign,
- 2,
- 0,
- 0);
- defaultPos:= false
- end;
-if (Gear^.State and gstDrowning) <> 0 then
- begin
- DrawHedgehog(sx, sy,
- sign,
- 1,
- 7,
- 0);
- defaultPos:= false
- end else
-if (Gear^.State and gstLoser) <> 0 then
- begin
- DrawHedgehog(sx, sy,
- sign,
- 2,
- 3,
- 0);
- defaultPos:= false
- end else
-
-if (Gear^.State and gstHHDriven) <> 0 then
- begin
- if ((Gear^.State and gstHHThinking) = 0) and
- (ShowCrosshair or ((CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope))) and
- ((Gear^.State and (gstAttacked or gstAnimation)) = 0) then
- begin
-(* These calculations are a little complex for a few reasons:
- 1: I need to draw the laser from weapon origin to nearest land
- 2: I need to start the beam outside the hedgie for attractiveness.
- 3: I need to extend the beam beyond land.
- This routine perhaps should be pushed into uStore or somesuch instead of continuuing the increase in size of this function.
-*)
- dx:= sign * m * Sin(Gear^.Angle * pi / cMaxAngle);
- dy:= -Cos(Gear^.Angle * pi / cMaxAngle);
- if cLaserSighting then
- begin
- lx:= GetLaunchX(HH^.CurAmmoType, sign * m, Gear^.Angle);
- ly:= GetLaunchY(HH^.CurAmmoType, Gear^.Angle);
-
- // ensure we start outside the hedgehog (he's solid after all)
- while abs(lx * lx + ly * ly) < (Gear^.radius * Gear^.radius) do
- begin
- lx:= lx + dx;
- ly:= ly + dy
- end;
-
- // add hog's position
- lx:= lx + ox - WorldDx;
- ly:= ly + oy - WorldDy;
-
- // decrease number of iterations required
- ax:= dx * 4;
- ay:= dy * 4;
-
- tx:= round(lx);
- ty:= round(ly);
- hx:= tx;
- hy:= ty;
- while ((ty and LAND_HEIGHT_MASK) = 0) and
- ((tx and LAND_WIDTH_MASK) = 0) and
- (Land[ty, tx] = 0) do // TODO: check for constant variable instead
- begin
- lx:= lx + ax;
- ly:= ly + ay;
- tx:= round(lx);
- ty:= round(ly)
- end;
- // reached edge of land. assume infinite beam. Extend it way out past camera
- if ((ty and LAND_HEIGHT_MASK) <> 0) or ((tx and LAND_WIDTH_MASK) <> 0) then
- begin
- tx:= round(lx + ax * (LAND_WIDTH div 4));
- ty:= round(ly + ay * (LAND_WIDTH div 4));
- end;
-
- //if (abs(lx-tx)>8) or (abs(ly-ty)>8) then
- begin
- DrawLine(hx, hy, tx, ty, 1.0, $FF, $00, $00, $C0);
- end;
- end;
- // draw crosshair
- cx:= Round(hwRound(Gear^.X) + dx * 80 + GetLaunchX(HH^.CurAmmoType, sign * m, Gear^.Angle));
- cy:= Round(hwRound(Gear^.Y) + dy * 80 + GetLaunchY(HH^.CurAmmoType, Gear^.Angle));
- DrawRotatedTex(HH^.Team^.CrosshairTex,
- 12, 12, cx + WorldDx, cy + WorldDy, 0,
- sign * (Gear^.Angle * 180.0) / cMaxAngle);
- end;
- hx:= ox + 8 * sign;
- hy:= oy - 2;
- aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
- if CurAmmoGear <> nil then
- begin
- case CurAmmoGear^.Kind of
- gtShotgunShot: begin
- if (CurAmmoGear^.State and gstAnimation <> 0) then
- DrawRotated(sprShotgun, hx, hy, sign, aangle)
- else
- DrawRotated(sprHandShotgun, hx, hy, sign, aangle);
- end;
- gtDEagleShot: DrawRotated(sprDEagle, hx, hy, sign, aangle);
- gtSniperRifleShot: begin
- if (CurAmmoGear^.State and gstAnimation <> 0) then
- DrawRotatedF(sprSniperRifle, hx, hy, 1, sign, aangle)
- else
- DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle)
- end;
- gtBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle);
- gtRCPlane: begin
- DrawRotated(sprHandPlane, hx, hy, sign, 0);
- defaultPos:= false
- end;
- gtRope: begin
- if Gear^.X < CurAmmoGear^.X then
- begin
- dAngle:= 0;
- hAngle:= 180;
- i:= 1
- end else
- begin
- dAngle:= 180;
- hAngle:= 0;
- i:= -1
- end;
- if ((Gear^.State and gstWinner) = 0) then
- begin
- DrawHedgehog(ox, oy,
- i,
- 1,
- 0,
- DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle);
- with HH^ do
- if (HatTex <> nil) then
- begin
- DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32,
- i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
- if HatTex^.w > 64 then
- begin
- Tint(HH^.Team^.Clan^.Color);
- DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32,
- i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
- Tint($FF, $FF, $FF, $FF)
- end
- end
- end;
- DrawAltWeapon(Gear, ox, oy);
- defaultPos:= false
- end;
- gtBlowTorch: begin
- DrawRotated(sprBlowTorch, hx, hy, sign, aangle);
- DrawHedgehog(sx, sy,
- sign,
- 3,
- HH^.visStepPos div 2,
- 0);
- with HH^ do
- if (HatTex <> nil) then
- begin
- DrawTextureF(HatTex,
- 1,
- sx,
- sy - 5,
- 0,
- sign,
- 32,
- 32);
- if HatTex^.w > 64 then
- begin
- Tint(HH^.Team^.Clan^.Color);
- DrawTextureF(HatTex,
- 1,
- sx,
- sy - 5,
- 32,
- sign,
- 32,
- 32);
- Tint($FF, $FF, $FF, $FF)
- end
- end;
- defaultPos:= false
- end;
- gtShover: DrawRotated(sprHandBaseball, hx, hy, sign, aangle + 180);
- gtFirePunch: begin
- DrawHedgehog(sx, sy,
- sign,
- 1,
- 4,
- 0);
- defaultPos:= false
- end;
- gtPickHammer: begin
- defaultPos:= false;
- dec(sy,20);
- end;
- gtTeleport: defaultPos:= false;
- gtWhip: begin
- DrawRotatedF(sprWhip,
- sx,
- sy,
- 1,
- sign,
- 0);
- defaultPos:= false
- end;
- gtHammer: begin
- DrawRotatedF(sprHammer,
- sx,
- sy,
- 1,
- sign,
- 0);
- defaultPos:= false
- end;
- gtResurrector: begin
- DrawRotated(sprHandResurrector, sx, sy, 0, 0);
- defaultPos:= false
- end;
- gtKamikaze: begin
- if CurAmmoGear^.Pos = 0 then
- DrawHedgehog(sx, sy,
- sign,
- 1,
- 6,
- 0)
- else
- DrawRotatedF(sprKamikaze,
- ox, oy,
- CurAmmoGear^.Pos - 1,
- sign,
- aangle);
- defaultPos:= false
- end;
- gtSeduction: begin
- if CurAmmoGear^.Pos >= 6 then
- DrawHedgehog(sx, sy,
- sign,
- 2,
- 2,
- 0)
- else
- begin
- DrawRotatedF(sprDress,
- ox, oy,
- CurAmmoGear^.Pos,
- sign,
- 0);
- DrawSprite(sprCensored, ox - 32, oy - 20, 0)
- end;
- defaultPos:= false
- end;
- gtFlamethrower: begin
- DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
- if CurAmmoGear^.Tex <> nil then DrawCentered(sx, sy - 40, CurAmmoGear^.Tex)
- end;
- end;
-
- case CurAmmoGear^.Kind of
- gtShotgunShot,
- gtDEagleShot,
- gtSniperRifleShot,
- gtShover: begin
- DrawHedgehog(sx, sy,
- sign,
- 0,
- 4,
- 0);
- defaultPos:= false;
- HatVisible:= true
- end
- end
- end else
-
- if ((Gear^.State and gstHHJumping) <> 0) then
- begin
- DrawHedgehog(sx, sy,
- sign*m,
- 1,
- 1,
- 0);
- HatVisible:= true;
- defaultPos:= false
- end else
-
- if (Gear^.Message and (gmLeft or gmRight) <> 0) and (not isCursorVisible) then
- begin
- DrawHedgehog(sx, sy,
- sign,
- 0,
- HH^.visStepPos div 2,
- 0);
- defaultPos:= false;
- HatVisible:= true
- end
- else
-
- if ((Gear^.State and gstAnimation) <> 0) then
- begin
- if (TWave(Gear^.Tag) < Low(TWave)) or (TWave(Gear^.Tag) > High(TWave)) then
- begin
- Gear^.State:= Gear^.State and not gstAnimation;
- end
- else
- begin
- DrawRotatedF(Wavez[TWave(Gear^.Tag)].Sprite,
- sx,
- sy,
- Gear^.Pos,
- sign,
- 0.0);
- defaultPos:= false
- end
- end
- else
- if ((Gear^.State and gstAttacked) = 0) then
- begin
- if HH^.Timer > 0 then
- begin
- // There must be a tidier way to do this. Anyone?
- if aangle <= 90 then aangle:= aangle+360;
- if Gear^.dX > _0 then aangle:= aangle-((aangle-240)*HH^.Timer/10)
- else aangle:= aangle+((240-aangle)*HH^.Timer/10);
- dec(HH^.Timer)
- end;
- amt:= CurrentHedgehog^.CurAmmoType;
- CurWeapon:= GetAmmoEntry(HH^);
- case amt of
- amBazooka: DrawRotated(sprHandBazooka, hx, hy, sign, aangle);
- amMortar: DrawRotated(sprHandMortar, hx, hy, sign, aangle);
- amMolotov: DrawRotated(sprHandMolotov, hx, hy, sign, aangle);
- amBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle);
- amDrill: DrawRotated(sprHandDrill, hx, hy, sign, aangle);
- amRope: DrawRotated(sprHandRope, hx, hy, sign, aangle);
- amShotgun: DrawRotated(sprHandShotgun, hx, hy, sign, aangle);
- amDEagle: DrawRotated(sprHandDEagle, hx, hy, sign, aangle);
- amSineGun: DrawRotated(sprHandShotgun, hx, hy, sign, aangle);
- amPortalGun: if (CurWeapon^.Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer?
- DrawRotatedF(sprPortalGun, hx, hy, 0, sign, aangle)
- else
- DrawRotatedF(sprPortalGun, hx, hy, 1+(CurWeapon^.Timer and 1), sign, aangle);
- amSniperRifle: DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle);
- amBlowTorch: DrawRotated(sprHandBlowTorch, hx, hy, sign, aangle);
- amCake: DrawRotated(sprHandCake, hx, hy, sign, aangle);
- amGrenade: DrawRotated(sprHandGrenade, hx, hy, sign, aangle);
- amWatermelon: DrawRotated(sprHandMelon, hx, hy, sign, aangle);
- amSkip: DrawRotated(sprHandSkip, hx, hy, sign, aangle);
- amClusterBomb: DrawRotated(sprHandCluster, hx, hy, sign, aangle);
- amDynamite: DrawRotated(sprHandDynamite, hx, hy, sign, aangle);
- amHellishBomb: DrawRotated(sprHandHellish, hx, hy, sign, aangle);
- amGasBomb: DrawRotated(sprHandCheese, hx, hy, sign, aangle);
- amMine: DrawRotated(sprHandMine, hx, hy, sign, aangle);
- amSMine: DrawRotated(sprHandSMine, hx, hy, sign, aangle);
- amSeduction: DrawRotated(sprHandSeduction, hx, hy, sign, aangle);
- amVampiric: DrawRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
- amRCPlane: begin
- DrawRotated(sprHandPlane, hx, hy, sign, 0);
- defaultPos:= false
- end;
- amGirder: begin
- DrawRotated(sprHandConstruction, hx, hy, sign, aangle);
- DrawSpriteClipped(sprGirder,
- ox-256,
- oy-256,
- LongInt(topY)+WorldDy,
- LongInt(rightX)+WorldDx,
- cWaterLine+WorldDy,
- LongInt(leftX)+WorldDx)
- end;
- amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
- amFlamethrower: DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
- amResurrector: DrawCircle(ox, oy, 98, 4, $F5, $DB, $35, $AA); // I'd rather not like to hardcode 100 here
- end;
-
- case amt of
- amAirAttack,
- amMineStrike,
- amDrillStrike: DrawRotated(sprHandAirAttack, sx, oy, sign, 0);
- amPickHammer: DrawHedgehog(sx, sy,
- sign,
- 1,
- 2,
- 0);
- amTeleport: DrawRotatedF(sprTeleport, sx, sy, 0, sign, 0);
- amKamikaze: DrawHedgehog(sx, sy,
- sign,
- 1,
- 5,
- 0);
- amWhip: DrawRotatedF(sprWhip,
- sx,
- sy,
- 0,
- sign,
- 0);
- amHammer: DrawRotatedF(sprHammer,
- sx,
- sy,
- 0,
- sign,
- 0);
- else
- DrawHedgehog(sx, sy,
- sign,
- 0,
- 4,
- 0);
-
- HatVisible:= true;
- (* with HH^ do
- if (HatTex <> nil)
- and (HatVisibility > 0) then
- DrawTextureF(HatTex,
- HatVisibility,
- sx,
- sy - 5,
- 0,
- sign,
- 32,
- 32); *)
- end;
-
- case amt of
- amBaseballBat: DrawRotated(sprHandBaseball,
- sx - 4 * sign,
- sy + 9, sign, aangle);
- end;
-
- defaultPos:= false
- end;
-
-end else // not gstHHDriven
- begin
- if (Gear^.Damage > 0)
- and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
- begin
- DrawHedgehog(sx, sy,
- sign,
- 2,
- 1,
- Gear^.DirAngle);
- defaultPos:= false
- end else
-
- if ((Gear^.State and gstHHJumping) <> 0) then
- begin
- DrawHedgehog(sx, sy,
- sign*m,
- 1,
- 1,
- 0);
- defaultPos:= false
- end;
- end;
-
-with HH^ do
- begin
- if defaultPos then
- begin
- DrawRotatedF(sprHHIdle,
- sx,
- sy,
- (RealTicks div 128 + Gear^.Pos) mod 19,
- sign,
- 0);
- HatVisible:= true;
- end;
-
- if HatVisible then
- if HatVisibility < 1.0 then
- HatVisibility:= HatVisibility + 0.2
- else
- else
- if HatVisibility > 0.0 then
- HatVisibility:= HatVisibility - 0.2;
-
- if (HatTex <> nil)
- and (HatVisibility > 0) then
- if DefaultPos then
- begin
- DrawTextureF(HatTex,
- HatVisibility,
- sx,
- sy - 5,
- (RealTicks div 128 + Gear^.Pos) mod 19,
- sign,
- 32,
- 32);
- if HatTex^.w > 64 then
- begin
- Tint(HH^.Team^.Clan^.Color);
- DrawTextureF(HatTex,
- HatVisibility,
- sx,
- sy - 5,
- (RealTicks div 128 + Gear^.Pos) mod 19 + 32,
- sign,
- 32,
- 32);
- Tint($FF, $FF, $FF, $FF)
- end
- end
- else
- begin
- DrawTextureF(HatTex,
- HatVisibility,
- sx,
- sy - 5,
- 0,
- sign*m,
- 32,
- 32);
- if HatTex^.w > 64 then
- begin
- Tint(HH^.Team^.Clan^.Color);
- DrawTextureF(HatTex,
- HatVisibility,
- sx,
- sy - 5,
- 32,
- sign*m,
- 32,
- 32);
- Tint($FF, $FF, $FF, $FF)
- end
- end
- end;
-if (Gear^.State and gstHHDriven) <> 0 then
- begin
-(* if (CurAmmoGear = nil) then
- begin
- amt:= CurrentHedgehog^.CurAmmoType;
- case amt of
- amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0);
- end
- end; *)
- if CurAmmoGear <> nil then
- begin
- case CurAmmoGear^.Kind of
- gtJetpack: begin
- DrawSprite(sprJetpack, sx-32, sy-32, 0);
- if cWaterLine > hwRound(Gear^.Y) + Gear^.Radius then
- begin
- if (CurAmmoGear^.MsgParam and gmUp) <> 0 then DrawSprite(sprJetpack, sx-32, sy-28, 1);
- if (CurAmmoGear^.MsgParam and gmLeft) <> 0 then DrawSprite(sprJetpack, sx-28, sy-28, 2);
- if (CurAmmoGear^.MsgParam and gmRight) <> 0 then DrawSprite(sprJetpack, sx-36, sy-28, 3)
- end;
- if CurAmmoGear^.Tex <> nil then DrawCentered(sx, sy - 40, CurAmmoGear^.Tex);
- DrawAltWeapon(Gear, sx, sy)
- end;
- end;
- end
- end;
-
-with HH^ do
- begin
- if ((Gear^.State and not gstWinner) = 0)
- or ((Gear^.State = gstWait) and (Gear^.dY.QWordValue = 0))
- or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then
- begin
- t:= sy - cHHRadius - 9;
- if (cTagsMask and htTransparent) <> 0 then
- Tint($FF, $FF, $FF, $80);
- if ((cTagsMask and htHealth) <> 0) then
- begin
- dec(t, HealthTagTex^.h + 2);
- DrawCentered(ox, t, HealthTagTex)
- end;
- if (cTagsMask and htName) <> 0 then
- begin
- dec(t, NameTagTex^.h + 2);
- DrawCentered(ox, t, NameTagTex)
- end;
- if (cTagsMask and htTeamName) <> 0 then
- begin
- dec(t, Team^.NameTagTex^.h + 2);
- DrawCentered(ox, t, Team^.NameTagTex)
- end;
- if (cTagsMask and htTransparent) <> 0 then
- Tint($FF, $FF, $FF, $FF)
- end;
- if (Gear^.State and gstHHDriven) <> 0 then // Current hedgehog
- begin
- if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then
- DrawSprite(sprFinger, ox - 16, oy - 64,
- GameTicks div 32 mod 16);
-
- if (Gear^.State and gstDrowning) = 0 then
- if (Gear^.State and gstHHThinking) <> 0 then
- DrawSprite(sprQuestion, ox - 10, oy - cHHRadius - 34, (RealTicks shr 9) mod 8)
- end
- end;
-
-if HH^.Effects[hePoisoned] then
- begin
- Tint($00, $FF, $40, $80);
- DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 1.5, 0, 0, sx, sy, 0, 1, 22, 22, 360 - (RealTicks shr 37) mod 360);
- end;
-if HH^.Effects[heResurrected] then
- begin
- Tint($f5, $db, $35, $20);
- DrawSprite(sprVampiric, sx - 24, sy - 24, 0);
- end;
-
-if Gear^.Invulnerable then
- begin
- Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - ((RealTicks div 2 + Gear^.uid * 491) mod 1500) / 750))));
- DrawSprite(sprInvulnerable, sx - 24, sy - 24, 0);
- end;
-if cVampiric and
- (CurrentHedgehog^.Gear <> nil) and
- (CurrentHedgehog^.Gear = Gear) then
- begin
- Tint($FF, 0, 0, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750))));
- DrawSprite(sprVampiric, sx - 24, sy - 24, 0);
- end;
- Tint($FF, $FF, $FF, $FF)
-end;
-
-procedure DrawGears;
-var Gear, HHGear: PGear;
- i: Longword;
- x, y, startX, endX, startY, endY: LongInt;
-begin
-Gear:= GearsList;
-while Gear<>nil do
- begin
- x:= hwRound(Gear^.X) + WorldDx;
- y:= hwRound(Gear^.Y) + WorldDy;
- case Gear^.Kind of
- gtBomb: DrawRotated(sprBomb, x, y, 0, Gear^.DirAngle);
- gtGasBomb: DrawRotated(sprCheese, x, y, 0, Gear^.DirAngle);
- gtMolotov: DrawRotated(sprMolotov, x, y, 0, Gear^.DirAngle);
-
- gtRCPlane: begin
- if (Gear^.Tag = -1) then
- DrawRotated(sprPlane, x, y, -1, DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
- else
- DrawRotated(sprPlane, x, y,0,DxDy2Angle(Gear^.dY, Gear^.dX));
- if ((TrainingFlags and tfRCPlane) <> 0) and (TrainingTargetGear <> nil) and ((Gear^.State and gstDrowning) = 0) then
- DrawRotatedf(sprFinger, x, y, GameTicks div 32 mod 16, 0, DxDy2Angle(Gear^.X - TrainingTargetGear^.X, TrainingTargetGear^.Y - Gear^.Y));
- end;
- gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle);
-
- gtPortal: if ((Gear^.Tag and 1) = 0) // still moving?
- or (Gear^.IntersectGear = nil) or (Gear^.IntersectGear^.IntersectGear <> Gear) // not linked&backlinked?
- or ((Gear^.IntersectGear^.Tag and 1) = 0) then // linked portal still moving?
- DrawRotatedf(sprPortal, x, y, Gear^.Tag, hwSign(Gear^.dX), Gear^.DirAngle)
- else DrawRotatedf(sprPortal, x, y, 4 + Gear^.Tag div 2, hwSign(Gear^.dX), Gear^.DirAngle);
-
- gtDrill: if (Gear^.State and gsttmpFlag) <> 0 then
- DrawRotated(sprAirDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX))
- else
- DrawRotated(sprDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
-
- gtHedgehog: DrawHH(Gear, x, y);
-
- gtShell: DrawRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
-
- gtGrave: begin
- DrawTextureF(PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32);
- if Gear^.Health > 0 then
- begin
- //Tint($33, $33, $FF, max($40, floor($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750))));
- Tint($f5, $db, $35, max($40, floor($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health)))));
- //Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750))));
- DrawSprite(sprVampiric, x - 24, y - 24, 0);
- Tint($FF, $FF, $FF, $FF)
- end
- end;
- gtBee: DrawRotatedF(sprBee, x, y, (GameTicks shr 5) mod 2, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
- gtPickHammer: DrawSprite(sprPHammer, x - 16, y - 50 + LongInt(((GameTicks shr 5) and 1) * 2), 0);
- gtRope: DrawRope(Gear);
- gtMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then
- DrawRotated(sprMineOff, x, y, 0, Gear^.DirAngle)
- else if Gear^.Health <> 0 then DrawRotated(sprMineOn, x, y, 0, Gear^.DirAngle)
- else DrawRotated(sprMineDead, x, y, 0, Gear^.DirAngle);
- gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then
- DrawRotated(sprSMineOff, x, y, 0, Gear^.DirAngle)
- else if Gear^.Health <> 0 then DrawRotated(sprSMineOn, x, y, 0, Gear^.DirAngle)
- else DrawRotated(sprMineDead, x, y, 0, Gear^.DirAngle);
- gtCase: case Gear^.Pos of
- posCaseAmmo : begin
- i:= (GameTicks shr 6) mod 64;
- if i > 18 then i:= 0;
- DrawSprite(sprCase, x - 24, y - 24, i);
- end;
- posCaseHealth: begin
- i:= ((GameTicks shr 6) + 38) mod 64;
- if i > 13 then i:= 0;
- DrawSprite(sprFAid, x - 24, y - 24, i);
- end;
- posCaseUtility: begin
- i:= (GameTicks shr 6) mod 70;
- if i > 23 then i:= 0;
- i:= i mod 12;
- DrawSprite(sprUtility, x - 24, y - 24, i);
- end;
- end;
- gtExplosives: begin
- if ((Gear^.State and gstDrowning) <> 0) then
- DrawSprite(sprExplosivesRoll, x - 24, y - 24, 0)
- else if Gear^.State and gstAnimation = 0 then
- begin
- i:= (GameTicks shr 6 + Gear^.uid*3) mod 64;
- if i > 18 then i:= 0;
- DrawSprite(sprExplosives, x - 24, y - 24, i)
- end
- else if Gear^.State and gsttmpFlag = 0 then
- DrawRotatedF(sprExplosivesRoll, x, y + 4, 0, 0, Gear^.DirAngle)
- else
- DrawRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle);
- end;
- gtDynamite: DrawSprite2(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1);
- gtClusterBomb: DrawRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle);
- gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0);
- gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16);
- gtParachute: begin
- DrawSprite(sprParachute, x - 24, y - 48, 0);
- DrawAltWeapon(Gear, x + 1, y - 3)
- end;
- gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 0)
- else DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 1);
- gtAirBomb: DrawRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
- gtTeleport: begin
- HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear;
- if not PHedgehog(Gear^.Hedgehog)^.Unplaced then DrawRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0);
- DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0);
- end;
- gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12);
- gtTarget: begin
- Tint($FF, $FF, $FF, floor($FF * Gear^.Timer / 1000));
- DrawSprite(sprTarget, x - 16, y - 16, 0);
- Tint($FF, $FF, $FF, $FF);
- end;
- gtMortar: DrawRotated(sprMortar, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
- gtCake: if Gear^.Pos = 6 then
- DrawRotatedf(sprCakeWalk, x, y, (GameTicks div 40) mod 6, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90)
- else
- DrawRotatedf(sprCakeDown, x, y, 5 - Gear^.Pos, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90);
- gtSeduction: if Gear^.Pos >= 14 then DrawSprite(sprSeduction, x - 16, y - 16, 0);
- gtWatermelon: DrawRotatedf(sprWatermelon, x, y, 0, 0, Gear^.DirAngle);
- gtMelonPiece: DrawRotatedf(sprWatermelon, x, y, 1, 0, Gear^.DirAngle);
- gtHellishBomb: DrawRotated(sprHellishBomb, x, y, 0, Gear^.DirAngle);
- gtBirdy: begin
- if Gear^.State and gstAnimation = gstAnimation then
- begin
- if Gear^.State and gstTmpFlag = 0 then // Appearing
- begin
- endX:= x - WorldDx;
- endY:= y - WorldDy;
- if Gear^.Tag < 0 then
- startX:= max(LAND_WIDTH + 1024, endX + 2048)
- else
- startX:= max(-LAND_WIDTH - 1024, endX - 2048);
- startY:= endY - 256;
- DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + floor((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1)), startY + WorldDy + floor((endY - startY) * sqrt(1 - power((LongInt(Gear^.Timer)/2000)-1, 2))), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75);
- end
- else // Disappearing
- begin
- startX:= x - WorldDx;
- startY:= y - WorldDy;
- if Gear^.Tag > 0 then
- endX:= max(LAND_WIDTH + 1024, startX + 2048)
- else
- endX:= max(-LAND_WIDTH - 1024, startX - 2048);
- endY:= startY + 256;
- DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + floor((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + floor((endY - startY) * cos(LongInt(Gear^.Timer)/2000 * (Pi/2)) - (endY - startY)) + hwRound(Gear^.dY * Gear^.Timer), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75);
- end;
- end
- else
- DrawTextureF(SpritesData[sprBirdy].Texture, 1, x, y, ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75);
- end;
- gtEgg: DrawRotatedTextureF(SpritesData[sprEgg].Texture, 1, 0, 0, x, y, 0, 1, 16, 16, Gear^.DirAngle);
- gtPiano: begin
- if (Gear^.State and gstDrowning) = 0 then
- begin
- Tint($FF, $FF, $FF, $10);
- for i:= 8 downto 1 do
- DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, x, y - hwRound(Gear^.dY * 4 * i), 0, 1, 128, 128, 0);
- Tint($FF, $FF, $FF, $FF)
- end;
- DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, x, y, 0, 1, 128, 128, 0);
- end;
- gtPoisonCloud: begin
- if Gear^.Timer < 1020 then
- Tint($C0, $C0, $00, Gear^.Timer div 8)
- else if Gear^.Timer > 3980 then
- Tint($C0, $C0, $00, (5000 - Gear^.Timer) div 8)
- else
- Tint($C0, $C0, $00, $C0);
- DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360);
- Tint($FF, $FF, $FF, $FF)
- end;
- gtResurrector: begin
- DrawRotated(sprCross, x, y, 0, 0);
- Tint($f5, $db, $35, max($00, floor($C0 * abs(1 - (GameTicks mod 6000) / 3000))));
- DrawTexture(x - 108, y - 108, SpritesData[sprVampiric].Texture, 4.5);
- Tint($FF, $FF, $FF, $FF);
- end;
- gtNapalmBomb: DrawRotated(sprNapalmBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
- end;
- if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(x + 8, y + 8, Gear^.Tex);
- Gear:= Gear^.NextGear
- end;
-end;
--- a/hedgewars/HHHandlers.inc Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/HHHandlers.inc Tue Nov 30 22:46:47 2010 +0100
@@ -48,7 +48,7 @@
ChangeAmmo:= false;
slot:= Gear^.MsgParam;
-with PHedgehog(Gear^.Hedgehog)^ do
+with Gear^.Hedgehog^ do
begin
Gear^.Message:= Gear^.Message and not gmSlot;
ammoidx:= 0;
@@ -60,7 +60,7 @@
while (ammoidx < cMaxSlotAmmoIndex) and (Ammo^[slot, ammoidx].AmmoType <> CurAmmoType) do inc(ammoidx);
- if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) and (MultiShootAttacks > 0) then OnUsedAmmo(PHedgehog(Gear^.Hedgehog)^);
+ if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) and (MultiShootAttacks > 0) then OnUsedAmmo(Gear^.Hedgehog^);
MultiShootAttacks:= 0;
Gear^.Message:= Gear^.Message and not (gmLJump or gmHJump);
@@ -101,7 +101,7 @@
s: boolean;
begin
weap:= TAmmoType(Gear^.MsgParam);
-Hedgehog:= PHedgehog(Gear^.Hedgehog);
+Hedgehog:= Gear^.Hedgehog;
if Hedgehog^.Team^.Clan^.TurnNumber <= Ammoz[weap].SkipTurns then exit; // weapon is not activated yet
@@ -118,15 +118,15 @@
dec(t)
end;
-if s then ApplyAmmoChanges(PHedgehog(Gear^.Hedgehog)^)
+if s then ApplyAmmoChanges(Gear^.Hedgehog^)
end;
procedure HHSetTimer(Gear: PGear);
var CurWeapon: PAmmo;
begin
Gear^.Message:= Gear^.Message and not gmTimer;
-CurWeapon:= GetAmmoEntry(PHedgehog(Gear^.Hedgehog)^);
-with PHedgehog(Gear^.Hedgehog)^ do
+CurWeapon:= GetAmmoEntry(Gear^.Hedgehog^);
+with Gear^.Hedgehog^ do
if (CurWeapon^.Propz and ammoprop_Timerable) <> 0 then
begin
CurWeapon^.Timer:= 1000 * Gear^.MsgParam;
@@ -143,9 +143,9 @@
altUse: boolean;
begin
bShowFinger:= false;
-CurWeapon:= GetAmmoEntry(PHedgehog(Gear^.Hedgehog)^);
+CurWeapon:= GetAmmoEntry(Gear^.Hedgehog^);
with Gear^,
- PHedgehog(Gear^.Hedgehog)^ do
+ Gear^.Hedgehog^ do
begin
if ((State and gstHHDriven) <> 0)and
((State and (gstAttacked or gstHHChooseTarget)) = 0) and
@@ -386,7 +386,7 @@
const frametime = 200;
timertime = frametime * 6;
begin
-if PHedgehog(Gear^.Hedgehog)^.Unplaced then exit;
+if Gear^.Hedgehog^.Unplaced then exit;
if Gear^.Timer > 1 then
begin
AllInactive:= false;
@@ -406,7 +406,7 @@
Gear^.Z:= cCurrHHZ;
RemoveGearFromList(Gear);
InsertGearToList(Gear);
- PlaySound(sndByeBye, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
+ PlaySound(sndByeBye, Gear^.Hedgehog^.Team^.voicepack);
Gear^.Pos:= 0;
Gear^.Timer:= timertime
end
@@ -417,7 +417,7 @@
const frametime = 65;
timertime = frametime * 11;
begin
-if PHedgehog(Gear^.Hedgehog)^.Unplaced then exit;
+if Gear^.Hedgehog^.Unplaced then exit;
if Gear^.Timer > 1 then
begin
AllInactive:= false;
@@ -434,7 +434,7 @@
Gear^.Z:= cCurrHHZ;
RemoveGearFromList(Gear);
InsertGearToList(Gear);
- PlaySound(sndByeBye, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
+ PlaySound(sndByeBye, Gear^.Hedgehog^.Team^.voicepack);
PlaySound(sndWarp);
Gear^.Pos:= 0;
Gear^.Timer:= timertime
@@ -454,16 +454,16 @@
posCaseUtility,
posCaseAmmo: begin
a:= Gear^.AmmoType;
- AddAmmo(PHedgehog(HH^.Hedgehog)^, a);
+ AddAmmo(HH^.Hedgehog^, a);
// Possibly needs to check shared clan ammo game flag once added.
// On the other hand, no obvious reason that clan members shouldn't know what ammo another clan member picked up
- if (not (PHedgehog(HH^.Hedgehog)^.Team^.ExtDriven
- or (PHedgehog(HH^.Hedgehog)^.BotLevel > 0)))
- or (PHedgehog(HH^.Hedgehog)^.Team^.Clan^.ClanIndex = LocalClan)
+ if (not (HH^.Hedgehog^.Team^.ExtDriven
+ or (HH^.Hedgehog^.BotLevel > 0)))
+ or (HH^.Hedgehog^.Team^.Clan^.ClanIndex = LocalClan)
or (GameType = gmtDemo) then
begin
s:= trammo[Ammoz[a].NameId] + ' (+' + IntToStr(Ammoz[a].NumberInCase) + ')';
- AddCaption(s, PHedgehog(HH^.Hedgehog)^.Team^.Clan^.Color, capgrpAmmoinfo);
+ AddCaption(s, HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo);
// show ammo icon
vga:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtAmmo);
@@ -474,12 +474,12 @@
end;
posCaseHealth: begin
inc(HH^.Health, Gear^.Health);
- PHedgehog(HH^.Hedgehog)^.Effects[hePoisoned] := false;
+ HH^.Hedgehog^.Effects[hePoisoned] := false;
str(Gear^.Health, s);
s:= '+' + s;
- AddCaption(s, PHedgehog(HH^.Hedgehog)^.Team^.Clan^.Color, capgrpAmmoinfo);
- RenderHealth(PHedgehog(HH^.Hedgehog)^);
- RecountTeamHealth(PHedgehog(HH^.Hedgehog)^.Team);
+ AddCaption(s, HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo);
+ RenderHealth(HH^.Hedgehog^);
+ RecountTeamHealth(HH^.Hedgehog^.Team);
i:= 0;
while i < Gear^.Health do
@@ -497,11 +497,11 @@
var PrevdX: LongInt;
CurWeapon: PAmmo;
begin
-CurWeapon:= GetAmmoEntry(PHedgehog(Gear^.Hedgehog)^);
+CurWeapon:= GetAmmoEntry(Gear^.Hedgehog^);
if ((Gear^.State and (gstAttacking or gstMoving)) = 0) then
begin
if isCursorVisible then
- with PHedgehog(Gear^.Hedgehog)^ do
+ with Gear^.Hedgehog^ do
with CurWeapon^ do
begin
if (Gear^.Message and gmLeft ) <> 0 then
@@ -536,7 +536,7 @@
Gear^.dY:= -_0_15;
if not cArtillery then Gear^.dX:= SignAs(_0_15, Gear^.dX);
Gear^.State:= Gear^.State or gstMoving or gstHHJumping;
- PlaySound(sndJump1, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
+ PlaySound(sndJump1, Gear^.Hedgehog^.Team^.voicepack);
exit
end;
end;
@@ -549,7 +549,7 @@
Gear^.dY:= -_0_2;
SetLittle(Gear^.dX);
Gear^.State:= Gear^.State or gstMoving or gstHHJumping;
- PlaySound(sndJump3, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
+ PlaySound(sndJump3, Gear^.Hedgehog^.Team^.voicepack);
exit
end;
@@ -570,7 +570,7 @@
end;
DeleteCI(Gear); // must be after exit!! (see previous line)
- PHedgehog(Gear^.Hedgehog)^.visStepPos:= (PHedgehog(Gear^.Hedgehog)^.visStepPos + 1) and 7;
+ Gear^.Hedgehog^.visStepPos:= (Gear^.Hedgehog^.visStepPos + 1) and 7;
if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then
begin
if not (TestCollisionXwithXYShift(Gear, _0, -6, hwSign(Gear^.dX))
@@ -630,7 +630,7 @@
procedure HedgehogChAngle(Gear: PGear);
var da: LongWord;
begin
-with PHedgehog(Gear^.Hedgehog)^ do
+with Gear^.Hedgehog^ do
if (CurAmmoType = amRope)
and ((Gear^.State and (gstMoving or gstHHJumping)) = gstMoving) then da:= 2 else da:= 1;
@@ -649,7 +649,7 @@
if Gear^.dX.QWordValue > 8160437862 then Gear^.dX.QWordValue:= 8160437862;
if Gear^.dY.QWordValue > 8160437862 then Gear^.dY.QWordValue:= 8160437862;
-if PHedgehog(Gear^.Hedgehog)^.Unplaced then
+if Gear^.Hedgehog^.Unplaced then
begin
Gear^.dY:= _0;
Gear^.dX:= _0;
@@ -773,7 +773,7 @@
wasJumping: boolean;
Hedgehog: PHedgehog;
begin
-Hedgehog:= PHedgehog(Gear^.Hedgehog);
+Hedgehog:= Gear^.Hedgehog;
if not isInMultiShoot then
AllInactive:= false
else
@@ -919,16 +919,16 @@
PrvInactive:= false;
AllInactive:= false;
- if not PHedgehog(Gear^.Hedgehog)^.Team^.hasGone then
+ if not Gear^.Hedgehog^.Team^.hasGone then
begin
- PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] := false;
- if PHedgehog(Gear^.Hedgehog)^.Effects[heResurrectable] then begin
+ Gear^.Hedgehog^.Effects[hePoisoned] := false;
+ if Gear^.Hedgehog^.Effects[heResurrectable] then begin
ResurrectHedgehog(Gear);
end else begin
Gear^.State:= Gear^.State or gstHHDeath;
Gear^.doStep:= @doStepHedgehogDead;
// Death message
- AddCaption(Format(GetEventString(eidDied), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage);
+ AddCaption(Format(GetEventString(eidDied), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage);
end;
end
else
@@ -936,7 +936,7 @@
Gear^.State:= Gear^.State or gstHHGone;
Gear^.doStep:= @doStepHedgehogGone;
// Gone message
- AddCaption(Format(GetEventString(eidGone), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage);
+ AddCaption(Format(GetEventString(eidGone), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage);
end
end;
exit
@@ -974,7 +974,7 @@
doStepHedgehogFree(Gear)
else
begin
- with PHedgehog(Gear^.Hedgehog)^ do
+ with Gear^.Hedgehog^ do
if Team^.hasGone then TeamGoneEffect(Team^);
doStepHedgehogDriven(Gear)
end;
--- a/hedgewars/SDLh.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/SDLh.pas Tue Nov 30 22:46:47 2010 +0100
@@ -774,7 +774,7 @@
function TTF_Init: LongInt; cdecl; external SDL_TTFLibName;
procedure TTF_Quit; cdecl; external SDL_TTFLibName;
-function TTF_SizeUTF8(font: PTTF_Font; const text: PChar; var w, h: LongInt): LongInt; cdecl; external SDL_TTFLibName;
+function TTF_SizeUTF8(font: PTTF_Font; const text: PChar; out w, h: LongInt): LongInt; cdecl; external SDL_TTFLibName;
function TTF_RenderUTF8_Solid(font: PTTF_Font; const text: PChar; fg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName;
function TTF_RenderUTF8_Blended(font: PTTF_Font; const text: PChar; fg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName;
--- a/hedgewars/SinTable.inc Mon Nov 29 09:11:31 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1045 +0,0 @@
-(*
- * Hedgewars, a free turn based strategy game
- * Copyright (c) 2007 Andrey Korotaev <unC0Rr@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *)
-
-const SinTable: array[0..1024] of QWord = (
- $00000000,
- $006487EB,
- $00C90FC6,
- $012D9782,
- $01921F10,
- $01F6A660,
- $025B2D62,
- $02BFB407,
- $03243A40,
- $0388BFFC,
- $03ED452D,
- $0451C9C3,
- $04B64DAF,
- $051AD0E0,
- $057F5348,
- $05E3D4D7,
- $0648557E,
- $06ACD52C,
- $071153D3,
- $0775D163,
- $07DA4DCC,
- $083EC900,
- $08A342EE,
- $0907BB86,
- $096C32BB,
- $09D0A87B,
- $0A351CB8,
- $0A998F62,
- $0AFE0069,
- $0B626FBF,
- $0BC6DD53,
- $0C2B4916,
- $0C8FB2F9,
- $0CF41AEB,
- $0D5880DF,
- $0DBCE4C3,
- $0E214689,
- $0E85A622,
- $0EEA037D,
- $0F4E5E8B,
- $0FB2B73D,
- $10170D83,
- $107B614E,
- $10DFB28F,
- $11440135,
- $11A84D31,
- $120C9675,
- $1270DCF0,
- $12D52093,
- $1339614E,
- $139D9F13,
- $1401D9D1,
- $14661179,
- $14CA45FC,
- $152E774A,
- $1592A554,
- $15F6D00B,
- $165AF75E,
- $16BF1B3E,
- $17233B9D,
- $1787586A,
- $17EB7197,
- $184F8713,
- $18B398CF,
- $1917A6BC,
- $197BB0CB,
- $19DFB6EB,
- $1A43B90E,
- $1AA7B724,
- $1B0BB11E,
- $1B6FA6EC,
- $1BD3987F,
- $1C3785C8,
- $1C9B6EB6,
- $1CFF533B,
- $1D633348,
- $1DC70ECC,
- $1E2AE5B8,
- $1E8EB7FE,
- $1EF2858D,
- $1F564E57,
- $1FBA124B,
- $201DD15B,
- $20818B77,
- $20E5408F,
- $2148F095,
- $21AC9B79,
- $2210412C,
- $2273E19E,
- $22D77CBF,
- $233B1281,
- $239EA2D5,
- $24022DAA,
- $2465B2F1,
- $24C9329C,
- $252CAC9A,
- $259020DD,
- $25F38F55,
- $2656F7F3,
- $26BA5AA7,
- $271DB762,
- $27810E14,
- $27E45EB0,
- $2847A924,
- $28AAED62,
- $290E2B5B,
- $297162FF,
- $29D4943F,
- $2A37BF0B,
- $2A9AE355,
- $2AFE010D,
- $2B611823,
- $2BC42889,
- $2C27322F,
- $2C8A3506,
- $2CED30FF,
- $2D50260A,
- $2DB31418,
- $2E15FB1A,
- $2E78DB01,
- $2EDBB3BD,
- $2F3E853F,
- $2FA14F78,
- $30041258,
- $3066CDD1,
- $30C981D3,
- $312C2E50,
- $318ED336,
- $31F17079,
- $32540608,
- $32B693D3,
- $331919CD,
- $337B97E6,
- $33DE0E0E,
- $34407C36,
- $34A2E250,
- $3505404B,
- $3567961A,
- $35C9E3AC,
- $362C28F3,
- $368E65DE,
- $36F09A61,
- $3752C66A,
- $37B4E9EB,
- $381704D5,
- $38791719,
- $38DB20A7,
- $393D2170,
- $399F1966,
- $3A010879,
- $3A62EE9A,
- $3AC4CBBA,
- $3B269FCB,
- $3B886ABB,
- $3BEA2C7E,
- $3C4BE503,
- $3CAD943C,
- $3D0F3A1A,
- $3D70D68C,
- $3DD26986,
- $3E33F2F6,
- $3E9572CF,
- $3EF6E901,
- $3F58557E,
- $3FB9B836,
- $401B111A,
- $407C601B,
- $40DDA52A,
- $413EE039,
- $41A01138,
- $42013818,
- $426254CA,
- $42C3673F,
- $43246F69,
- $43856D38,
- $43E6609E,
- $4447498B,
- $44A827F0,
- $4508FBBF,
- $4569C4E9,
- $45CA835E,
- $462B3710,
- $468BDFF0,
- $46EC7DEE,
- $474D10FD,
- $47AD990D,
- $480E160F,
- $486E87F5,
- $48CEEEAF,
- $492F4A2F,
- $498F9A65,
- $49EFDF44,
- $4A5018BB,
- $4AB046BD,
- $4B10693A,
- $4B708024,
- $4BD08B6C,
- $4C308B02,
- $4C907ED9,
- $4CF066E1,
- $4D50430C,
- $4DB0134A,
- $4E0FD78D,
- $4E6F8FC7,
- $4ECF3BE8,
- $4F2EDBE2,
- $4F8E6FA6,
- $4FEDF725,
- $504D7250,
- $50ACE11A,
- $510C4372,
- $516B994B,
- $51CAE295,
- $522A1F43,
- $52894F44,
- $52E8728C,
- $5347890A,
- $53A692B0,
- $54058F70,
- $54647F3B,
- $54C36203,
- $552237B8,
- $5581004C,
- $55DFBBB0,
- $563E69D7,
- $569D0AB0,
- $56FB9E2E,
- $575A2443,
- $57B89CDE,
- $581707F3,
- $58756572,
- $58D3B54D,
- $5931F775,
- $59902BDC,
- $59EE5273,
- $5A4C6B2B,
- $5AAA75F7,
- $5B0872C8,
- $5B66618E,
- $5BC4423C,
- $5C2214C4,
- $5C7FD916,
- $5CDD8F25,
- $5D3B36E1,
- $5D98D03D,
- $5DF65B29,
- $5E53D798,
- $5EB1457C,
- $5F0EA4C4,
- $5F6BF565,
- $5FC9374E,
- $60266A71,
- $60838EC1,
- $60E0A42F,
- $613DAAAC,
- $619AA22A,
- $61F78A9B,
- $625463F0,
- $62B12E1B,
- $630DE90E,
- $636A94BB,
- $63C73113,
- $6423BE08,
- $64803B8B,
- $64DCA98F,
- $65390805,
- $659556DF,
- $65F1960E,
- $664DC585,
- $66A9E535,
- $6705F510,
- $6761F508,
- $67BDE50F,
- $6819C516,
- $6875950F,
- $68D154EC,
- $692D049F,
- $6988A41B,
- $69E4334F,
- $6A3FB230,
- $6A9B20AE,
- $6AF67EBB,
- $6B51CC49,
- $6BAD094B,
- $6C0835B2,
- $6C635170,
- $6CBE5C77,
- $6D1956B9,
- $6D744028,
- $6DCF18B5,
- $6E29E054,
- $6E8496F6,
- $6EDF3C8C,
- $6F39D10A,
- $6F945460,
- $6FEEC681,
- $70492760,
- $70A376EE,
- $70FDB51D,
- $7157E1DF,
- $71B1FD26,
- $720C06E5,
- $7265FF0E,
- $72BFE593,
- $7319BA65,
- $73737D77,
- $73CD2EBC,
- $7426CE24,
- $74805BA4,
- $74D9D72C,
- $753340AF,
- $758C981F,
- $75E5DD6E,
- $763F108F,
- $76983174,
- $76F1400F,
- $774A3C52,
- $77A32630,
- $77FBFD9B,
- $7854C285,
- $78AD74E0,
- $7906149F,
- $795EA1B5,
- $79B71C13,
- $7A0F83AC,
- $7A67D872,
- $7AC01A58,
- $7B184950,
- $7B70654C,
- $7BC86E3F,
- $7C20641B,
- $7C7846D3,
- $7CD01659,
- $7D27D2A0,
- $7D7F7B99,
- $7DD71139,
- $7E2E9370,
- $7E860232,
- $7EDD5D71,
- $7F34A51F,
- $7F8BD930,
- $7FE2F995,
- $803A0641,
- $8090FF28,
- $80E7E43A,
- $813EB56C,
- $819572AF,
- $81EC1BF7,
- $8242B135,
- $8299325D,
- $82EF9F62,
- $8345F835,
- $839C3CC9,
- $83F26D12,
- $84488902,
- $849E908B,
- $84F483A1,
- $854A6236,
- $85A02C3C,
- $85F5E1A8,
- $864B826B,
- $86A10E78,
- $86F685C2,
- $874BE83C,
- $87A135D9,
- $87F66E8C,
- $884B9247,
- $88A0A0FD,
- $88F59AA1,
- $894A7F26,
- $899F4E7F,
- $89F408A0,
- $8A48AD7A,
- $8A9D3D00,
- $8AF1B727,
- $8B461BE0,
- $8B9A6B1F,
- $8BEEA4D7,
- $8C42C8FA,
- $8C96D77C,
- $8CEAD050,
- $8D3EB368,
- $8D9280B9,
- $8DE63834,
- $8E39D9CD,
- $8E8D6578,
- $8EE0DB27,
- $8F343ACD,
- $8F87845E,
- $8FDAB7CC,
- $902DD50C,
- $9080DC0F,
- $90D3CCCA,
- $9126A72F,
- $91796B31,
- $91CC18C5,
- $921EAFDD,
- $9271306C,
- $92C39A66,
- $9315EDBE,
- $93682A67,
- $93BA5055,
- $940C5F7A,
- $945E57CB,
- $94B0393B,
- $950203BD,
- $9553B744,
- $95A553C4,
- $95F6D930,
- $9648477C,
- $96999E9A,
- $96EADE80,
- $973C071F,
- $978D186C,
- $97DE125A,
- $982EF4DD,
- $987FBFE7,
- $98D0736D,
- $99210F62,
- $997193BA,
- $99C20068,
- $9A125560,
- $9A629296,
- $9AB2B7FD,
- $9B02C588,
- $9B52BB2C,
- $9BA298DC,
- $9BF25E8C,
- $9C420C2F,
- $9C91A1B9,
- $9CE11F1F,
- $9D308453,
- $9D7FD149,
- $9DCF05F6,
- $9E1E224C,
- $9E6D2640,
- $9EBC11C6,
- $9F0AE4D1,
- $9F599F56,
- $9FA84148,
- $9FF6CA9A,
- $A0453B42,
- $A0939332,
- $A0E1D25F,
- $A12FF8BC,
- $A17E063F,
- $A1CBFAD9,
- $A219D681,
- $A2679928,
- $A2B542C5,
- $A302D349,
- $A3504AAB,
- $A39DA8DD,
- $A3EAEDD3,
- $A4381983,
- $A4852BDF,
- $A4D224DD,
- $A51F046F,
- $A56BCA8B,
- $A5B87724,
- $A6050A2F,
- $A65183A0,
- $A69DE36B,
- $A6EA2984,
- $A73655DF,
- $A7826871,
- $A7CE612E,
- $A81A400B,
- $A86604FB,
- $A8B1AFF3,
- $A8FD40E7,
- $A948B7CB,
- $A9941495,
- $A9DF5738,
- $AA2A7FA9,
- $AA758DDB,
- $AAC081C5,
- $AB0B5B59,
- $AB561A8D,
- $ABA0BF54,
- $ABEB49A4,
- $AC35B971,
- $AC800EB0,
- $ACCA4954,
- $AD146953,
- $AD5E6EA1,
- $ADA85932,
- $ADF228FC,
- $AE3BDDF3,
- $AE85780B,
- $AECEF73A,
- $AF185B73,
- $AF61A4AC,
- $AFAAD2D9,
- $AFF3E5EF,
- $B03CDDE3,
- $B085BAA9,
- $B0CE7C36,
- $B117227F,
- $B15FAD79,
- $B1A81D19,
- $B1F07153,
- $B238AA1C,
- $B280C769,
- $B2C8C930,
- $B310AF64,
- $B35879FB,
- $B3A028E9,
- $B3E7BC25,
- $B42F33A1,
- $B4768F55,
- $B4BDCF34,
- $B504F334,
- $B54BFB49,
- $B592E769,
- $B5D9B789,
- $B6206B9E,
- $B667039D,
- $B6AD7F7A,
- $B6F3DF2C,
- $B73A22A7,
- $B78049E1,
- $B7C654CE,
- $B80C4364,
- $B8521599,
- $B897CB60,
- $B8DD64B0,
- $B922E17E,
- $B96841BF,
- $B9AD8569,
- $B9F2AC70,
- $BA37B6CB,
- $BA7CA46D,
- $BAC1754E,
- $BB062962,
- $BB4AC09E,
- $BB8F3AF8,
- $BBD39866,
- $BC17D8DD,
- $BC5BFC52,
- $BCA002BA,
- $BCE3EC0D,
- $BD27B83E,
- $BD6B6744,
- $BDAEF913,
- $BDF26DA3,
- $BE35C4E7,
- $BE78FED6,
- $BEBC1B66,
- $BEFF1A8C,
- $BF41FC3E,
- $BF84C071,
- $BFC7671B,
- $C009F032,
- $C04C5BAB,
- $C08EA97D,
- $C0D0D99E,
- $C112EC02,
- $C154E0A0,
- $C196B76D,
- $C1D87060,
- $C21A0B6E,
- $C25B888D,
- $C29CE7B4,
- $C2DE28D7,
- $C31F4BEE,
- $C36050ED,
- $C3A137CB,
- $C3E2007E,
- $C422AAFC,
- $C463373A,
- $C4A3A530,
- $C4E3F4D2,
- $C5242618,
- $C56438F7,
- $C5A42D65,
- $C5E40359,
- $C623BAC8,
- $C66353A9,
- $C6A2CDF2,
- $C6E22999,
- $C7216694,
- $C76084DA,
- $C79F8461,
- $C7DE651F,
- $C81D270B,
- $C85BCA1B,
- $C89A4E44,
- $C8D8B37F,
- $C916F9C0,
- $C95520FE,
- $C9932930,
- $C9D1124D,
- $CA0EDC49,
- $CA4C871D,
- $CA8A12BF,
- $CAC77F24,
- $CB04CC45,
- $CB41FA16,
- $CB7F088F,
- $CBBBF7A6,
- $CBF8C752,
- $CC35778A,
- $CC720844,
- $CCAE7977,
- $CCEACB19,
- $CD26FD21,
- $CD630F87,
- $CD9F0240,
- $CDDAD543,
- $CE168888,
- $CE521C04,
- $CE8D8FAF,
- $CEC8E380,
- $CF04176E,
- $CF3F2B6E,
- $CF7A1F79,
- $CFB4F385,
- $CFEFA78A,
- $D02A3B7D,
- $D064AF56,
- $D09F030C,
- $D0D93696,
- $D11349EB,
- $D14D3D02,
- $D1870FD2,
- $D1C0C253,
- $D1FA547A,
- $D233C641,
- $D26D179C,
- $D2A64885,
- $D2DF58F1,
- $D31848D8,
- $D3511832,
- $D389C6F5,
- $D3C25519,
- $D3FAC295,
- $D4330F60,
- $D46B3B73,
- $D4A346C3,
- $D4DB3148,
- $D512FAFB,
- $D54AA3D1,
- $D5822BC4,
- $D5B992C9,
- $D5F0D8D8,
- $D627FDEA,
- $D65F01F5,
- $D695E4F1,
- $D6CCA6D6,
- $D703479A,
- $D739C736,
- $D77025A2,
- $D7A662D4,
- $D7DC7EC5,
- $D812796C,
- $D84852C1,
- $D87E0ABB,
- $D8B3A152,
- $D8E9167F,
- $D91E6A38,
- $D9539C76,
- $D988AD30,
- $D9BD9C5E,
- $D9F269F8,
- $DA2715F5,
- $DA5BA04F,
- $DA9008FC,
- $DAC44FF5,
- $DAF87531,
- $DB2C78A8,
- $DB605A53,
- $DB941A29,
- $DBC7B822,
- $DBFB3437,
- $DC2E8E60,
- $DC61C694,
- $DC94DCCB,
- $DCC7D0FF,
- $DCFAA326,
- $DD2D533A,
- $DD5FE131,
- $DD924D06,
- $DDC496AF,
- $DDF6BE25,
- $DE28C360,
- $DE5AA658,
- $DE8C6707,
- $DEBE0563,
- $DEEF8167,
- $DF20DB09,
- $DF521242,
- $DF83270B,
- $DFB4195C,
- $DFE4E92D,
- $E0159678,
- $E0462134,
- $E076895A,
- $E0A6CEE2,
- $E0D6F1C6,
- $E106F1FD,
- $E136CF81,
- $E1668A4A,
- $E1962250,
- $E1C5978C,
- $E1F4E9F7,
- $E224198A,
- $E253263D,
- $E2821009,
- $E2B0D6E7,
- $E2DF7AD0,
- $E30DFBBC,
- $E33C59A4,
- $E36A9482,
- $E398AC4D,
- $E3C6A0FF,
- $E3F47291,
- $E42220FC,
- $E44FAC38,
- $E47D143F,
- $E4AA590A,
- $E4D77A91,
- $E50478CE,
- $E53153B9,
- $E55E0B4D,
- $E58A9F81,
- $E5B71050,
- $E5E35DB2,
- $E60F87A0,
- $E63B8E14,
- $E6677106,
- $E6933071,
- $E6BECC4C,
- $E6EA4493,
- $E715993D,
- $E740CA44,
- $E76BD7A2,
- $E796C150,
- $E7C18746,
- $E7EC2980,
- $E816A7F6,
- $E84102A1,
- $E86B397B,
- $E8954C7D,
- $E8BF3BA2,
- $E8E906E2,
- $E912AE37,
- $E93C319B,
- $E9659107,
- $E98ECC75,
- $E9B7E3DE,
- $E9E0D73D,
- $EA09A68A,
- $EA3251C0,
- $EA5AD8D9,
- $EA833BCD,
- $EAAB7A97,
- $EAD39531,
- $EAFB8B94,
- $EB235DBB,
- $EB4B0B9E,
- $EB729539,
- $EB99FA84,
- $EBC13B7B,
- $EBE85816,
- $EC0F5050,
- $EC362422,
- $EC5CD387,
- $EC835E7A,
- $ECA9C4F3,
- $ECD006EC,
- $ECF62461,
- $ED1C1D4B,
- $ED41F1A4,
- $ED67A167,
- $ED8D2C8E,
- $EDB29312,
- $EDD7D4EE,
- $EDFCF21D,
- $EE21EA98,
- $EE46BE5A,
- $EE6B6D5D,
- $EE8FF79C,
- $EEB45D11,
- $EED89DB6,
- $EEFCB986,
- $EF20B07B,
- $EF448290,
- $EF682FBF,
- $EF8BB802,
- $EFAF1B55,
- $EFD259B1,
- $EFF57311,
- $F0186771,
- $F03B36C9,
- $F05DE116,
- $F0806651,
- $F0A2C676,
- $F0C5017F,
- $F0E71767,
- $F1090828,
- $F12AD3BD,
- $F14C7A22,
- $F16DFB50,
- $F18F5744,
- $F1B08DF6,
- $F1D19F64,
- $F1F28B86,
- $F2135259,
- $F233F3D8,
- $F2546FFC,
- $F274C6C2,
- $F294F824,
- $F2B5041D,
- $F2D4EAA8,
- $F2F4ABC1,
- $F3144762,
- $F333BD87,
- $F3530E2B,
- $F3723949,
- $F3913EDB,
- $F3B01EDE,
- $F3CED94D,
- $F3ED6E23,
- $F40BDD5A,
- $F42A26F0,
- $F4484ADD,
- $F466491F,
- $F48421B1,
- $F4A1D48D,
- $F4BF61B0,
- $F4DCC915,
- $F4FA0AB6,
- $F5172691,
- $F5341C9F,
- $F550ECDE,
- $F56D9747,
- $F58A1BD8,
- $F5A67A8B,
- $F5C2B35C,
- $F5DEC647,
- $F5FAB347,
- $F6167A59,
- $F6321B77,
- $F64D969E,
- $F668EBC9,
- $F6841AF5,
- $F69F241C,
- $F6BA073B,
- $F6D4C44E,
- $F6EF5B50,
- $F709CC3E,
- $F7241713,
- $F73E3BCB,
- $F7583A63,
- $F77212D5,
- $F78BC51F,
- $F7A5513C,
- $F7BEB729,
- $F7D7F6E1,
- $F7F11060,
- $F80A03A4,
- $F822D0A6,
- $F83B7765,
- $F853F7DD,
- $F86C5208,
- $F88485E4,
- $F89C936D,
- $F8B47AA0,
- $F8CC3B78,
- $F8E3D5F1,
- $F8FB4A09,
- $F91297BC,
- $F929BF05,
- $F940BFE2,
- $F9579A4F,
- $F96E4E48,
- $F984DBCA,
- $F99B42D2,
- $F9B1835B,
- $F9C79D63,
- $F9DD90E6,
- $F9F35DE1,
- $FA090450,
- $FA1E8430,
- $FA33DD7E,
- $FA491036,
- $FA5E1C55,
- $FA7301D8,
- $FA87C0BC,
- $FA9C58FD,
- $FAB0CA99,
- $FAC5158C,
- $FAD939D2,
- $FAED376A,
- $FB010E50,
- $FB14BE80,
- $FB2847F8,
- $FB3BAAB4,
- $FB4EE6B3,
- $FB61FBF0,
- $FB74EA69,
- $FB87B21A,
- $FB9A5302,
- $FBACCD1D,
- $FBBF2068,
- $FBD14CE1,
- $FBE35284,
- $FBF5314F,
- $FC06E93F,
- $FC187A52,
- $FC29E484,
- $FC3B27D4,
- $FC4C443D,
- $FC5D39BE,
- $FC6E0855,
- $FC7EAFFD,
- $FC8F30B6,
- $FC9F8A7C,
- $FCAFBD4D,
- $FCBFC926,
- $FCCFAE05,
- $FCDF6BE8,
- $FCEF02CB,
- $FCFE72AD,
- $FD0DBB8C,
- $FD1CDD64,
- $FD2BD833,
- $FD3AABF8,
- $FD4958B0,
- $FD57DE58,
- $FD663CEF,
- $FD747472,
- $FD8284DF,
- $FD906E34,
- $FD9E306F,
- $FDABCB8D,
- $FDB93F8C,
- $FDC68C6B,
- $FDD3B228,
- $FDE0B0BF,
- $FDED8830,
- $FDFA3878,
- $FE06C196,
- $FE132387,
- $FE1F5E4A,
- $FE2B71DC,
- $FE375E3C,
- $FE432368,
- $FE4EC15E,
- $FE5A381D,
- $FE6587A2,
- $FE70AFEB,
- $FE7BB0F8,
- $FE868AC7,
- $FE913D55,
- $FE9BC8A1,
- $FEA62CAA,
- $FEB0696D,
- $FEBA7EEA,
- $FEC46D1F,
- $FECE3409,
- $FED7D3A9,
- $FEE14BFB,
- $FEEA9D00,
- $FEF3C6B4,
- $FEFCC918,
- $FF05A429,
- $FF0E57E6,
- $FF16E44E,
- $FF1F495F,
- $FF278719,
- $FF2F9D79,
- $FF378C80,
- $FF3F542A,
- $FF46F478,
- $FF4E6D68,
- $FF55BEF9,
- $FF5CE92A,
- $FF63EBF9,
- $FF6AC766,
- $FF717B6F,
- $FF780814,
- $FF7E6D54,
- $FF84AB2C,
- $FF8AC19E,
- $FF90B0A7,
- $FF967847,
- $FF9C187C,
- $FFA19147,
- $FFA6E2A6,
- $FFAC0C97,
- $FFB10F1C,
- $FFB5EA32,
- $FFBA9DD9,
- $FFBF2A10,
- $FFC38ED7,
- $FFC7CC2C,
- $FFCBE210,
- $FFCFD082,
- $FFD39780,
- $FFD7370B,
- $FFDAAF21,
- $FFDDFFC3,
- $FFE128F0,
- $FFE42AA6,
- $FFE704E7,
- $FFE9B7B1,
- $FFEC4304,
- $FFEEA6E0,
- $FFF0E344,
- $FFF2F82F,
- $FFF4E5A2,
- $FFF6AB9D,
- $FFF84A1E,
- $FFF9C126,
- $FFFB10B5,
- $FFFC38CA,
- $FFFD3965,
- $FFFE1286,
- $FFFEC42C,
- $FFFF4E59,
- $FFFFB10B,
- $FFFFEC43,
- $100000000
- );
--- a/hedgewars/VGSHandlers.inc Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/VGSHandlers.inc Tue Nov 30 22:46:47 2010 +0100
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*)
procedure doStepFlake(Gear: PVisualGear; Steps: Longword);
-var sign: float;
+var sign: real;
begin
if vobCount = 0 then exit;
@@ -59,8 +59,8 @@
begin
if round(X) < cLeftScreenBorder then X:= X + cScreenSpace else
if round(X) > cRightScreenBorder then X:= X - cScreenSpace;
- // if round(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + float(25); // For if flag is set for flakes rising upwards?
- if round(Y) - 75 > LAND_HEIGHT then Y:= Y - float(1024 + 150); // TODO - configure in theme (jellies for example could use limited range)
+ // if round(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + 25.0; // For if flag is set for flakes rising upwards?
+ if round(Y) - 75 > LAND_HEIGHT then Y:= Y - (1024 + 150); // TODO - configure in theme (jellies for example could use limited range)
Timer:= 0;
tdX:= 0;
tdY:= 0
@@ -81,7 +81,7 @@
////////////////////////////////////////////////////////////////////////////////
procedure doStepCloud(Gear: PVisualGear; Steps: Longword);
var s: Longword;
- t: float;
+ t: real;
begin
Gear^.X:= Gear^.X + (cWindSpeedf * 750 * Gear^.dX) * Steps;
@@ -444,16 +444,16 @@
begin
if Gear^.Timer > Steps then dec(Gear^.Timer, Steps) else Gear^.Timer:= 0;
-if (PHedgehog(Gear^.Hedgehog)^.Gear <> nil) then
+if (Gear^.Hedgehog^.Gear <> nil) then
begin
- Gear^.X:= PHedgehog(Gear^.Hedgehog)^.Gear^.X.QWordValue/4294967296 + (Gear^.Tex^.w div 2 - Gear^.FrameTicks);
- Gear^.Y:= PHedgehog(Gear^.Hedgehog)^.Gear^.Y.QWordValue/4294967296 - (16 + Gear^.Tex^.h);
+ Gear^.X:= Gear^.Hedgehog^.Gear^.X.QWordValue/4294967296 + (Gear^.Tex^.w div 2 - Gear^.FrameTicks);
+ Gear^.Y:= Gear^.Hedgehog^.Gear^.Y.QWordValue/4294967296 - (16 + Gear^.Tex^.h);
end;
if Gear^.Timer = 0 then
begin
- if PHedgehog(Gear^.Hedgehog)^.SpeechGear = Gear then
- PHedgehog(Gear^.Hedgehog)^.SpeechGear:= nil;
+ if Gear^.Hedgehog^.SpeechGear = Gear then
+ Gear^.Hedgehog^.SpeechGear:= nil;
DeleteVisualGear(Gear)
end;
end;
@@ -462,10 +462,10 @@
begin
Steps:= Steps; // avoid compiler hint
-with PHedgehog(Gear^.Hedgehog)^ do
+with Gear^.Hedgehog^ do
if SpeechGear <> nil then SpeechGear^.Timer:= 0;
-PHedgehog(Gear^.Hedgehog)^.SpeechGear:= Gear;
+Gear^.Hedgehog^.SpeechGear:= Gear;
Gear^.Timer:= max(Length(Gear^.Text) * 150, 3000);
@@ -479,7 +479,7 @@
Gear^.doStep:= @doStepSpeechBubbleWork;
-Gear^.Y:= Gear^.Y - float(Gear^.Tex^.h)
+Gear^.Y:= Gear^.Y - Gear^.Tex^.h
end;
////////////////////////////////////////////////////////////////////////////////
@@ -512,7 +512,7 @@
str(Gear^.State, s);
if Gear^.Hedgehog <> nil then
- Gear^.Tex:= RenderStringTex(s, PHedgehog(Gear^.Hedgehog)^.Team^.Clan^.Color, fnt16)
+ Gear^.Tex:= RenderStringTex(s, Gear^.Hedgehog^.Team^.Clan^.Color, fnt16)
else
Gear^.Tex:= RenderStringTex(s, cWhiteColor, fnt16);
@@ -521,7 +521,7 @@
else
Gear^.doStep:= @doStepHealthTagWorkUnderWater;
-Gear^.Y:= Gear^.Y - float(Gear^.Tex^.h);
+Gear^.Y:= Gear^.Y - Gear^.Tex^.h;
if Steps > 1 then Gear^.doStep(Gear, Steps-1);
end;
@@ -627,3 +627,25 @@
else
dec(Gear^.FrameTicks, Steps);
end;
+
+////////////////////////////////////////////////////////////////////////////////
+procedure doStepCircle(Gear: PVisualGear; Steps: Longword);
+var tmp: byte;
+ i: LongWord;
+begin
+with Gear^ do
+ if Frame <> 0 then
+ for i:= 1 to Steps do
+ begin
+ inc(FrameTicks);
+ if (FrameTicks mod Frame) = 0 then
+ begin
+ tmp:= Gear^.Tint and $FF;
+ if tdY >= 0 then inc(tmp)
+ else dec(tmp);
+ if tmp < round(dX) then tdY:= 1;
+ if tmp > round(dY) then tdY:= -1;
+ Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or tmp
+ end
+ end
+end;
--- a/hedgewars/hwengine.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/hwengine.pas Tue Nov 30 22:46:47 2010 +0100
@@ -30,7 +30,8 @@
{$ENDIF}
uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uKeys, uSound,
- uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, uMobile, sysutils;
+ uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, uMobile,
+ sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers;
var isTerminated: boolean = false;
alsoShutdownFrontend: boolean = false;
@@ -55,6 +56,7 @@
case GameState of
gsLandGen: begin
GenMap;
+ ParseCommand('sendlanddigest', true);
GameState:= gsStart;
end;
gsStart: begin
@@ -111,6 +113,7 @@
flagMakeCapture:= false;
s:= 'hw_' + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks);
WriteLnToConsole('Saving ' + s + '...');
+ playSound(sndShutter);
MakeScreenshot(s);
//SDL_SaveBMP_RW(SDLPrimSurface, SDL_RWFromFile(Str2PChar(s), 'wb'), 1)
end;
@@ -123,7 +126,6 @@
FreeActionsList();
StoreRelease();
ControllerClose();
- SendKB();
CloseIPC();
TTF_Quit();
{$IFDEF SDL13}
@@ -317,8 +319,12 @@
Randomize();
// uConsts does not need initialization as they are all consts
+ uUtils.initModule;
uMisc.initModule;
+ uVariables.initModule;
uConsole.initModule; // MUST happen after uMisc
+ uCommands.initModule;
+ uCommandHandlers.initModule;
uLand.initModule;
uIO.initModule;
@@ -349,6 +355,7 @@
uTeams.initModule;
uVisualGears.initModule;
uWorld.initModule;
+ uCaptions.initModule;
end;
end;
@@ -356,6 +363,7 @@
begin
if complete then
begin
+ uCaptions.freeModule;
uWorld.freeModule;
uVisualGears.freeModule;
uTeams.freeModule;
@@ -385,7 +393,11 @@
uIO.freeModule; //stub
uLand.freeModule;
+ uCommandHandlers.freeModule;
+ uCommands.freeModule;
uConsole.freeModule;
+ uVariables.freeModule;
+ uUtils.freeModule;
uMisc.freeModule; // uMisc closes the debug log.
end;
--- a/hedgewars/uAI.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uAI.pas Tue Nov 30 22:46:47 2010 +0100
@@ -29,8 +29,9 @@
procedure FreeActionsList;
implementation
-uses uTeams, uConsts, SDLh, uAIMisc, uGears, uAIAmmoTests, uAIActions, uMisc,
- uAmmos, uConsole, SysUtils{$IFDEF UNIX}, cthreads{$ENDIF};
+uses uConsts, SDLh, uAIMisc, uAIAmmoTests, uAIActions,
+ uAmmos, SysUtils{$IFDEF UNIX}, cthreads{$ENDIF}, uTypes,
+ uVariables, uCommands, uUtils, uDebug;
var BestActions: TActions;
CanUseAmmo: array [TAmmoType] of boolean;
@@ -65,7 +66,7 @@
Score, i: LongInt;
a, aa: TAmmoType;
begin
-BotLevel:= PHedgehog(Me^.Hedgehog)^.BotLevel;
+BotLevel:= Me^.Hedgehog^.BotLevel;
for i:= 0 to Pred(Targets.Count) do
if (Targets.ar[i].Score >= 0) and (not StopThinking) then
@@ -194,18 +195,18 @@
Actions.Pos:= 0;
Actions.Score:= 0;
Stack.Count:= 0;
-BotLevel:= PHedgehog(Me^.Hedgehog)^.BotLevel;
+BotLevel:= Me^.Hedgehog^.BotLevel;
tmp:= random(2) + 1;
Push(0, Actions, Me^, tmp);
Push(0, Actions, Me^, tmp xor 3);
-if (Me^.State and gstAttacked) = 0 then maxticks:= max(0, TurnTimeLeft - 5000 - LongWord(4000 * BotLevel))
+if (Me^.State and gstAttacked) = 0 then maxticks:= Max(0, TurnTimeLeft - 5000 - LongWord(4000 * BotLevel))
else maxticks:= TurnTimeLeft;
if (Me^.State and gstAttacked) = 0 then TestAmmos(Actions, Me, false);
BestRate:= RatePlace(Me);
-BaseRate:= max(BestRate, 0);
+BaseRate:= Max(BestRate, 0);
while (Stack.Count > 0) and (not StopThinking) and (GameFlags and gfArtillery = 0) do
begin
@@ -321,7 +322,7 @@
FillBonuses((Me^.State and gstAttacked) <> 0);
for a:= Low(TAmmoType) to High(TAmmoType) do
- CanUseAmmo[a]:= Assigned(AmmoTests[a].proc) and HHHasAmmo(PHedgehog(Me^.Hedgehog)^, a);
+ CanUseAmmo[a]:= Assigned(AmmoTests[a].proc) and HHHasAmmo(Me^.Hedgehog^, a);
{$IFDEF DEBUGFILE}AddFileLog('Enter Think Thread');{$ENDIF}
BeginThread(@Think, Me, ThinkThread)
end;
--- a/hedgewars/uAIActions.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uAIActions.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,7 +20,7 @@
unit uAIActions;
interface
-uses uGears, uFloat;
+uses uFloat, uTypes;
const MAXACTIONS = 96;
aia_none = 0;
@@ -62,7 +62,7 @@
procedure ProcessAction(var Actions: TActions; Me: PGear);
implementation
-uses uMisc, uConsts, uConsole, uAIMisc, uAI, uAmmos;
+uses uAIMisc, uAI, uAmmos, uVariables, uCommands, uUtils, uDebug, uIO;
const ActionIdToStr: array[0..6] of string[16] = (
{aia_none} '',
@@ -95,8 +95,8 @@
else begin
WriteLnToConsole('AI action: '+SpecActionIdToStr[Action.Action]);
if (Action.Action = aia_WaitXL) or (Action.Action = aia_WaitXR) then
- WriteLnToConsole('AI action Wait X = '+inttostr(Action.Param)+', current X = '+inttostr(hwRound(Me^.X)))
- else if (Action.Action = aia_AwareExpl) then WriteLnToConsole('Aware X = ' + inttostr(Action.X) + ', Y = ' + inttostr(Action.Y));
+ WriteLnToConsole('AI action Wait X = '+IntToStr(Action.Param)+', current X = '+IntToStr(hwRound(Me^.X)))
+ else if (Action.Action = aia_AwareExpl) then WriteLnToConsole('Aware X = ' + IntToStr(Action.X) + ', Y = ' + IntToStr(Action.Y));
end
end;
{$ENDIF}
@@ -199,7 +199,7 @@
aim_push: s:= '+' + s;
aim_release: s:= '-' + s;
end
- else if Param <> 0 then s:= s + ' ' + inttostr(Param);
+ else if Param <> 0 then s:= s + ' ' + IntToStr(Param);
ParseCommand(s, true)
end
end;
--- a/hedgewars/uAIAmmoTests.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uAIAmmoTests.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,7 +20,7 @@
unit uAIAmmoTests;
interface
-uses SDLh, uGears, uConsts, uFloat;
+uses SDLh, uConsts, uFloat, uTypes;
const amtest_OnTurn = $00000001;
type TAttackParams = record
@@ -108,7 +108,7 @@
const BadTurn = Low(LongInt) div 4;
implementation
-uses uMisc, uAIMisc, uLand;
+uses uAIMisc, uVariables, uUtils;
function Metric(x1, y1, x2, y2: LongInt): LongInt;
begin
@@ -539,7 +539,7 @@
or (y.Round > LongWord(LAND_HEIGHT))
or (d > 200);
-if Abs(Targ.X - hwRound(x)) + Abs(Targ.Y - hwRound(y)) < 3 then valueResult:= max(0, (4 - d div 50) * 7 * 1024)
+if Abs(Targ.X - hwRound(x)) + Abs(Targ.Y - hwRound(y)) < 3 then valueResult:= Max(0, (4 - d div 50) * 7 * 1024)
else valueResult:= BadTurn;
TestDesertEagle:= valueResult
end;
--- a/hedgewars/uAIMisc.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uAIMisc.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,7 +20,7 @@
unit uAIMisc;
interface
-uses SDLh, uConsts, uGears, uFloat;
+uses SDLh, uConsts, uFloat, uTypes;
const MAXBONUS = 1024;
@@ -68,8 +68,7 @@
end;
implementation
-uses uTeams, uMisc, uLand, uCollisions;
-
+uses uCollisions, uVariables, uUtils, uDebug;
const KillScore = 200;
@@ -131,7 +130,7 @@
begin
bonuses.Count:= 0;
-MyClan:= PHedgehog(ThinkingHH^.Hedgehog)^.Team^.Clan;
+MyClan:= ThinkingHH^.Hedgehog^.Team^.Clan;
Gear:= GearsList;
while Gear <> nil do
begin
@@ -150,7 +149,7 @@
AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 60, -25)
else
if isAfterAttack and (ThinkingHH^.Hedgehog <> Gear^.Hedgehog) then
- if (MyClan = PHedgehog(Gear^.Hedgehog)^.Team^.Clan) then
+ if (MyClan = Gear^.Hedgehog^.Team^.Clan) then
AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 150, -3) // hedgehog-friend
else
AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 100, 3)
--- a/hedgewars/uAmmos.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uAmmos.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,7 +20,7 @@
unit uAmmos;
interface
-uses uConsts, uTeams;
+uses uConsts, uTypes;
procedure initModule;
procedure freeModule;
@@ -47,7 +47,7 @@
var StoreCnt: Longword;
implementation
-uses uMisc, uGears, uWorld, uLocale, uConsole, uMobile;
+uses uLocale, uMobile, uVariables, uCommands, uUtils, uCaptions, uDebug;
type TAmmoCounts = array[TAmmoType] of Longword;
var StoresList: array[0..Pred(cMaxHHs)] of PHHAmmo;
@@ -326,7 +326,7 @@
if (Count <> AMMO_INFINITE) and not (Hedgehog.Team^.ExtDriven or (Hedgehog.BotLevel > 0)) then
s:= s + ' (' + IntToStr(Count) + ')';
if (Propz and ammoprop_Timerable) <> 0 then
- s:= s + ', ' + inttostr(Timer div 1000) + ' ' + trammo[sidSeconds];
+ s:= s + ', ' + IntToStr(Timer div 1000) + ' ' + trammo[sidSeconds];
AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo);
end;
if (Propz and ammoprop_NeedTarget) <> 0
@@ -418,8 +418,22 @@
if Ammoz[a].SkipTurns >= 10000 then dec(Ammoz[a].SkipTurns,10000)
end;
+
+
+procedure chAddAmmoStore(var descr: shortstring);
+begin
+descr:= ''; // avoid compiler hint
+AddAmmoStore
+end;
+
procedure initModule;
begin
+ RegisterVariable('ammloadt', vtCommand, @SetAmmoLoadout, false);
+ RegisterVariable('ammdelay', vtCommand, @SetAmmoDelay, false);
+ RegisterVariable('ammprob', vtCommand, @SetAmmoProbability, false);
+ RegisterVariable('ammreinf', vtCommand, @SetAmmoReinforcement, false);
+ RegisterVariable('ammstore', vtCommand, @chAddAmmoStore , false);
+
StoreCnt:= 0;
ammoLoadout:= '';
ammoProbability:= '';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uCaptions.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,75 @@
+unit uCaptions;
+
+interface
+uses uTypes;
+
+procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
+procedure DrawCaptions;
+
+procedure initModule;
+procedure freeModule;
+
+implementation
+uses uTextures, uRenderUtils, uVariables, uRender, uConsts;
+
+type TCaptionStr = record
+ Tex: PTexture;
+ EndTime: LongWord;
+ end;
+var
+ Captions: array[TCapGroup] of TCaptionStr;
+
+procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
+begin
+ if Captions[Group].Tex <> nil then
+ FreeTexture(Captions[Group].Tex);
+ Captions[Group].Tex:= nil;
+
+ Captions[Group].Tex:= RenderStringTex(s, Color, fntBig);
+
+ case Group of
+ capgrpGameState: Captions[Group].EndTime:= RealTicks + 2200
+ else
+ Captions[Group].EndTime:= RealTicks + 1400 + LongWord(Captions[Group].Tex^.w) * 3;
+ end;
+end;
+
+procedure DrawCaptions;
+var
+ grp: TCapGroup;
+ offset: LongInt;
+begin
+ {$IFDEF IPHONEOS}
+ offset:= 40;
+ {$ELSE}
+ if ((TrainingFlags and tfTimeTrial) <> 0) and (TimeTrialStartTime > 0) then
+ offset:= 48
+ else
+ offset:= 8;
+ {$ENDIF}
+
+ for grp:= Low(TCapGroup) to High(TCapGroup) do
+ with Captions[grp] do
+ if Tex <> nil then
+ begin
+ DrawCentered(0, offset, Tex);
+ inc(offset, Tex^.h + 2);
+ if EndTime <= RealTicks then
+ begin
+ FreeTexture(Tex);
+ Tex:= nil;
+ EndTime:= 0
+ end;
+ end;
+end;
+
+procedure initModule;
+begin
+ FillChar(Captions, sizeof(Captions), 0)
+end;
+
+procedure freeModule;
+begin
+end;
+
+end.
--- a/hedgewars/uChat.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uChat.pas Tue Nov 30 22:46:47 2010 +0100
@@ -34,7 +34,7 @@
showAll: boolean;
implementation
-uses uMisc, uStore, uConsts, SDLh, uConsole, uKeys, uTeams;
+uses SDLh, uKeys, uTypes, uVariables, uCommands, uUtils, uTextures, uRender, uIO;
const MaxStrIndex = 27;
@@ -308,8 +308,64 @@
end
end;
+procedure chChatMessage(var s: shortstring);
+begin
+ AddChatString(s)
+end;
+
+procedure chSay(var s: shortstring);
+begin
+ SendIPC('s' + s);
+
+ if copy(s, 1, 4) = '/me ' then
+ s:= #2'* ' + UserNick + ' ' + copy(s, 5, Length(s) - 4)
+ else
+ s:= #1 + UserNick + ': ' + s;
+
+ AddChatString(s)
+end;
+
+procedure chTeamSay(var s: shortstring);
+begin
+ SendIPC('b' + s);
+
+ s:= #4 + '[Team] ' + UserNick + ': ' + s;
+
+ AddChatString(s)
+end;
+
+procedure chHistory(var s: shortstring);
+begin
+ s:= s; // avoid compiler hint
+ uChat.showAll:= not uChat.showAll
+end;
+
+procedure chChat(var s: shortstring);
+begin
+ s:= s; // avoid compiler hint
+ GameState:= gsChat;
+ if length(s) = 0 then
+ KeyPressChat(27)
+ else
+ begin
+ KeyPressChat(27);
+ KeyPressChat(47);
+ KeyPressChat(116);
+ KeyPressChat(101);
+ KeyPressChat(97);
+ KeyPressChat(109);
+ KeyPressChat(32)
+ end
+end;
+
procedure initModule;
begin
+ RegisterVariable('chatmsg', vtCommand, @chChatMessage, true);
+ RegisterVariable('say', vtCommand, @chSay, true);
+ RegisterVariable('team', vtCommand, @chTeamSay, true);
+ RegisterVariable('history', vtCommand, @chHistory, true );
+ RegisterVariable('chat', vtCommand, @chChat, true );
+
lastStr:= 0;
visibleCount:= 0;
showAll:= false;
--- a/hedgewars/uCollisions.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uCollisions.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,7 +20,7 @@
unit uCollisions;
interface
-uses uGears, uFloat;
+uses uFloat, uTypes;
const cMaxGearArrayInd = 255;
@@ -52,7 +52,7 @@
function calcSlopeTangent(Gear: PGear; collisionX, collisionY: LongInt; var outDeltaX, outDeltaY: LongInt; TestWord: LongWord): Boolean;
implementation
-uses uMisc, uConsts, uLand, uLandGraphics;
+uses uConsts, uLandGraphics, uVariables, uDebug;
type TCollisionEntry = record
X, Y, Radius: LongInt;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uCommandHandlers.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,598 @@
+{$INCLUDE "options.inc"}
+unit uCommandHandlers;
+
+interface
+
+procedure initModule;
+procedure freeModule;
+
+implementation
+uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uMobile, uRandom;
+
+procedure chQuit(var s: shortstring);
+const prevGState: TGameState = gsConfirm;
+begin
+s:= s; // avoid compiler hint
+if GameState <> gsConfirm then
+ begin
+ prevGState:= GameState;
+ GameState:= gsConfirm
+ end else
+ GameState:= prevGState
+end;
+
+procedure chConfirm(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if GameState = gsConfirm then
+ begin
+ SendIPC('Q');
+ GameState:= gsExit
+ end
+else
+ ParseCommand('chat team', true);
+end;
+
+procedure chCheckProto(var s: shortstring);
+var i, c: LongInt;
+begin
+if isDeveloperMode then
+begin
+val(s, i, c);
+if (c <> 0) or (i = 0) then exit;
+TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old', true);
+TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new', true)
+end
+end;
+
+procedure chTeamLocal(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if not isDeveloperMode then exit;
+if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/rdriven"', true);
+CurrentTeam^.ExtDriven:= true
+end;
+
+procedure chGrave(var s: shortstring);
+begin
+if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/grave"', true);
+if s[1]='"' then Delete(s, 1, 1);
+if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
+CurrentTeam^.GraveName:= s
+end;
+
+procedure chFort(var s: shortstring);
+begin
+if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/fort"', true);
+if s[1]='"' then Delete(s, 1, 1);
+if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
+CurrentTeam^.FortName:= s
+end;
+
+procedure chFlag(var s: shortstring);
+begin
+if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/flag"', true);
+if s[1]='"' then Delete(s, 1, 1);
+if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
+CurrentTeam^.flag:= s
+end;
+
+procedure chScript(var s: shortstring);
+begin
+if s[1]='"' then Delete(s, 1, 1);
+if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
+ScriptLoad(s)
+end;
+
+procedure chSetHat(var s: shortstring);
+begin
+if (not isDeveloperMode) or (CurrentTeam = nil) then exit;
+with CurrentTeam^ do
+ begin
+ if not CurrentHedgehog^.King then
+ if (s = '') or
+ (((GameFlags and gfKing) <> 0) and (s = 'crown')) or
+ ((Length(s) > 39) and (Copy(s,1,8) = 'Reserved') and (Copy(s,9,32) <> PlayerHash)) then
+ CurrentHedgehog^.Hat:= 'NoHat'
+ else
+ CurrentHedgehog^.Hat:= s
+ end;
+end;
+
+procedure chCurU_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+CursorMovementY:= -1;
+end;
+
+procedure chCurU_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+CursorMovementY:= 0;
+end;
+
+procedure chCurD_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+CursorMovementY:= 1;
+end;
+
+procedure chCurD_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+CursorMovementY:= 0;
+end;
+
+procedure chCurL_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+CursorMovementX:= -1;
+end;
+
+procedure chCurL_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+CursorMovementX:= 0;
+end;
+
+procedure chCurR_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+CursorMovementX:= 1;
+end;
+
+procedure chCurR_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+CursorMovementX:= 0;
+end;
+
+procedure chLeft_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('L');
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or gmLeft
+end;
+
+procedure chLeft_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('l');
+with CurrentHedgehog^.Gear^ do
+ Message:= Message and not gmLeft
+end;
+
+procedure chRight_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('R');
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or gmRight
+end;
+
+procedure chRight_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('r');
+with CurrentHedgehog^.Gear^ do
+ Message:= Message and not gmRight
+end;
+
+procedure chUp_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('U');
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or gmUp
+end;
+
+procedure chUp_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('u');
+with CurrentHedgehog^.Gear^ do
+ Message:= Message and not gmUp
+end;
+
+procedure chDown_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('D');
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or gmDown
+end;
+
+procedure chDown_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('d');
+with CurrentHedgehog^.Gear^ do
+ Message:= Message and not gmDown
+end;
+
+procedure chPrecise_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('Z');
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or gmPrecise
+end;
+
+procedure chPrecise_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('z');
+with CurrentHedgehog^.Gear^ do
+ Message:= Message and not gmPrecise
+end;
+
+procedure chLJump(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('j');
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or gmLJump
+end;
+
+procedure chHJump(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('J');
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or gmHJump
+end;
+
+procedure chAttack_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ begin
+ {$IFDEF DEBUGFILE}AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State));{$ENDIF}
+ if ((State and gstHHDriven) <> 0) then
+ begin
+ FollowGear:= CurrentHedgehog^.Gear;
+ if not CurrentTeam^.ExtDriven then SendIPC('A');
+ Message:= Message or gmAttack
+ end
+ end
+end;
+
+procedure chAttack_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH then exit;
+with CurrentHedgehog^.Gear^ do
+ begin
+ if not CurrentTeam^.ExtDriven and
+ ((Message and gmAttack) <> 0) then SendIPC('a');
+ Message:= Message and not gmAttack
+ end
+end;
+
+procedure chSwitch(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+if not CurrentTeam^.ExtDriven then SendIPC('S');
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or gmSwitch
+end;
+
+procedure chNextTurn(var s: shortstring);
+begin
+ s:= s; // avoid compiler hint
+ TryDo(AllInactive, '/nextturn called when not all gears are inactive', true);
+
+ if not CurrentTeam^.ExtDriven then SendIPC('N');
+{$IFDEF DEBUGFILE}
+ AddFileLog('Doing SwitchHedgehog: time '+inttostr(GameTicks));
+{$ENDIF}
+ perfExt_NewTurnBeginning();
+end;
+
+procedure chTimer(var s: shortstring);
+begin
+if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5') or CheckNoTeamOrHH then exit;
+
+if not CurrentTeam^.ExtDriven then SendIPC(s);
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ begin
+ Message:= Message or gmTimer;
+ MsgParam:= byte(s[1]) - ord('0')
+ end
+end;
+
+procedure chSlot(var s: shortstring);
+var slot: LongWord;
+begin
+if (s[0] <> #1) or CheckNoTeamOrHH then exit;
+slot:= byte(s[1]) - 49;
+if slot > cMaxSlotIndex then exit;
+if not CurrentTeam^.ExtDriven then SendIPC(char(byte(s[1]) + 79));
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ begin
+ Message:= Message or gmSlot;
+ MsgParam:= slot
+ end
+end;
+
+procedure chSetWeapon(var s: shortstring);
+begin
+ if (s[0] <> #1) or CheckNoTeamOrHH then exit;
+
+ if TAmmoType(s[1]) > High(TAmmoType) then exit;
+
+ if not CurrentTeam^.ExtDriven then SendIPC('w' + s);
+
+ with CurrentHedgehog^.Gear^ do
+ begin
+ Message:= Message or gmWeapon;
+ MsgParam:= byte(s[1]);
+ end;
+end;
+
+procedure chTaunt(var s: shortstring);
+begin
+if (s[0] <> #1) or CheckNoTeamOrHH then exit;
+
+if TWave(s[1]) > High(TWave) then exit;
+
+if not CurrentTeam^.ExtDriven then SendIPC('t' + s);
+
+with CurrentHedgehog^.Gear^ do
+ begin
+ Message:= Message or gmAnimate;
+ MsgParam:= byte(s[1])
+ end
+end;
+
+procedure chPut(var s: shortstring);
+begin
+ s:= s; // avoid compiler hint
+ doPut(0, 0, false);
+end;
+
+procedure chCapture(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+flagMakeCapture:= true
+end;
+
+procedure chSetMap(var s: shortstring);
+begin
+if isDeveloperMode then
+begin
+Pathz[ptMapCurrent]:= Pathz[ptMaps] + '/' + s;
+InitStepsFlags:= InitStepsFlags or cifMap
+end
+end;
+
+procedure chSetTheme(var s: shortstring);
+begin
+if isDeveloperMode then
+begin
+Pathz[ptCurrTheme]:= Pathz[ptThemes] + '/' + s;
+InitStepsFlags:= InitStepsFlags or cifTheme
+end
+end;
+
+procedure chSetSeed(var s: shortstring);
+begin
+if isDeveloperMode then
+begin
+SetRandomSeed(s);
+cSeed:= s;
+InitStepsFlags:= InitStepsFlags or cifRandomize
+end
+end;
+
+procedure chAmmoMenu(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH then
+ bShowAmmoMenu:= true
+else
+ begin
+ with CurrentTeam^ do
+ with Hedgehogs[CurrHedgehog] do
+ begin
+ bSelected:= false;
+
+ if bShowAmmoMenu then bShowAmmoMenu:= false
+ else if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or
+ ((MultiShootAttacks > 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) = 0)) or
+ ((Gear^.State and gstHHDriven) = 0) then else bShowAmmoMenu:= true
+ end;
+ if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1
+ end
+end;
+
+procedure chVol_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+inc(cVolumeDelta, 3)
+end;
+
+procedure chVol_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+dec(cVolumeDelta, 3)
+end;
+
+procedure chFindhh(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+bShowFinger:= true;
+FollowGear:= CurrentHedgehog^.Gear
+end;
+
+procedure chPause(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+if gameType <> gmtNet then
+ isPaused:= not isPaused;
+SDL_ShowCursor(ord(isPaused))
+end;
+
+procedure chRotateMask(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if ((GameFlags and gfInvulnerable) = 0) then cTagsMask:= cTagsMasks[cTagsMask] else cTagsMask:= cTagsMasksNoHealth[cTagsMask];
+end;
+
+procedure chSpeedup_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+isSpeed:= true
+end;
+
+procedure chSpeedup_m(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+isSpeed:= false
+end;
+
+procedure chZoomIn(var s: shortstring);
+begin
+ s:= s; // avoid compiler hint
+ if ZoomValue < cMinZoomLevel then
+ ZoomValue:= ZoomValue + cZoomDelta;
+end;
+
+procedure chZoomOut(var s: shortstring);
+begin
+ s:= s; // avoid compiler hint
+ if ZoomValue > cMaxZoomLevel then
+ ZoomValue:= ZoomValue - cZoomDelta;
+end;
+
+procedure chZoomReset(var s: shortstring);
+begin
+ s:= s; // avoid compiler hint
+ ZoomValue:= cDefaultZoomLevel;
+end;
+
+
+procedure initModule;
+begin
+ RegisterVariable('flag' , vtCommand, @chFlag , false);
+ RegisterVariable('script' , vtCommand, @chScript , false);
+ RegisterVariable('proto' , vtCommand, @chCheckProto , true );
+ RegisterVariable('spectate', vtBoolean, @fastUntilLag , false);
+ RegisterVariable('capture' , vtCommand, @chCapture , true );
+ RegisterVariable('rotmask' , vtCommand, @chRotateMask , true );
+ RegisterVariable('rdriven' , vtCommand, @chTeamLocal , false);
+ RegisterVariable('map' , vtCommand, @chSetMap , false);
+ RegisterVariable('theme' , vtCommand, @chSetTheme , false);
+ RegisterVariable('seed' , vtCommand, @chSetSeed , false);
+ RegisterVariable('template_filter', vtLongInt, @cTemplateFilter, false);
+ RegisterVariable('mapgen' , vtLongInt, @cMapGen , false);
+ RegisterVariable('maze_size',vtLongInt, @cMazeSize , false);
+ RegisterVariable('delay' , vtLongInt, @cInactDelay , false);
+ RegisterVariable('ready' , vtLongInt, @cReadyDelay , false);
+ RegisterVariable('casefreq', vtLongInt, @cCaseFactor , false);
+ RegisterVariable('healthprob', vtLongInt, @cHealthCaseProb, false);
+ RegisterVariable('hcaseamount', vtLongInt, @cHealthCaseAmount, false);
+ RegisterVariable('sd_turns', vtLongInt, @cSuddenDTurns , false);
+ RegisterVariable('waterrise', vtLongInt, @cWaterRise , false);
+ RegisterVariable('healthdec', vtLongInt, @cHealthDecrease, false);
+ RegisterVariable('damagepct',vtLongInt, @cDamagePercent , false);
+ RegisterVariable('ropepct' , vtLongInt, @cRopePercent , false);
+ RegisterVariable('minedudpct',vtLongInt,@cMineDudPercent, false);
+ RegisterVariable('minesnum', vtLongInt, @cLandMines , false);
+ RegisterVariable('explosives',vtLongInt,@cExplosives , false);
+ RegisterVariable('gmflags' , vtLongInt, @GameFlags , false);
+ RegisterVariable('trflags' , vtLongInt, @TrainingFlags , false);
+ RegisterVariable('turntime', vtLongInt, @cHedgehogTurnTime, false);
+ RegisterVariable('minestime',vtLongInt, @cMinesTime , false);
+ RegisterVariable('fort' , vtCommand, @chFort , false);
+ RegisterVariable('grave' , vtCommand, @chGrave , false);
+ RegisterVariable('hat' , vtCommand, @chSetHat , false);
+ RegisterVariable('quit' , vtCommand, @chQuit , true );
+ RegisterVariable('confirm' , vtCommand, @chConfirm , true );
+ RegisterVariable('+speedup', vtCommand, @chSpeedup_p , true );
+ RegisterVariable('-speedup', vtCommand, @chSpeedup_m , true );
+ RegisterVariable('zoomin' , vtCommand, @chZoomIn , true );
+ RegisterVariable('zoomout' , vtCommand, @chZoomOut , true );
+ RegisterVariable('zoomreset',vtCommand, @chZoomReset , true );
+ RegisterVariable('ammomenu', vtCommand, @chAmmoMenu , true);
+ RegisterVariable('+precise', vtCommand, @chPrecise_p , false);
+ RegisterVariable('-precise', vtCommand, @chPrecise_m , false);
+ RegisterVariable('+left' , vtCommand, @chLeft_p , false);
+ RegisterVariable('-left' , vtCommand, @chLeft_m , false);
+ RegisterVariable('+right' , vtCommand, @chRight_p , false);
+ RegisterVariable('-right' , vtCommand, @chRight_m , false);
+ RegisterVariable('+up' , vtCommand, @chUp_p , false);
+ RegisterVariable('-up' , vtCommand, @chUp_m , false);
+ RegisterVariable('+down' , vtCommand, @chDown_p , false);
+ RegisterVariable('-down' , vtCommand, @chDown_m , false);
+ RegisterVariable('+attack' , vtCommand, @chAttack_p , false);
+ RegisterVariable('-attack' , vtCommand, @chAttack_m , false);
+ RegisterVariable('switch' , vtCommand, @chSwitch , false);
+ RegisterVariable('nextturn', vtCommand, @chNextTurn , false);
+ RegisterVariable('timer' , vtCommand, @chTimer , false);
+ RegisterVariable('taunt' , vtCommand, @chTaunt , false);
+ RegisterVariable('setweap' , vtCommand, @chSetWeapon , false);
+ RegisterVariable('slot' , vtCommand, @chSlot , false);
+ RegisterVariable('put' , vtCommand, @chPut , false);
+ RegisterVariable('ljump' , vtCommand, @chLJump , false);
+ RegisterVariable('hjump' , vtCommand, @chHJump , false);
+ RegisterVariable('+volup' , vtCommand, @chVol_p , true );
+ RegisterVariable('-volup' , vtCommand, @chVol_m , true );
+ RegisterVariable('+voldown', vtCommand, @chVol_m , true );
+ RegisterVariable('-voldown', vtCommand, @chVol_p , true );
+ RegisterVariable('findhh' , vtCommand, @chFindhh , true );
+ RegisterVariable('pause' , vtCommand, @chPause , true );
+ RegisterVariable('+cur_u' , vtCommand, @chCurU_p , true );
+ RegisterVariable('-cur_u' , vtCommand, @chCurU_m , true );
+ RegisterVariable('+cur_d' , vtCommand, @chCurD_p , true );
+ RegisterVariable('-cur_d' , vtCommand, @chCurD_m , true );
+ RegisterVariable('+cur_l' , vtCommand, @chCurL_p , true );
+ RegisterVariable('-cur_l' , vtCommand, @chCurL_m , true );
+ RegisterVariable('+cur_r' , vtCommand, @chCurR_p , true );
+ RegisterVariable('-cur_r' , vtCommand, @chCurR_m , true );
+end;
+
+procedure freeModule;
+begin
+end;
+
+end.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uCommands.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,135 @@
+{$INCLUDE "options.inc"}
+
+unit uCommands;
+
+interface
+
+var isDeveloperMode: boolean;
+type TVariableType = (vtCommand, vtLongInt, vthwFloat, vtBoolean);
+ TCommandHandler = procedure (var params: shortstring);
+
+procedure initModule;
+procedure freeModule;
+procedure RegisterVariable(Name: shortstring; VType: TVariableType; p: pointer; Trusted: boolean);
+procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean);
+procedure StopMessages(Message: Longword);
+
+implementation
+uses Types, uConsts, uVariables, uConsole, uUtils, uDebug;
+
+type PVariable = ^TVariable;
+ TVariable = record
+ Next: PVariable;
+ Name: string[15];
+ VType: TVariableType;
+ Handler: pointer;
+ Trusted: boolean;
+ end;
+
+var
+ Variables: PVariable;
+
+procedure RegisterVariable(Name: shortstring; VType: TVariableType; p: pointer; Trusted: boolean);
+var value: PVariable;
+begin
+New(value);
+TryDo(value <> nil, 'RegisterVariable: value = nil', true);
+FillChar(value^, sizeof(TVariable), 0);
+value^.Name:= Name;
+value^.VType:= VType;
+value^.Handler:= p;
+value^.Trusted:= Trusted;
+
+if Variables = nil then Variables:= value
+ else begin
+ value^.Next:= Variables;
+ Variables:= value
+ end;
+end;
+
+
+procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean);
+var ii: LongInt;
+ s: shortstring;
+ t: PVariable;
+ c: char;
+begin
+//WriteLnToConsole(CmdStr);
+if CmdStr[0]=#0 then exit;
+{$IFDEF DEBUGFILE}AddFileLog('ParseCommand "' + CmdStr + '"');{$ENDIF}
+c:= CmdStr[1];
+if c in ['/', '$'] then Delete(CmdStr, 1, 1) else c:= '/';
+s:= '';
+SplitBySpace(CmdStr, s);
+t:= Variables;
+while t <> nil do
+ begin
+ if t^.Name = CmdStr then
+ begin
+ if TrustedSource or t^.Trusted then
+ case t^.VType of
+ vtCommand: if c='/' then
+ begin
+ TCommandHandler(t^.Handler)(s);
+ end;
+ vtLongInt: if c='$' then
+ if s[0]=#0 then
+ begin
+ str(PLongInt(t^.Handler)^, s);
+ WriteLnToConsole('$' + CmdStr + ' is "' + s + '"');
+ end else val(s, PLongInt(t^.Handler)^);
+ vthwFloat: if c='$' then
+ if s[0]=#0 then
+ begin
+ //str(PhwFloat(t^.Handler)^:4:6, s);
+ WriteLnToConsole('$' + CmdStr + ' is "' + s + '"');
+ end else; //val(s, PhwFloat(t^.Handler)^, i);
+ vtBoolean: if c='$' then
+ if s[0]=#0 then
+ begin
+ str(ord(boolean(t^.Handler^)), s);
+ WriteLnToConsole('$' + CmdStr + ' is "' + s + '"');
+ end else
+ begin
+ val(s, ii);
+ boolean(t^.Handler^):= not (ii = 0)
+ end;
+ end;
+ exit
+ end else t:= t^.Next
+ end;
+case c of
+ '$': WriteLnToConsole(errmsgUnknownVariable + ': "$' + CmdStr + '"')
+ else WriteLnToConsole(errmsgUnknownCommand + ': "/' + CmdStr + '"') end
+end;
+
+
+procedure StopMessages(Message: Longword);
+begin
+if (Message and gmLeft) <> 0 then ParseCommand('/-left', true) else
+if (Message and gmRight) <> 0 then ParseCommand('/-right', true) else
+if (Message and gmUp) <> 0 then ParseCommand('/-up', true) else
+if (Message and gmDown) <> 0 then ParseCommand('/-down', true) else
+if (Message and gmAttack) <> 0 then ParseCommand('/-attack', true)
+end;
+
+procedure initModule;
+begin
+ Variables:= nil;
+ isDeveloperMode:= true;
+end;
+
+procedure freeModule;
+var t, tt: PVariable;
+begin
+ tt:= Variables;
+ Variables:= nil;
+ while tt <> nil do
+ begin
+ t:= tt;
+ tt:= tt^.Next;
+ Dispose(t)
+ end;
+end;
+
+end.
--- a/hedgewars/uConsts.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uConsts.pas Tue Nov 30 22:46:47 2010 +0100
@@ -21,7 +21,7 @@
unit uConsts;
interface
-uses SDLh, uFloat, uLocale, GLunit;
+uses SDLh, uFloat, GLunit;
{$INCLUDE "config.inc"}
@@ -29,170 +29,6 @@
// typed const is a variable despite const qualifier
// in freepascal you may actually use var for the same purpose
-type
- HwColor4f = record
- r, g, b, a: byte
- end;
-
- TGameState = (gsLandGen, gsStart, gsGame, gsChat, gsConfirm, gsExit);
-
- TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview, gmtSyntax);
-
- TPathType = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptTeams, ptMaps,
- ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts,
- ptLocale, ptAmmoMenu, ptHedgehog, ptVoices, ptHats, ptFlags, ptMissionMaps);
-
- TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame,
- sprLag, sprArrow, sprBazookaShell, sprTargetP, sprBee,
- sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff,
- sprMineOn, sprMineDead, sprCase, sprFAid, sprDynamite, sprPower,
- sprClusterBomb, sprClusterParticle, sprFlame, sprHorizont,
- sprHorizontL, sprHorizontR, sprSky, sprSkyL,
- sprSkyR, sprAMBorderHorizontal, sprAMBorderVertical, sprAMSlot, sprAMAmmos,
- sprAMSlotKeys, sprAMCorners, sprFinger, sprAirBomb,
- sprAirplane, sprAmAirplane, sprAmGirder, sprHHTelepMask,
- sprSwitch, sprParachute, sprTarget, sprRopeNode,
- sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR,
- sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun,
- sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
- sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
- sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
- sprKamikaze, sprWhip, sprKowtow, sprSad, sprWave,
- sprHurrah, sprLemonade, sprShrug, sprJuggle, sprExplPart, sprExplPart2,
- sprCakeWalk, sprCakeDown, sprAMAmmosBW, sprWatermelon,
- sprEvilTrace, sprHellishBomb, sprSeduction, sprDress,
- sprCensored, sprDrill, sprHandDrill, sprHandBallgun, sprBalls,
- sprPlane, sprHandPlane, sprUtility, sprInvulnerable, sprVampiric, sprGirder,
- sprSpeechCorner, sprSpeechEdge, sprSpeechTail,
- sprThoughtCorner, sprThoughtEdge, sprThoughtTail,
- sprShoutCorner, sprShoutEdge, sprShoutTail,
- sprSniperRifle, sprBubbles, sprJetpack, sprHealth, sprHandMolotov, sprMolotov,
- sprSmoke, sprSmokeWhite, sprShell, sprDust, sprExplosives, sprExplosivesRoll,
- sprAmTeleport, sprSplash, sprDroplet, sprBirdy, sprHandCake, sprHandConstruction,
- sprHandGrenade, sprHandMelon, sprHandMortar, sprHandSkip, sprHandCluster,
- sprHandDynamite, sprHandHellish, sprHandMine, sprHandSeduction, sprHandVamp,
- sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee,
- sprFeather, sprPiano, sprHandSineGun, sprPortalGun, sprPortal,
- sprCheese, sprHandCheese, sprHandFlamethrower, sprChunk, sprNote,
- sprSMineOff, sprSMineOn, sprHandSMine, sprHammer,
- sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb,
- sprBulletHit
- );
-
- // Gears that interact with other Gears and/or Land
- TGearType = (gtBomb, gtHedgehog, gtShell, gtGrave, gtBee, // 4
- gtShotgunShot, gtPickHammer, gtRope, gtMine, gtCase, // 9
- gtDEagleShot, gtDynamite, gtClusterBomb, gtCluster, gtShover, // 14
- gtFlame, gtFirePunch, gtATStartGame, gtATSmoothWindCh, // 18
- gtATFinishGame, gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, // 23
- gtGirder, gtTeleport, gtSwitcher, gtTarget, gtMortar, // 28
- gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 34
- gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 40
- gtSniperRifleShot, gtJetpack, gtMolotov, gtExplosives, gtBirdy, // 45
- gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51
- gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56
- gtNapalmBomb); // 57
-
- // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
- TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
- vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
- vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtHealth, vgtShell,
- vgtDust, vgtSplash, vgtDroplet, vgtSmokeRing, vgtBeeTrace, vgtEgg,
- vgtFeather, vgtHealthTag, vgtSmokeTrace, vgtEvilTrace, vgtExplosion,
- vgtBigExplosion, vgtChunk, vgtNote, vgtLineTrail,
- vgtBulletHit);
-
- TGearsType = set of TGearType;
-
- TDamageSource = (dsUnknown, dsFall, dsBullet, dsExplosion, dsShove, dsPoison);
-
- TSound = (sndNone,
- sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease,
- sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact,
- sndMineTick, sndPickhammer, sndGun, sndBee, sndJump1, sndJump2,
- sndJump3, sndYesSir, sndLaugh, sndIllGetYou, sndIncoming,
- sndMissed, sndStupid, sndFirstBlood, sndBoring, sndByeBye,
- sndSameTeam, sndNutter, sndReinforce, sndTraitor, sndRegret,
- sndEnemyDown, sndCoward, sndHurry, sndWatchIt, sndKamikaze,
- sndCake, sndOw1, sndOw2, sndOw3, sndOw4, sndFirePunch1, sndFirePunch2,
- sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6,
- sndMelon, sndHellish, sndYoohoo, sndRCPlane, sndWhipCrack,
- sndRideOfTheValkyries, sndDenied, sndPlaced, sndBaseballBat,
- sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter,
- sndHomerun, sndMolotov, sndCover, sndUhOh, sndOops,
- sndNooo, sndHello, sndRopeShot, sndRopeAttach, sndRopeRelease,
- sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity,
- sndHellishImpact1, sndHellishImpact2, sndHellishImpact3, sndHellishImpact4,
- sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak, sndDrillRocket,
- sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater,
- sndPiano0, sndPiano1, sndPiano2, sndPiano3, sndPiano4, sndPiano5, sndPiano6, sndPiano7, sndPiano8,
- sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack,
- sndComeonthen, sndParachute, sndBump, sndResurrector);
-
- TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6
- amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13
- amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18
- amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, // 24
- amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30
- amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
- amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
- amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
- amResurrector, amDrillStrike);
-
- TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
-
- THWFont = (fnt16, fntBig, fntSmall {$IFNDEF IPHONEOS}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF});
-
- TCapGroup = (capgrpGameState, capgrpAmmoinfo, capgrpVolume,
- capgrpMessage, capgrpAmmostate);
-
- TStatInfoType = (siGameResult, siMaxStepDamage, siMaxStepKills, siKilledHHs,
- siClanHealth, siTeamStats, siPlayerKills, siMaxTeamDamage,
- siMaxTeamKills, siMaxTurnSkips );
-
- TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle);
-
- THHFont = record
- Handle: PTTF_Font;
- Height: LongInt;
- style: LongInt;
- Name: string[21];
- end;
-
- PAmmo = ^TAmmo;
- TAmmo = record
- Propz: LongWord;
- Count: LongWord;
-(* Using for place hedgehogs mode, but for any other situation where the initial count would be needed I guess.
-For example, say, a mode where the weaponset is reset each turn, or on sudden death *)
- NumPerTurn: LongWord;
- Timer: LongWord;
- Pos: LongWord;
- AmmoType: TAmmoType;
- AttackVoice: TSound;
- end;
-
- TVertex2f = record
- X, Y: GLfloat;
- end;
-
- TVertex2i = record
- X, Y: GLint;
- end;
-
- PTexture = ^TTexture;
- TTexture = record
- id: GLuint;
- w, h, scale: LongInt;
- rx, ry: GLfloat;
- priority: GLfloat;
- vb, tb: array [0..3] of TVertex2f;
- PrevTexture, NextTexture: PTexture;
- end;
-
- THogEffect = (heInvulnerable, heResurrectable, hePoisoned, heResurrected);
-
- TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite);
const
sfMax = 1000;
cDefaultParamNum = 16;
@@ -267,6 +103,7 @@
cPowerDivisor = 1500;
MAXNAMELEN = 192;
+ MAXROPEPOINTS = 3840;
// some opengl headers do not have these macros
GL_BGR = $80E0;
@@ -287,7 +124,7 @@
cTransparentColor: Longword = $00000000;
- cMaxTeams = 6;
+ cMaxTeams = 8;
cMaxHHIndex = 7;
cMaxHHs = 48;
cMaxSpawnPoints = 1024;
@@ -442,1847 +279,7 @@
htHealth = $04;
htTransparent = $08;
- cHHFileName = 'Hedgehog';
- cCHFileName = 'Crosshair';
- cThemeCFGFilename = 'theme.cfg';
- FontBorder = 2;
- cPathz: array[TPathType] of shortstring = (
- '', // ptNone
- '', // ptData
- 'Graphics', // ptGraphics
- 'Themes', // ptThemes
- 'Themes/avematan', // ptCurrTheme
- 'Teams', // ptTeams
- 'Maps', // ptMaps
- '', // ptMapCurrent
- 'Demos', // ptDemos
- 'Sounds', // ptSounds
- 'Graphics/Graves', // ptGraves
- 'Fonts', // ptFonts
- 'Forts', // ptForts
- 'Locale', // ptLocale
- 'Graphics/AmmoMenu', // ptAmmoMenu
- 'Graphics/Hedgehog', // ptHedgehog
- 'Sounds/voices', // ptVoices
- 'Graphics/Hats', // ptHats
- 'Graphics/Flags', // ptFlags
- 'Missions/Maps' // ptMissionMaps
- );
-
- cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13);
- cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0);
-
- Fontz: array[THWFont] of THHFont = (
- (Handle: nil;
- Height: 12;
- style: TTF_STYLE_NORMAL;
- Name: 'DejaVuSans-Bold.ttf'),
- (Handle: nil;
- Height: 24;
- style: TTF_STYLE_NORMAL;
- Name: 'DejaVuSans-Bold.ttf'),
- (Handle: nil;
- Height: 10;
- style: TTF_STYLE_NORMAL;
- Name: 'DejaVuSans-Bold.ttf')
- {$IFNDEF IPHONEOS}, // remove chinese fonts for now
- (Handle: nil;
- Height: 12;
- style: TTF_STYLE_NORMAL;
- Name: 'wqy-zenhei.ttc'),
- (Handle: nil;
- Height: 24;
- style: TTF_STYLE_NORMAL;
- Name: 'wqy-zenhei.ttc'),
- (Handle: nil;
- Height: 10;
- style: TTF_STYLE_NORMAL;
- Name: 'wqy-zenhei.ttc')
- {$ENDIF}
- );
-
- SpritesData: array[TSprite] of record
- FileName: String[16];
- Path, AltPath: TPathType;
- Texture: PTexture;
- Surface: PSDL_Surface;
- Width, Height, imageWidth, imageHeight: LongInt;
- saveSurf: boolean;
- priority: GLfloat;
- getDimensions, getImageDimensions: boolean;
- end = (
- (FileName: 'BlueWater'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
- Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: true; getImageDimensions: true),// sprWater
- (FileName: 'Clouds'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
- Width: 256; Height:128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprCloud
- (FileName: 'Bomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBomb
- (FileName: 'BigDigits'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBigDigit
- (FileName: 'Frame'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 4; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprFrame
- (FileName: 'Lag'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 65; Height: 65; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprLag
- (FileName: 'Arrow'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCursor
- (FileName:'BazookaShell'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBazookaShell
- (FileName: 'Targetp'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTargetP
- (FileName: 'Bee'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBee
- (FileName: 'SmokeTrace'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSmokeTrace
- (FileName: 'RopeHook'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprRopeHook
- (FileName: 'Expl50'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplosion50
- (FileName: 'MineOff'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMineOff
- (FileName: 'MineOn'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMineOn
- (FileName: 'MineDead'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMineDead
- (FileName: 'Case'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprCase
- (FileName: 'FirstAid'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprFAid
- (FileName: 'dynamite'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprDynamite
- (FileName: 'Power'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprPower
- (FileName: 'ClBomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprClusterBomb
- (FileName: 'ClParticle'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprClusterParticle
- (FileName: 'Flame'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFlame
- (FileName: 'horizont'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprHorizont
- (FileName: 'horizontL'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprHorizont
- (FileName: 'horizontR'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprHorizont
- (FileName: 'Sky'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprSky
- (FileName: 'SkyL'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprSky
- (FileName: 'SkyR'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprSky
- (FileName: 'BorderHorizontal'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 33; Height: 2; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprAMBorderHorizontal
- (FileName: 'BorderVertical'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 2; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprAMBorderVertical
- (FileName: 'Slot'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 33; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMSlot
- (FileName: 'Ammos'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMAmmos
- (FileName: 'SlotKeys'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMSlotKeys
- (FileName: 'Corners'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 2; Height: 2; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMCorners
- (FileName: 'Finger'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprFinger
- (FileName: 'AirBomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAirBomb
- (FileName: 'Airplane'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 254; Height: 101; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAirplane
- (FileName: 'amAirplane'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAmAirplane
- (FileName: 'amGirder'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 160; Height:160; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAmGirder
- (FileName: 'hhMask'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHHTelepMask
- (FileName: 'Switch'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSwitch
- (FileName: 'Parachute'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprParachute
- (FileName: 'Target'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTarget
- (FileName: 'RopeNode'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 6; Height: 6; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprRopeNode
- (FileName: 'thinking'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprQuestion
- (FileName: 'PowerBar'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 256; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPowerBar
- (FileName: 'WindBar'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 151; Height: 17; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindBar
- (FileName: 'WindL'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindL
- (FileName: 'WindR'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindR
- (FileName: 'Flake'; Path:ptCurrTheme; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFlake
- (FileName: 'amRope'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandRope
- (FileName: 'amBazooka'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBazooka
- (FileName: 'amShotgun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandShotgun
- (FileName: 'amDEagle'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandDEagle
- (FileName:'amAirAttack'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandAirAttack
- (FileName: 'amBaseball'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBaseball
- (FileName: 'Hammer'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPHammer
- (FileName: 'amBTorch_i'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBlowTorch
- (FileName: 'amBTorch_w'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBlowTorch
- (FileName: 'Teleport'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTeleport
- (FileName: 'HHDeath'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprHHDeath
- (FileName:'amShotgun_w'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprShotgun
- (FileName: 'amDEagle_w'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprDEagle
- (FileName: 'Idle'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprHHIdle
- (FileName: 'Mortar'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMortar
- (FileName: 'TurnsLeft'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTurnsLeft
- (FileName: 'amKamikaze'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 256; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprKamikaze
- (FileName: 'amWhip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWhip
- (FileName: 'Kowtow'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprKowtow
- (FileName: 'Sad'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprSad
- (FileName: 'Wave'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprWave
- (FileName: 'Hurrah'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprHurrah
- (FileName:'ILoveLemonade';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprLemonade
- (FileName: 'Shrug'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprShrug
- (FileName: 'Juggle'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprJuggle
- (FileName: 'ExplPart'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplPart
- (FileName: 'ExplPart2'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplPart2
- (FileName: 'Cake_walk'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCakeWalk
- (FileName: 'Cake_down'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCakeDown
- (FileName: 'Ammos_bw'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprAMAmmosBW
- (FileName: 'Watermelon'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWatermelon
- (FileName: 'EvilTrace'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprEvilTrace
- (FileName:'HellishBomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHellishBomb
- (FileName: 'Seduction'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSeduction
- (FileName: 'HHDress'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprDress
- (FileName: 'Censored'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprCensored
- (FileName: 'Drill'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprDrill
- (FileName: 'amDrill'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandDrill
- (FileName: 'amBallgun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBallgun
- (FileName: 'Balls'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 20; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprBalls
- (FileName: 'RCPlane'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPlane
- (FileName: 'amRCPlane'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandPlane
- (FileName: 'Utility'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprUtility
- (FileName:'Invulnerable';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprInvulnerable
- (FileName: 'Vampiric'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprVampiric
- (FileName: 'amGirder'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 512; Height:512; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprGirder
- (FileName:'SpeechCorner';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 12; Height: 9; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprSpeechCorner
- (FileName: 'SpeechEdge'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 25; Height: 9; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprSpeechEdge
- (FileName: 'SpeechTail'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 25; Height: 26; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprSpeechTail
- (FileName:'ThoughtCorner';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 49; Height: 37; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprThoughtCorner
- (FileName:'ThoughtEdge'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 23; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprThoughtEdge
- (FileName:'ThoughtTail'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 45; Height: 65; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprThoughtTail
- (FileName:'ShoutCorner'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 34; Height: 23; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprShoutCorner
- (FileName: 'ShoutEdge'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 30; Height: 20; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprShoutEdge
- (FileName: 'ShoutTail'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 30; Height: 37; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprShoutTail
- (FileName:'amSniperRifle';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSniperRifle
- (FileName: 'Bubbles'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprBubbles
- (FileName: 'amJetpack'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprJetpack
- (FileName: 'Health'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprHealth
- (FileName: 'amMolotov'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),//sprHandMolotov
- (FileName: 'Molotov'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMolotov
- (FileName: 'Smoke'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 22; Height: 22; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSmoke
- (FileName: 'SmokeWhite'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 22; Height: 22; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSmokeWhite
- (FileName: 'Shells'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprShell
- (FileName: 'Dust'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
- Width: 22; Height: 22; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprDust
- (FileName: 'Explosives'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplosives
- (FileName: 'ExplosivesRoll'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplosivesRoll
- (FileName: 'amTeleport'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAmTeleport
- (FileName: 'Splash'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
- Width: 80; Height: 50; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSplash
- (FileName: 'Droplet'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprDroplet
- (FileName: 'Birdy'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 75; Height: 75; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBirdy
- (FileName: 'amCake'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandCake
- (FileName: 'amConstruction'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandConstruction
- (FileName: 'amGrenade'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandGrenade
- (FileName: 'amMelon'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandMelon
- (FileName: 'amMortar'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandMortar
- (FileName: 'amSkip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSkip
- (FileName: 'amCluster'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandCluster
- (FileName: 'amDynamite'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandDynamite
- (FileName: 'amHellish'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandHellish
- (FileName: 'amMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandMine
- (FileName: 'amSeduction'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSeduction
- (FileName: 'amVamp'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandVamp
- (FileName: 'BigExplosion'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 385; Height: 385; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBigExplosion
- (FileName: 'SmokeRing'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 200; Height: 200; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSmokeRing
- (FileName: 'BeeTrace'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprBeeTrace
- (FileName: 'Egg'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprEgg
- (FileName: 'TargetBee'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTargetBee
- (FileName: 'amBee'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBee
- (FileName: 'Feather'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 15; Height: 25; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFeather
- (FileName: 'Piano'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPiano
- (FileName: 'amSineGun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSineGun
- (FileName: 'amPortalGun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPortalGun
- (FileName: 'Portal'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPortal
- (FileName: 'cheese'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCheese
- (FileName: 'amCheese'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandCheese
- (FileName: 'amFlamethrower'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandFlamethrower
- (FileName: 'Chunk'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprChunk
- (FileName: 'Note'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprNote
- (FileName: 'SMineOff'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSMineOff
- (FileName: 'SMineOn'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSMineOn
- (FileName: 'amSMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSMine
- (FileName: 'amHammer'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 128; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true), // sprWhip
- (FileName: 'amResurrector'; Path: ptHedgehog; AltPath: ptNone;
- Texture: nil; Surface: nil; Width: 32; Height: 32;
- imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
- tpMedium; getDimensions: false; getImageDimensions: true),
- //sprHandResurrector
- (FileName: 'Cross'; Path: ptGraphics; altPath: ptNone;
- Texture: nil; Surface: nil; Width: 108; Height: 138;
- imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
- tpMedium; getDimensions: false; getImageDimensions: true),
- //sprCross
- (FileName: 'AirDrill'; Path: ptGraphics; AltPath: ptNone;
- Texture: nil; Surface: nil; Width: 16; Height: 16;
- imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
- tpMedium; getDimensions: false; getImageDimensions: true),
- // sprAirDrill
- (FileName: 'NapalmBomb'; Path: ptGraphics; AltPath: ptNone;
- Texture: nil; Surface: nil; Width: 16; Height: 16;
- imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
- tpMedium; getDimensions: false; getImageDimensions: true),
- // sprNapalmBomb
- (FileName: 'BulletHit'; Path: ptGraphics; AltPath: ptNone;
- Texture: nil; Surface: nil; Width: 32; Height: 32;
- imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
- tpMedium; getDimensions: false; getImageDimensions: true)
- // sprNapalmBomb
- );
-
-
- Wavez: array [TWave] of record
- Sprite: TSprite;
- FramesCount: Longword;
- Interval: Longword;
- cmd: String[20];
- Voice: TSound;
- VoiceDelay: LongWord;
- end = (
- (Sprite: sprKowtow; FramesCount: 12; Interval: 125; cmd: '/rollup'; Voice: sndNone; VoiceDelay: 0),
- (Sprite: sprSad; FramesCount: 14; Interval: 125; cmd: '/sad'; Voice: sndNone; VoiceDelay: 0),
- (Sprite: sprWave; FramesCount: 16; Interval: 125; cmd: '/wave'; Voice: sndHello; VoiceDelay: 5),
- (Sprite: sprHurrah; FramesCount: 14; Interval: 125; cmd: '/hurrah'; Voice: sndNone; VoiceDelay: 0),
- (Sprite: sprLemonade; FramesCount: 24; Interval: 125; cmd: '/ilovelotsoflemonade'; Voice: sndNone; VoiceDelay: 0),
- (Sprite: sprShrug; FramesCount: 24; Interval: 125; cmd: '/shrug'; Voice: sndNone; VoiceDelay: 0),
- (Sprite: sprJuggle; FramesCount: 49; Interval: 38; cmd: '/juggle'; Voice: sndNone; VoiceDelay: 0)
- );
-
- Soundz: array[TSound] of record
- FileName: String[25];
- Path : TPathType;
- end = (
- (FileName: ''; Path: ptNone ),// sndNone
- (FileName: 'grenadeimpact.ogg'; Path: ptSounds),// sndGrenadeImpact
- (FileName: 'explosion.ogg'; Path: ptSounds),// sndExplosion
- (FileName: 'throwpowerup.ogg'; Path: ptSounds),// sndThrowPowerUp
- (FileName: 'throwrelease.ogg'; Path: ptSounds),// sndThrowRelease
- (FileName: 'splash.ogg'; Path: ptSounds),// sndSplash
- (FileName: 'shotgunreload.ogg'; Path: ptSounds),// sndShotgunReload
- (FileName: 'shotgunfire.ogg'; Path: ptSounds),// sndShotgunFire
- (FileName: 'graveimpact.ogg'; Path: ptSounds),// sndGraveImpact
- (FileName: 'minetick.ogg'; Path: ptSounds),// sndMineTicks
- (FileName: 'pickhammer.ogg'; Path: ptSounds),// sndPickhammer
- (FileName: 'gun.ogg'; Path: ptSounds),// sndGun
- (FileName: 'bee.ogg'; Path: ptSounds),// sndBee
- (FileName: 'Jump1.ogg'; Path: ptVoices),// sndJump1
- (FileName: 'Jump2.ogg'; Path: ptVoices),// sndJump2
- (FileName: 'Jump3.ogg'; Path: ptVoices),// sndJump3
- (FileName: 'Yessir.ogg'; Path: ptVoices),// sndYesSir
- (FileName: 'Laugh.ogg'; Path: ptVoices),// sndLaugh
- (FileName: 'Illgetyou.ogg'; Path: ptVoices),// sndIllGetYou
- (FileName: 'Incoming.ogg'; Path: ptVoices),// sndIncoming
- (FileName: 'Missed.ogg'; Path: ptVoices),// sndMissed
- (FileName: 'Stupid.ogg'; Path: ptVoices),// sndStupid
- (FileName: 'Firstblood.ogg'; Path: ptVoices),// sndFirstBlood
- (FileName: 'Boring.ogg'; Path: ptVoices),// sndBoring
- (FileName: 'Byebye.ogg'; Path: ptVoices),// sndByeBye
- (FileName: 'Sameteam.ogg'; Path: ptVoices),// sndSameTeam
- (FileName: 'Nutter.ogg'; Path: ptVoices),// sndNutter
- (FileName: 'Reinforcements.ogg'; Path: ptVoices),// sndReinforce
- (FileName: 'Traitor.ogg'; Path: ptVoices),// sndTraitor
- (FileName: 'Youllregretthat.ogg'; Path: ptVoices),// sndRegret
- (FileName: 'Enemydown.ogg'; Path: ptVoices),// sndEnemyDown
- (FileName: 'Coward.ogg'; Path: ptVoices),// sndCoward
- (FileName: 'Hurry.ogg'; Path: ptVoices),// sndHurry
- (FileName: 'Watchit.ogg'; Path: ptVoices),// sndWatchIt
- (FileName: 'Kamikaze.ogg'; Path: ptVoices),// sndKamikaze
- (FileName: 'cake2.ogg'; Path: ptSounds),// sndCake
- (FileName: 'Ow1.ogg'; Path: ptVoices),// sndOw1
- (FileName: 'Ow2.ogg'; Path: ptVoices),// sndOw2
- (FileName: 'Ow3.ogg'; Path: ptVoices),// sndOw3
- (FileName: 'Ow4.ogg'; Path: ptVoices),// sndOw4
- (FileName: 'Firepunch1.ogg'; Path: ptVoices),// sndFirepunch1
- (FileName: 'Firepunch2.ogg'; Path: ptVoices),// sndFirepunch2
- (FileName: 'Firepunch3.ogg'; Path: ptVoices),// sndFirepunch3
- (FileName: 'Firepunch4.ogg'; Path: ptVoices),// sndFirepunch4
- (FileName: 'Firepunch5.ogg'; Path: ptVoices),// sndFirepunch5
- (FileName: 'Firepunch6.ogg'; Path: ptVoices),// sndFirepunch6
- (FileName: 'Melon.ogg'; Path: ptVoices),// sndMelon
- (FileName: 'Hellish.ogg'; Path: ptSounds),// sndHellish
- (FileName: 'Yoohoo.ogg'; Path: ptSounds),// sndYoohoo
- (FileName: 'rcplane.ogg'; Path: ptSounds),// sndRCPlane
- (FileName: 'whipcrack.ogg'; Path: ptSounds),// sndWhipCrack
- (FileName:'ride_of_the_valkyries.ogg'; Path: ptSounds),// sndRideOfTheValkyries
- (FileName: 'denied.ogg'; Path: ptSounds),// sndDenied
- (FileName: 'placed.ogg'; Path: ptSounds),// sndPlaced
- (FileName: 'baseballbat.ogg'; Path: ptSounds),// sndBaseballBat
- (FileName: 'steam.ogg'; Path: ptSounds),// sndVaporize
- (FileName: 'warp.ogg'; Path: ptSounds),// sndWarp
- (FileName: 'suddendeath.ogg'; Path: ptSounds),// sndSuddenDeath
- (FileName: 'mortar.ogg'; Path: ptSounds),// sndMortar
- (FileName: 'shutterclick.ogg'; Path: ptSounds),// sndShutter
- (FileName: 'homerun.ogg'; Path: ptSounds),// sndHomerun
- (FileName: 'molotov.ogg'; Path: ptSounds),// sndMolotov
- (FileName: 'Takecover.ogg'; Path: ptVoices),// sndCover
- (FileName: 'Uh-oh.ogg'; Path: ptVoices),// sndUhOh
- (FileName: 'Oops.ogg'; Path: ptVoices),// sndOops
- (FileName: 'Nooo.ogg'; Path: ptVoices),// sndNooo
- (FileName: 'Hello.ogg'; Path: ptVoices),// sndHello
- (FileName: 'ropeshot.ogg'; Path: ptSounds),// sndRopeShot
- (FileName: 'ropeattach.ogg'; Path: ptSounds),// sndRopeAttach
- (FileName: 'roperelease.ogg'; Path: ptSounds),// sndRopeRelease
- (FileName: 'switchhog.ogg'; Path: ptSounds),// sndSwitchHog
- (FileName: 'victory.ogg'; Path: ptVoices),// sndVictory
- (FileName: 'sniperreload.ogg'; Path: ptSounds),// sndSniperReload
- (FileName: 'steps.ogg'; Path: ptSounds),// sndSteps
- (FileName: 'lowgravity.ogg'; Path: ptSounds),// sndLowGravity
- (FileName: 'hell_growl.ogg'; Path: ptSounds),// sndHellishImpact1
- (FileName: 'hell_ooff.ogg'; Path: ptSounds),// sndHellishImpact2
- (FileName: 'hell_ow.ogg'; Path: ptSounds),// sndHellishImpact3
- (FileName: 'hell_ugh.ogg'; Path: ptSounds),// sndHellishImpact4
- (FileName: 'melonimpact.ogg'; Path: ptSounds),// sndMelonImpact
- (FileName: 'Droplet1.ogg'; Path: ptSounds),// sndDroplet1
- (FileName: 'Droplet2.ogg'; Path: ptSounds),// sndDroplet2
- (FileName: 'Droplet3.ogg'; Path: ptSounds),// sndDroplet3
- (FileName: 'egg.ogg'; Path: ptSounds),// sndEggBreak
- (FileName: 'drillgun.ogg'; Path: ptSounds),// sndDrillRocket
- (FileName: 'PoisonCough.ogg'; Path: ptVoices),// sndPoisonCough
- (FileName: 'PoisonMoan.ogg'; Path: ptVoices),// sndPoisonMoan
- (FileName: 'BirdyLay.ogg'; Path: ptSounds),// sndBirdyLay
- (FileName: 'Whistle.ogg'; Path: ptSounds),// sndWhistle
- (FileName: 'beewater.ogg'; Path: ptSounds),// sndBeeWater
- (FileName: '1C.ogg'; Path: ptSounds),// sndPiano0
- (FileName: '2D.ogg'; Path: ptSounds),// sndPiano1
- (FileName: '3E.ogg'; Path: ptSounds),// sndPiano2
- (FileName: '4F.ogg'; Path: ptSounds),// sndPiano3
- (FileName: '5G.ogg'; Path: ptSounds),// sndPiano4
- (FileName: '6A.ogg'; Path: ptSounds),// sndPiano5
- (FileName: '7B.ogg'; Path: ptSounds),// sndPiano6
- (FileName: '8C.ogg'; Path: ptSounds),// sndPiano7
- (FileName: '9D.ogg'; Path: ptSounds),// sndPiano8
- (FileName: 'skip.ogg'; Path: ptSounds),// sndSkip
- (FileName: 'shotgunfire.ogg'; Path: ptSounds),// sndSineGun
- (FileName: 'Ooff1.ogg'; Path: ptVoices),// sndOoff1
- (FileName: 'Ooff2.ogg'; Path: ptVoices),// sndOoff2
- (FileName: 'Ooff3.ogg'; Path: ptVoices),// sndOoff3
- (FileName: 'whipcrack.ogg'; Path: ptSounds),// sndWhack
- (FileName: 'Comeonthen.ogg'; Path: ptVoices),// sndComeonthen
- (FileName: 'parachute.ogg'; Path: ptSounds),// sndParachute
- (FileName: 'bump.ogg'; Path: ptSounds),// sndBump
- (FileName: 'hogchant3.ogg'; Path: ptSounds) // sndResurrector
- );
-
- Ammoz: array [TAmmoType] of record
- NameId: TAmmoStrId;
- NameTex: PTexture;
- Probability, NumberInCase: Longword;
- Ammo: TAmmo;
- Slot: 0..cMaxSlotIndex;
- TimeAfterTurn: Longword;
- minAngle, maxAngle: Longword;
- isDamaging: boolean;
- SkipTurns: Longword;
- PosCount: Longword;
- PosSprite: TSprite;
- ejectX, ejectY: Longint;
- end = (
- (NameId: sidNothing;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 0;
- Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_DontHold or ammoprop_Effect;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amNothing;
- AttackVoice: sndNone);
- Slot: 0;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 9999;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Grenade
- (NameId: sidGrenade;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 3000;
- Pos: 0;
- AmmoType: amGrenade;
- AttackVoice: sndCover);
- Slot: 1;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// ClusterBomb
- (NameId: sidClusterBomb;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 3;
- Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse;
- Count: 5;
- NumPerTurn: 0;
- Timer: 3000;
- Pos: 0;
- AmmoType: amClusterBomb;
- AttackVoice: sndCover);
- Slot: 1;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Bazooka
- (NameId: sidBazooka;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_Power or ammoprop_AltUse;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amBazooka;
- AttackVoice: sndNone);
- Slot: 0;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0; //20;
- ejectY: -6),
-
-// Bee
- (NameId: sidBee;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_Power or ammoprop_NeedTarget or ammoprop_DontHold;
- Count: 2;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amBee;
- AttackVoice: sndNone);
- Slot: 0;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0; //16;
- ejectY: 0),
-
-// Shotgun
- (NameId: sidShotgun;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs;
- Count: AMMO_INFINITE;
- NumPerTurn: 1;
- Timer: 0;
- Pos: 0;
- AmmoType: amShotgun;
- AttackVoice: sndNone);
- Slot: 2;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0; //26;
- ejectY: -6),
-
-// PickHammer
- (NameId: sidPickHammer;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_AttackInMove or ammoprop_NoCrosshair or ammoprop_DontHold;
- Count: 2;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amPickHammer;
- AttackVoice: sndNone);
- Slot: 6;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Skip
- (NameId: sidSkip;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_DontHold;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amSkip;
- AttackVoice: sndNone);
- Slot: 9;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Rope
- (NameId: sidRope;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 3;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_ForwMsgs or
- ammoprop_AttackInMove or
- ammoprop_Utility or
- ammoprop_AltAttack;
- Count: 5;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amRope;
- AttackVoice: sndNone);
- Slot: 7;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: cMaxAngle div 2;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Mine
- (NameId: sidMine;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_AttackInMove or ammoprop_DontHold or ammoprop_AltUse;
- Count: 2;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amMine;
- AttackVoice: sndLaugh);
- Slot: 4;
- TimeAfterTurn: 5000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// DEagle
- (NameId: sidDEagle;
- NameTex: nil;
- Probability: 20;
- NumberInCase: 2;
- Ammo: (Propz: 0;
- Count: 3;
- NumPerTurn: 3;
- Timer: 0;
- Pos: 0;
- AmmoType: amDEagle;
- AttackVoice: sndNone);
- Slot: 2;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0; //23;
- ejectY: -6),
-
-// Dynamite
- (NameId: sidDynamite;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_AttackInMove or ammoprop_DontHold or ammoprop_AltUse;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amDynamite;
- AttackVoice: sndLaugh);
- Slot: 4;
- TimeAfterTurn: 5000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// FirePunch
- (NameId: sidFirePunch;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_ForwMsgs or ammoprop_AttackInMove;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amFirePunch;
- AttackVoice: sndNone);
- Slot: 3;
- TimeAfterTurn: 3000;
- MinAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Whip
- (NameId: sidWhip;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amWhip;
- AttackVoice: sndNone);
- Slot: 3;
- TimeAfterTurn: 3000;
- MinAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// BaseballBat
- (NameId: sidBaseballBat;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_DontHold;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amBaseballBat;
- AttackVoice: sndNone);
- Slot: 3;
- TimeAfterTurn: 5000;
- minAngle: 0;
- maxAngle: cMaxAngle div 2;
- isDamaging: true;
- SkipTurns: 2;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Parachute
- (NameId: sidParachute;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_ForwMsgs or
- ammoprop_AttackInMove or
- ammoprop_NoCrosshair or
- ammoprop_DontHold or
- ammoprop_Utility or
- ammoprop_AltAttack;
- Count: 2;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amParachute;
- AttackVoice: sndNone);
- Slot: 7;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// AirAttack
- (NameId: sidAirAttack;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or
- ammoprop_NeedTarget or
- ammoprop_AttackingPut or
- ammoprop_DontHold or
- ammoprop_NotBorder;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amAirAttack;
- AttackVoice: sndIncoming);
- Slot: 5;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 5;
- PosCount: 2;
- PosSprite: sprAmAirplane;
- ejectX: 0;
- ejectY: 0),
-
-// MineStrike
- (NameId: sidMineStrike;
- NameTex: nil;
- Probability: 200;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or
- ammoprop_NeedTarget or
- ammoprop_AttackingPut or
- ammoprop_DontHold or
- ammoprop_NotBorder;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amMineStrike;
- AttackVoice: sndIncoming);
- Slot: 5;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 5;
- PosCount: 2;
- PosSprite: sprAmAirplane;
- ejectX: 0;
- ejectY: 0),
-
-// BlowTorch
- (NameId: sidBlowTorch;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 2;
- Ammo: (Propz: ammoprop_ForwMsgs;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amBlowTorch;
- AttackVoice: sndNone);
- Slot: 6;
- TimeAfterTurn: 3000;
- minAngle: 768;
- maxAngle: 1280;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Girder
- (NameId: sidGirder;
- NameTex: nil;
- Probability: 150;
- NumberInCase: 3;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_NoCrosshair or
- ammoprop_NeedTarget or
- ammoprop_Utility or
- ammoprop_AttackingPut;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amGirder;
- AttackVoice: sndNone);
- Slot: 6;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 8;
- PosSprite: sprAmGirder;
- ejectX: 0;
- ejectY: 0),
-
-// Teleport
- (NameId: sidTeleport;
- NameTex: nil;
- Probability: 200;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs or
- ammoprop_NoCrosshair or
- ammoprop_NeedTarget or
- ammoprop_AttackingPut or
- ammoprop_Utility or
- ammoprop_DontHold;
- Count: 2;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amTeleport;
- AttackVoice: sndNone);
- Slot: 7;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 2;
- PosSprite: sprAmTeleport;
- ejectX: 0;
- ejectY: 0),
-
-// Switch
- (NameId: sidSwitch;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_ForwMsgs or
- ammoprop_NoCrosshair or
- ammoprop_Utility or
- ammoprop_DontHold;
- Count: 3;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amSwitch;
- AttackVoice: sndNone);
- Slot: 9;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Mortar
- (NameId: sidMortar;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 4;
- Ammo: (Propz: 0;
- Count: 4;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amMortar;
- AttackVoice: sndNone);
- Slot: 0;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0; //20;
- ejectY: -6),
-
-// Kamikaze
- (NameId: sidKamikaze;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold or ammoprop_AttackInMove;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amKamikaze;
- AttackVoice: sndNone);
- Slot: 3;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Cake
- (NameId: sidCake;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_NoCrosshair or ammoprop_DontHold;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amCake;
- AttackVoice: sndLaugh);
- Slot: 4;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 4;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Seduction
- (NameId: sidSeduction;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amSeduction;
- AttackVoice: sndNone);
- Slot: 3;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Watermelon
- (NameId: sidWatermelon;
- NameTex: nil;
- Probability: 400;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse;
- Count: 0;
- NumPerTurn: 0;
- Timer: 3000;
- Pos: 0;
- AmmoType: amWatermelon;
- AttackVoice: sndMelon);
- Slot: 1;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// HellishBomb ("Hellish Hand-Grenade")
- (NameId: sidHellishBomb;
- NameTex: nil;
- Probability: 400;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_Power or ammoprop_AltUse;
- Count: 0;
- NumPerTurn: 0;
- Timer: 5000;
- Pos: 0;
- AmmoType: amHellishBomb;
- AttackVoice: sndNone);
- Slot: 1;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Napalm
- (NameId: sidNapalm;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or
- ammoprop_NeedTarget or
- ammoprop_AttackingPut or
- ammoprop_DontHold or
- ammoprop_NotBorder;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amNapalm;
- AttackVoice: sndIncoming);
- Slot: 5;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 7;
- PosCount: 2;
- PosSprite: sprAmAirplane;
- ejectX: 0;
- ejectY: 0),
-
-// Drill ("Drill Rocket")
- (NameId: sidDrill;
- NameTex: nil;
- Probability: 300;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_Power or ammoprop_AltUse;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amDrill;
- AttackVoice: sndNone);
- Slot: 0;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprDrill;
- ejectX: 0; //20;
- ejectY: -6),
-
-// Ballgun
- (NameId: sidBallgun;
- NameTex: nil;
- Probability: 400;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 5001;
- Pos: 0;
- AmmoType: amBallgun;
- AttackVoice: sndNone);
- Slot: 4;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0; //20;
- ejectY: -3),
-
-// RC-Plane
- (NameId: sidRCPlane;
- NameTex: nil;
- Probability: 200;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs{ or
- ammoprop_DontHold or
- ammoprop_AltAttack};
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amRCPlane;
- AttackVoice: sndNone);
- Slot: 4;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 4;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// LowGravity
- (NameId: sidLowGravity;
- NameTex: nil;
- Probability: 20;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_NoCrosshair or
- ammoprop_DontHold or
- ammoprop_AltUse or
- ammoprop_Utility or
- ammoprop_Effect;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amLowGravity;
- AttackVoice: sndNone);
- Slot: 9;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// ExtraDamage
- (NameId: sidExtraDamage;
- NameTex: nil;
- Probability: 15;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_NoCrosshair or
- ammoprop_DontHold or
- ammoprop_AltUse or
- ammoprop_Utility or
- ammoprop_Effect;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amExtraDamage;
- AttackVoice: sndNone);
- Slot: 9;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Invulnerable
- (NameId: sidInvulnerable;
- NameTex: nil;
- Probability: 20;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_NoCrosshair or
- ammoprop_DontHold or
- ammoprop_AltUse or
- ammoprop_Utility or
- ammoprop_Effect;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amInvulnerable;
- AttackVoice: sndNone);
- Slot: 8;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// ExtraTime
- (NameId: sidExtraTime;
- NameTex: nil;
- Probability: 30;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_NoCrosshair or
- ammoprop_DontHold or
- ammoprop_AltUse or
- ammoprop_Utility or
- ammoprop_Effect;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amExtraTime;
- AttackVoice: sndNone);
- Slot: 9;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// LaserSight
- (NameId: sidLaserSight;
- NameTex: nil;
- Probability: 15;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_NoCrosshair or
- ammoprop_DontHold or
- ammoprop_AltUse or
- ammoprop_Utility or
- ammoprop_Effect;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amLaserSight;
- AttackVoice: sndNone);
- Slot: 8;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Vampiric
- (NameId: sidVampiric;
- NameTex: nil;
- Probability: 15;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_NoCrosshair or
- ammoprop_DontHold or
- ammoprop_AltUse or
- ammoprop_Utility or
- ammoprop_Effect;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amVampiric;
- AttackVoice: sndNone);
- Slot: 8;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// SniperRifle
- (NameId: sidSniperRifle;
- NameTex: nil;
- Probability: 20;
- NumberInCase: 2;
- Ammo: (Propz: 0;
- Count: 2;
- NumPerTurn: 1;
- Timer: 0;
- Pos: 0;
- AmmoType: amSniperRifle;
- AttackVoice: sndNone);
- Slot: 2;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0; //40;
- ejectY: -5),
-
-// Jetpack ("Flying Saucer")
- (NameId: sidJetpack;
- NameTex: nil;
- Probability: 20;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_ForwMsgs or
- ammoprop_AttackInMove or
- ammoprop_NoCrosshair or
- ammoprop_DontHold or
- ammoprop_Utility or
- ammoprop_AltAttack;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amJetpack;
- AttackVoice: sndNone);
- Slot: 7;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Molotov
- (NameId: sidMolotov;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_Power or ammoprop_AltUse;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 3000;
- Pos: 0;
- AmmoType: amMolotov;
- AttackVoice: sndNone);
- Slot: 1;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Birdy
- (NameId: sidBirdy;
- NameTex: nil;
- Probability: 20;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs or
- ammoprop_NoCrosshair or
- ammoprop_DontHold;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amBirdy;
- AttackVoice: sndNone);
- Slot: 7;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// PortalGun
- (NameId: sidPortalGun;
- NameTex: nil;
- Probability: 20;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoRoundEnd or
- ammoprop_AttackInMove or
- ammoprop_DontHold or
- ammoprop_Utility;
- Count: 1;
- NumPerTurn: 3;
- Timer: 0;
- Pos: 0;
- AmmoType: amPortalGun;
- AttackVoice: sndNone);
- Slot: 6;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: false;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: -5; //29;
- ejectY: -7),
-
-// Piano
- (NameId: sidPiano;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or
- ammoprop_NeedTarget or
- ammoprop_AttackingPut or
- ammoprop_DontHold or
- ammoprop_NotBorder;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amPiano;
- AttackVoice: sndIncoming);
- Slot: 5;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 7;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// GasBomb
- (NameId: sidGasBomb;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse;
- Count: AMMO_INFINITE;
- NumPerTurn: 0;
- Timer: 3000;
- Pos: 0;
- AmmoType: amGasBomb;
- AttackVoice: sndCover);
- Slot: 1;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// SineGun
- (NameId: sidSineGun;
- NameTex: nil;
- Probability: 20;
- NumberInCase: 2;
- Ammo: (Propz: ammoprop_AttackInMove;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amSineGun;
- AttackVoice: sndNone);
- Slot: 2;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Flamethrower
- (NameId: sidFlamethrower;
- NameTex: nil;
- Probability: 20;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold;
- Count: 1;
- NumPerTurn: 0;
- Timer: 5001;
- Pos: 0;
- AmmoType: amFlamethrower;
- AttackVoice: sndNone);
- Slot: 2;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0; //20;
- ejectY: -3),
-
-// Sticky Mine
- (NameId: sidSMine;
- NameTex: nil;
- Probability: 100;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_Power; //FIXME: enable multishoot at altuse, until then removed ammoprop_AltUse
- Count: 1;
- NumPerTurn: 1;
- Timer: 0;
- Pos: 0;
- AmmoType: amSMine;
- AttackVoice: sndLaugh);
- Slot: 4;
- TimeAfterTurn: 5000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Hammer
- (NameId: sidHammer;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amHammer;
- AttackVoice: sndNone);
- Slot: 3;
- TimeAfterTurn: 1000;
- MinAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// Ressurrector
- (NameId: sidResurrector;
- NameTex: nil;
- Probability: 0;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or
- ammoprop_Utility or
- ammoprop_NoRoundEnd;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amResurrector;
- AttackVoice: sndNone);
- Slot: 8;
- TimeAfterTurn: 3000;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 0;
- PosCount: 1;
- PosSprite: sprWater;
- ejectX: 0;
- ejectY: 0),
-
-// DrillStrike
- (NameId: sidDrillStrike;
- NameTex: nil;
- Probability: 200;
- NumberInCase: 1;
- Ammo: (Propz: ammoprop_NoCrosshair or
- ammoprop_NeedTarget or
- ammoprop_AttackingPut or
- ammoprop_DontHold or
- ammoprop_NotBorder;
- Count: 1;
- NumPerTurn: 0;
- Timer: 0;
- Pos: 0;
- AmmoType: amDrillStrike;
- AttackVoice: sndIncoming);
- Slot: 5;
- TimeAfterTurn: 0;
- minAngle: 0;
- maxAngle: 0;
- isDamaging: true;
- SkipTurns: 6;
- PosCount: 2;
- PosSprite: sprAmAirplane;
- ejectX: 0;
- ejectY: 0)
- );
-
-
-
- conversionFormat: TSDL_PixelFormat = (
- palette: nil;
- BitsPerPixel : 32;
- BytesPerPixel: 4;
- Rloss : 0;
- Gloss : 0;
- Bloss : 0;
- Aloss : 0;
-{$IFDEF ENDIAN_LITTLE}
- Rshift: 0;
- Gshift: 8;
- Bshift: 16;
- Ashift: 24;
-{$ELSE}
- Rshift: 24;
- Gshift: 16;
- Bshift: 8;
- Ashift: 0;
-{$ENDIF}
- RMask : RMask;
- GMask : GMask;
- BMask : BMask;
- AMask : AMask;
- colorkey: 0;
- alpha : 255
- );
implementation
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uDebug.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,35 @@
+{$INCLUDE "options.inc"}
+
+unit uDebug;
+
+interface
+
+procedure OutError(Msg: shortstring; isFatalError: boolean);
+procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean); inline;
+procedure SDLTry(Assert: boolean; isFatal: boolean);
+
+implementation
+uses SDLh, uConsole, uCommands;
+
+procedure OutError(Msg: shortstring; isFatalError: boolean);
+begin
+WriteLnToConsole(Msg);
+if isFatalError then
+ begin
+ ParseCommand('fatal ' + GetLastConsoleLine, true);
+ SDL_Quit;
+ halt(1)
+ end
+end;
+
+procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean);
+begin
+if not Assert then OutError(Msg, isFatal)
+end;
+
+procedure SDLTry(Assert: boolean; isFatal: boolean);
+begin
+if not Assert then OutError(SDL_GetError, isFatal)
+end;
+
+end.
\ No newline at end of file
--- a/hedgewars/uFloat.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uFloat.pas Tue Nov 30 22:46:47 2010 +0100
@@ -62,6 +62,7 @@
function AngleSin(const Angle: Longword): hwFloat;
function AngleCos(const Angle: Longword): hwFloat;
function SignAs(const num, signum: hwFloat): hwFloat; inline;
+function hwSign(r: hwFloat): LongInt; inline;
{$IFDEF FPC}
{$J-}
@@ -147,7 +148,7 @@
{$ENDIF}
implementation
-//uses uMisc;
+uses uSinTable;
{$IFDEF FPC}
@@ -342,7 +343,12 @@
SignAs.isNegative:= signum.isNegative
end;
-{$INCLUDE "SinTable.inc"}
+function hwSign(r: hwFloat): LongInt;
+begin
+// yes, we have negative zero for a reason
+if r.isNegative then hwSign:= -1 else hwSign:= 1
+end;
+
function AngleSin(const Angle: Longword): hwFloat;
begin
--- a/hedgewars/uGame.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uGame.pas Tue Nov 30 22:46:47 2010 +0100
@@ -26,7 +26,7 @@
////////////////////
implementation
////////////////////
-uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript, uSound, uMobile, uVisualGears;
+uses uKeys, uTeams, uIO, uAI, uGears, uScript, uSound, uMobile, uVisualGears, uTypes, uVariables;
procedure DoGameTick(Lag: LongInt);
var i: LongInt;
@@ -45,7 +45,6 @@
i:= 1;
while (GameState <> gsExit) and (i <= Lag) do
begin
- ScriptCall('onGameTick');
if not CurrentTeam^.ExtDriven then
begin
if CurrentHedgehog^.BotLevel <> 0 then ProcessBot;
--- a/hedgewars/uGears.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uGears.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,63 +20,7 @@
unit uGears;
interface
-uses SDLh, uConsts, uFloat, Math;
-
-
-type
- PGear = ^TGear;
- TGearStepProcedure = procedure (Gear: PGear);
- TGear = record
- NextGear, PrevGear: PGear;
- Active: Boolean;
- AdvBounce: Longword;
- Invulnerable: Boolean;
- RenderTimer: Boolean;
- AmmoType : TAmmoType;
- State : Longword;
- X : hwFloat;
- Y : hwFloat;
- dX: hwFloat;
- dY: hwFloat;
- Kind: TGearType;
- Pos: Longword;
- doStep: TGearStepProcedure;
- Radius: LongInt;
- Angle, Power : Longword;
- DirAngle: real;
- Timer : LongWord;
- Elasticity: hwFloat;
- Friction : hwFloat;
- Message, MsgParam : Longword;
- Hedgehog: pointer;
- Health, Damage, Karma: LongInt;
- CollisionIndex: LongInt;
- Tag: LongInt;
- Tex: PTexture;
- Z: Longword;
- IntersectGear: PGear;
- FlightTime: Longword;
- uid: Longword;
- ImpactSound: TSound; // first sound, others have to be after it in the sounds def.
- nImpactSounds: Word; // count of ImpactSounds
- SoundChannel: LongInt;
- PortalCounter: LongWord // Hopefully temporary, but avoids infinite portal loops in a guaranteed fashion.
- end;
- TPGearArray = Array of PGear;
-
-var AllInactive: boolean;
- PrvInactive: boolean;
- CurAmmoGear: PGear;
- GearsList: PGear;
- KilledHHs: Longword;
- SuddenDeathDmg: Boolean;
- SpeechType: Longword;
- SpeechText: shortstring;
- TrainingTargetGear: PGear;
- skipFlag: boolean;
- PlacingHogs: boolean; // a convenience flag to indicate placement of hogs is still in progress
- StepSoundTimer: LongInt;
- StepSoundChannel: LongInt;
+uses SDLh, uConsts, uFloat, uTypes;
procedure initModule;
procedure freeModule;
@@ -97,24 +41,13 @@
procedure RemoveGearFromList(Gear: PGear);
function ModifyDamage(dmg: Longword; Gear: PGear): Longword;
procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt);
-function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
-function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
+
implementation
-uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, uLand, uIO, uLandGraphics,
- uAIMisc, uLocale, uAI, uAmmos, uStats, uVisualGears, uScript, GLunit, uMobile;
+uses uStore, uSound, uTeams, uRandom, uCollisions, uIO, uLandGraphics,
+ uAIMisc, uLocale, uAI, uAmmos, uStats, uVisualGears, uScript, GLunit, uMobile, uVariables,
+ uCommands, uUtils, uTextures, uRenderUtils, uGearsRender, uCaptions, uDebug;
-const MAXROPEPOINTS = 384;
-var RopePoints: record
- Count: Longword;
- HookAngle: GLfloat;
- ar: array[0..MAXROPEPOINTS] of record
- X, Y: hwFloat;
- dLen: hwFloat;
- b: boolean;
- end;
- rounded: array[0..MAXROPEPOINTS + 2] of TVertex2f;
- end;
procedure DeleteGear(Gear: PGear); forward;
procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); forward;
@@ -133,22 +66,6 @@
procedure HHSetWeapon(Gear: PGear); forward;
procedure doStepCase(Gear: PGear); forward;
-function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
-begin
- if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
- GetLaunchX:= sign(dir) * (8 + hwRound(AngleSin(angle) * Ammoz[at].ejectX) + hwRound(AngleCos(angle) * Ammoz[at].ejectY))
- else
- GetLaunchX:= 0
-end;
-
-function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
-begin
- if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
- GetLaunchY:= hwRound(AngleSin(angle) * Ammoz[at].ejectY) - hwRound(AngleCos(angle) * Ammoz[at].ejectX) - 2
- else
- GetLaunchY:= 0
-end;
-
{$INCLUDE "GSHandlers.inc"}
{$INCLUDE "HHHandlers.inc"}
@@ -253,7 +170,7 @@
begin
tag:= AddVisualGear(hwRound(HHGear^.X), hwRound(HHGear^.Y), vgtHealthTag, dmg);
if (tag <> nil) then
- tag^.Hedgehog:= PHedgehog(HHGear^.Hedgehog); // the tag needs the tag to determine the text color
+ tag^.Hedgehog:= HHGear^.Hedgehog; // the tag needs the tag to determine the text color
AllInactive:= false;
HHGear^.Active:= true;
end;
@@ -323,8 +240,8 @@
gear^.Angle:= cMaxAngle div 2;
gear^.Z:= cHHZ;
if (GameFlags and gfAISurvival) <> 0 then
- if PHedgehog(gear^.Hedgehog)^.BotLevel > 0 then
- PHedgehog(gear^.Hedgehog)^.Effects[heResurrectable] := true;
+ if gear^.Hedgehog^.BotLevel > 0 then
+ gear^.Hedgehog^.Effects[heResurrectable] := true;
end;
gtShell: begin
gear^.Radius:= 4;
@@ -356,7 +273,7 @@
end;
gtRope: begin
gear^.Radius:= 3;
- gear^.Friction:= _450;
+ gear^.Friction:= _450 * _0_01 * cRopePercent;
RopePoints.Count:= 0;
end;
gtMine: begin
@@ -599,12 +516,12 @@
uStats.HedgehogDamaged(Gear)
end;
- team:= PHedgehog(Gear^.Hedgehog)^.Team;
+ team:= Gear^.Hedgehog^.Team;
if CurrentHedgehog^.Gear = Gear then
FreeActionsList; // to avoid ThinkThread on drawned gear
- PHedgehog(Gear^.Hedgehog)^.Gear:= nil;
- if PHedgehog(Gear^.Hedgehog)^.King then
+ Gear^.Hedgehog^.Gear:= nil;
+ if Gear^.Hedgehog^.King then
begin
// are there any other kings left? Just doing nil check. Presumably a mortally wounded king will get reaped soon enough
k:= false;
@@ -655,17 +572,17 @@
else
dec(Gear^.Health, dmg);
- if (PHedgehog(Gear^.Hedgehog)^.Team = CurrentTeam) and
+ if (Gear^.Hedgehog^.Team = CurrentTeam) and
(Gear^.Damage <> Gear^.Karma) and
- not PHedgehog(Gear^.Hedgehog)^.King and
- not PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] and
+ not Gear^.Hedgehog^.King and
+ not Gear^.Hedgehog^.Effects[hePoisoned] and
not SuddenDeathDmg then
Gear^.State:= Gear^.State or gstLoser;
spawnHealthTagForHH(Gear, dmg);
- RenderHealth(PHedgehog(Gear^.Hedgehog)^);
- RecountTeamHealth(PHedgehog(Gear^.Hedgehog)^.Team);
+ RenderHealth(Gear^.Hedgehog^);
+ RecountTeamHealth(Gear^.Hedgehog^.Team);
end;
if (not isInMultiShoot) then Gear^.Karma:= 0;
@@ -689,20 +606,20 @@
if Gear^.Kind = gtHedgehog then
begin
tmp:= 0;
- if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then
+ if Gear^.Hedgehog^.Effects[hePoisoned] then
begin
inc(tmp, ModifyDamage(5, Gear));
- if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth) // does not need a minimum check since <= 1 basically disables it
+ if (GameFlags and gfResetHealth) <> 0 then dec(Gear^.Hedgehog^.InitialHealth) // does not need a minimum check since <= 1 basically disables it
end;
if (TotalRounds > cSuddenDTurns - 1) then
begin
inc(tmp, cHealthDecrease);
- if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth, cHealthDecrease)
+ if (GameFlags and gfResetHealth) <> 0 then dec(Gear^.Hedgehog^.InitialHealth, cHealthDecrease)
end;
- if PHedgehog(Gear^.Hedgehog)^.King then
+ if Gear^.Hedgehog^.King then
begin
flag:= false;
- team:= PHedgehog(Gear^.Hedgehog)^.Team;
+ team:= Gear^.Hedgehog^.Team;
for i:= 0 to Pred(team^.HedgehogsNumber) do
if (team^.Hedgehogs[i].Gear <> nil) and
(not team^.Hedgehogs[i].King) and
@@ -711,7 +628,7 @@
if not flag then
begin
inc(tmp, 5);
- if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth, 5)
+ if (GameFlags and gfResetHealth) <> 0 then dec(Gear^.Hedgehog^.InitialHealth, 5)
end
end;
if tmp > 0 then
@@ -939,6 +856,7 @@
inc(hiTicks) // we do not recieve a message for this
end;
+ScriptCall('onGameTick');
inc(GameTicks)
end;
@@ -985,10 +903,10 @@
while t <> nil do
begin
t^.PortalCounter:= 0;
- if ((GameFlags and gfResetHealth) <> 0) and (t^.Kind = gtHedgehog) and (t^.Health < PHedgehog(t^.Hedgehog)^.InitialHealth) then
+ if ((GameFlags and gfResetHealth) <> 0) and (t^.Kind = gtHedgehog) and (t^.Health < t^.Hedgehog^.InitialHealth) then
begin
- t^.Health:= PHedgehog(t^.Hedgehog)^.InitialHealth;
- RenderHealth(PHedgehog(t^.Hedgehog)^);
+ t^.Health:= t^.Hedgehog^.InitialHealth;
+ RenderHealth(t^.Hedgehog^);
end;
t:= t^.NextGear
end;
@@ -1009,7 +927,7 @@
if (Gear^.Kind = gtHedgehog) and (Damage>=1) then
begin
HHHurt(Gear^.Hedgehog, Source);
- AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), Damage, PHedgehog(Gear^.Hedgehog)^.Team^.Clan^.Color);
+ AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), Damage, Gear^.Hedgehog^.Team^.Clan^.Color);
tmpDmg:= min(Damage, max(0,Gear^.Health-Gear^.Damage));
if (Gear <> CurrentHedgehog^.Gear) and (CurrentHedgehog^.Gear <> nil) and (tmpDmg >= 1) then
begin
@@ -1072,151 +990,21 @@
end
end;
-procedure DrawAltWeapon(Gear: PGear; sx, sy: LongInt);
+
+procedure DrawGears;
+var Gear: PGear;
+ x, y: LongInt;
begin
-with PHedgehog(Gear^.Hedgehog)^ do
+Gear:= GearsList;
+while Gear <> nil do
begin
- if not (((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) and ((Gear^.State and gstAttacked) = 0)) then
- exit;
- DrawTexture(sx + 16, sy + 16, ropeIconTex);
- DrawTextureF(SpritesData[sprAMAmmos].Texture, 0.75, sx + 30, sy + 30, ord(CurAmmoType) - 1, 1, 32, 32);
+ x:= hwRound(Gear^.X) + WorldDx;
+ y:= hwRound(Gear^.Y) + WorldDy;
+ RenderGear(Gear, x, y);
+ Gear:= Gear^.NextGear
end;
end;
-procedure DrawRopeLinesRQ(Gear: PGear);
-begin
-with RopePoints do
- begin
- rounded[Count].X:= hwRound(Gear^.X);
- rounded[Count].Y:= hwRound(Gear^.Y);
- rounded[Count + 1].X:= hwRound(PHedgehog(Gear^.Hedgehog)^.Gear^.X);
- rounded[Count + 1].Y:= hwRound(PHedgehog(Gear^.Hedgehog)^.Gear^.Y);
- end;
-
-if (RopePoints.Count > 0) or (Gear^.Elasticity.QWordValue > 0) then
- begin
- glDisable(GL_TEXTURE_2D);
- //glEnable(GL_LINE_SMOOTH);
-
- glPushMatrix;
-
- glTranslatef(WorldDx, WorldDy, 0);
-
- glLineWidth(4.0);
-
- Tint($C0, $C0, $C0, $FF);
-
- glVertexPointer(2, GL_FLOAT, 0, @RopePoints.rounded[0]);
- glDrawArrays(GL_LINE_STRIP, 0, RopePoints.Count + 2);
- Tint($FF, $FF, $FF, $FF);
-
- glPopMatrix;
-
- glEnable(GL_TEXTURE_2D);
- //glDisable(GL_LINE_SMOOTH)
- end
-end;
-
-procedure DrawRope(Gear: PGear);
-var roplen: LongInt;
- i: Longword;
-
- procedure DrawRopeLine(X1, Y1, X2, Y2: LongInt);
- var eX, eY, dX, dY: LongInt;
- i, sX, sY, x, y, d: LongInt;
- b: boolean;
- begin
- if (X1 = X2) and (Y1 = Y2) then
- begin
- //OutError('WARNING: zero length rope line!', false);
- exit
- end;
- eX:= 0;
- eY:= 0;
- dX:= X2 - X1;
- dY:= Y2 - Y1;
-
- if (dX > 0) then sX:= 1
- else
- if (dX < 0) then
- begin
- sX:= -1;
- dX:= -dX
- end else sX:= dX;
-
- if (dY > 0) then sY:= 1
- else
- if (dY < 0) then
- begin
- sY:= -1;
- dY:= -dY
- end else sY:= dY;
-
- if (dX > dY) then d:= dX
- else d:= dY;
-
- x:= X1;
- y:= Y1;
-
- for i:= 0 to d do
- begin
- inc(eX, dX);
- inc(eY, dY);
- b:= false;
- if (eX > d) then
- begin
- dec(eX, d);
- inc(x, sX);
- b:= true
- end;
- if (eY > d) then
- begin
- dec(eY, d);
- inc(y, sY);
- b:= true
- end;
- if b then
- begin
- inc(roplen);
- if (roplen mod 4) = 0 then DrawSprite(sprRopeNode, x - 2, y - 2, 0)
- end
- end
- end;
-begin
- if (cReducedQuality and rqSimpleRope) <> 0 then
- DrawRopeLinesRQ(Gear)
- else
- begin
- roplen:= 0;
- if RopePoints.Count > 0 then
- begin
- i:= 0;
- while i < Pred(RopePoints.Count) do
- begin
- DrawRopeLine(hwRound(RopePoints.ar[i].X) + WorldDx, hwRound(RopePoints.ar[i].Y) + WorldDy,
- hwRound(RopePoints.ar[Succ(i)].X) + WorldDx, hwRound(RopePoints.ar[Succ(i)].Y) + WorldDy);
- inc(i)
- end;
- DrawRopeLine(hwRound(RopePoints.ar[i].X) + WorldDx, hwRound(RopePoints.ar[i].Y) + WorldDy,
- hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy);
- DrawRopeLine(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy,
- hwRound(PHedgehog(Gear^.Hedgehog)^.Gear^.X) + WorldDx, hwRound(PHedgehog(Gear^.Hedgehog)^.Gear^.Y) + WorldDy);
- end else
- if Gear^.Elasticity.QWordValue > 0 then
- DrawRopeLine(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy,
- hwRound(PHedgehog(Gear^.Hedgehog)^.Gear^.X) + WorldDx, hwRound(PHedgehog(Gear^.Hedgehog)^.Gear^.Y) + WorldDy);
- end;
-
-
-if RopePoints.Count > 0 then
- DrawRotated(sprRopeHook, hwRound(RopePoints.ar[0].X) + WorldDx, hwRound(RopePoints.ar[0].Y) + WorldDy, 1, RopePoints.HookAngle)
- else
- if Gear^.Elasticity.QWordValue > 0 then
- DrawRotated(sprRopeHook, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
-end;
-
-{$INCLUDE "GearDrawing.inc"}
-
procedure FreeGearsList;
var t, tt: PGear;
begin
@@ -1349,7 +1137,7 @@
if Gear^.Kind <> gtFlame then FollowGear:= Gear
end;
if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) then
- PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] := true;
+ Gear^.Hedgehog^.Effects[hePoisoned] := true;
end;
end;
@@ -1473,7 +1261,7 @@
if (Gear^.Kind = gtExplosives) and (Ammo^.Kind = gtBlowtorch) then ApplyDamage(Gear, tmpDmg * 100, dsUnknown); // crank up damage for explosives + blowtorch
DeleteCI(Gear);
- if (Gear^.Kind = gtHedgehog) and PHedgehog(Gear^.Hedgehog)^.King then
+ if (Gear^.Kind = gtHedgehog) and Gear^.Hedgehog^.King then
begin
Gear^.dX:= Ammo^.dX * Power * _0_005;
Gear^.dY:= Ammo^.dY * Power * _0_005
@@ -1669,11 +1457,11 @@
if Team^.AIKillsTex <> nil then FreeTexture(Team^.AIKillsTex);
Team^.AIKillsTex := RenderStringTex(inttostr(Team^.stats.AIKills), Team^.Clan^.Color, fnt16);
end;
- tempTeam := PHedgehog(gear^.Hedgehog)^.Team;
+ tempTeam := gear^.Hedgehog^.Team;
DeleteCI(gear);
FindPlace(gear, false, 0, LAND_WIDTH);
if gear <> nil then begin
- RenderHealth(PHedgehog(gear^.Hedgehog)^);
+ RenderHealth(gear^.Hedgehog^);
ScriptCall('onGearResurrect', gear^.uid);
end;
RecountTeamHealth(tempTeam);
@@ -1887,7 +1675,7 @@
else
begin
OutError('Can''t find place for Gear', false);
- if Gear^.Kind = gtHedgehog then PHedgehog(Gear^.Hedgehog)^.Effects[heResurrectable] := false;
+ if Gear^.Kind = gtHedgehog then Gear^.Hedgehog^.Effects[heResurrectable] := false;
DeleteGear(Gear);
Gear:= nil
end
@@ -1902,7 +1690,7 @@
*)
i:= _1;
if (CurrentHedgehog <> nil) and CurrentHedgehog^.King then i:= _1_5;
-if (Gear^.Hedgehog <> nil) and (PHedgehog(Gear^.Hedgehog)^.King) then
+if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.King) then
ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent * _0_5)
else
ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent)
@@ -1924,8 +1712,51 @@
end
end;
+
+procedure chSkip(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if not CurrentTeam^.ExtDriven then SendIPC(',');
+uStats.Skipped;
+skipFlag:= true
+end;
+
+procedure chHogSay(var s: shortstring);
+var Gear: PVisualGear;
+ text: shortstring;
+begin
+ text:= copy(s, 2, Length(s) - 1);
+ if CheckNoTeamOrHH
+ or ((CurrentHedgehog^.Gear^.State and gstHHDriven) = 0) then
+ begin
+ ParseCommand('say ' + text, true);
+ exit
+ end;
+
+ if not CurrentTeam^.ExtDriven then SendIPC('h' + s);
+
+ if byte(s[1]) < 4 then
+ begin
+ Gear:= AddVisualGear(0, 0, vgtSpeechBubble);
+ if Gear <> nil then
+ begin
+ Gear^.Hedgehog:= CurrentHedgehog;
+ Gear^.Text:= text;
+ Gear^.FrameTicks:= byte(s[1])
+ end
+ end
+ else
+ begin
+ SpeechType:= byte(s[1])-3;
+ SpeechText:= text
+ end;
+end;
+
procedure initModule;
begin
+ RegisterVariable('skip', vtCommand, @chSkip, false);
+ RegisterVariable('hogsay', vtCommand, @chHogSay, true );
+
CurAmmoGear:= nil;
GearsList:= nil;
KilledHHs:= 0;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uGearsRender.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,1022 @@
+{$INCLUDE "options.inc"}
+unit uGearsRender;
+
+interface
+uses uTypes, uConsts, GLunit, uFloat;
+
+procedure RenderGear(Gear: PGear; x, y: LongInt);
+
+var RopePoints: record
+ Count: Longword;
+ HookAngle: GLfloat;
+ ar: array[0..MAXROPEPOINTS] of record
+ X, Y: hwFloat;
+ dLen: hwFloat;
+ b: boolean;
+ end;
+ rounded: array[0..MAXROPEPOINTS + 2] of TVertex2f;
+ end;
+
+implementation
+uses uRender, uUtils, uVariables, uAmmos, Math;
+
+procedure DrawRopeLinesRQ(Gear: PGear);
+begin
+with RopePoints do
+ begin
+ rounded[Count].X:= hwRound(Gear^.X);
+ rounded[Count].Y:= hwRound(Gear^.Y);
+ rounded[Count + 1].X:= hwRound(Gear^.Hedgehog^.Gear^.X);
+ rounded[Count + 1].Y:= hwRound(Gear^.Hedgehog^.Gear^.Y);
+ end;
+
+if (RopePoints.Count > 0) or (Gear^.Elasticity.QWordValue > 0) then
+ begin
+ glDisable(GL_TEXTURE_2D);
+ //glEnable(GL_LINE_SMOOTH);
+
+ glPushMatrix;
+
+ glTranslatef(WorldDx, WorldDy, 0);
+
+ glLineWidth(4.0);
+
+ Tint($C0, $C0, $C0, $FF);
+
+ glVertexPointer(2, GL_FLOAT, 0, @RopePoints.rounded[0]);
+ glDrawArrays(GL_LINE_STRIP, 0, RopePoints.Count + 2);
+ Tint($FF, $FF, $FF, $FF);
+
+ glPopMatrix;
+
+ glEnable(GL_TEXTURE_2D);
+ //glDisable(GL_LINE_SMOOTH)
+ end
+end;
+
+
+procedure DrawRope(Gear: PGear);
+var roplen: LongInt;
+ i: Longword;
+
+ procedure DrawRopeLine(X1, Y1, X2, Y2: LongInt);
+ var eX, eY, dX, dY: LongInt;
+ i, sX, sY, x, y, d: LongInt;
+ b: boolean;
+ begin
+ if (X1 = X2) and (Y1 = Y2) then
+ begin
+ //OutError('WARNING: zero length rope line!', false);
+ exit
+ end;
+ eX:= 0;
+ eY:= 0;
+ dX:= X2 - X1;
+ dY:= Y2 - Y1;
+
+ if (dX > 0) then sX:= 1
+ else
+ if (dX < 0) then
+ begin
+ sX:= -1;
+ dX:= -dX
+ end else sX:= dX;
+
+ if (dY > 0) then sY:= 1
+ else
+ if (dY < 0) then
+ begin
+ sY:= -1;
+ dY:= -dY
+ end else sY:= dY;
+
+ if (dX > dY) then d:= dX
+ else d:= dY;
+
+ x:= X1;
+ y:= Y1;
+
+ for i:= 0 to d do
+ begin
+ inc(eX, dX);
+ inc(eY, dY);
+ b:= false;
+ if (eX > d) then
+ begin
+ dec(eX, d);
+ inc(x, sX);
+ b:= true
+ end;
+ if (eY > d) then
+ begin
+ dec(eY, d);
+ inc(y, sY);
+ b:= true
+ end;
+ if b then
+ begin
+ inc(roplen);
+ if (roplen mod 4) = 0 then DrawSprite(sprRopeNode, x - 2, y - 2, 0)
+ end
+ end
+ end;
+begin
+ if (cReducedQuality and rqSimpleRope) <> 0 then
+ DrawRopeLinesRQ(Gear)
+ else
+ begin
+ roplen:= 0;
+ if RopePoints.Count > 0 then
+ begin
+ i:= 0;
+ while i < Pred(RopePoints.Count) do
+ begin
+ DrawRopeLine(hwRound(RopePoints.ar[i].X) + WorldDx, hwRound(RopePoints.ar[i].Y) + WorldDy,
+ hwRound(RopePoints.ar[Succ(i)].X) + WorldDx, hwRound(RopePoints.ar[Succ(i)].Y) + WorldDy);
+ inc(i)
+ end;
+ DrawRopeLine(hwRound(RopePoints.ar[i].X) + WorldDx, hwRound(RopePoints.ar[i].Y) + WorldDy,
+ hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy);
+ DrawRopeLine(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy,
+ hwRound(Gear^.Hedgehog^.Gear^.X) + WorldDx, hwRound(Gear^.Hedgehog^.Gear^.Y) + WorldDy);
+ end else
+ if Gear^.Elasticity.QWordValue > 0 then
+ DrawRopeLine(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy,
+ hwRound(Gear^.Hedgehog^.Gear^.X) + WorldDx, hwRound(Gear^.Hedgehog^.Gear^.Y) + WorldDy);
+ end;
+
+
+if RopePoints.Count > 0 then
+ DrawRotated(sprRopeHook, hwRound(RopePoints.ar[0].X) + WorldDx, hwRound(RopePoints.ar[0].Y) + WorldDy, 1, RopePoints.HookAngle)
+ else
+ if Gear^.Elasticity.QWordValue > 0 then
+ DrawRotated(sprRopeHook, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
+end;
+
+
+procedure DrawAltWeapon(Gear: PGear; sx, sy: LongInt);
+begin
+with Gear^.Hedgehog^ do
+ begin
+ if not (((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) and ((Gear^.State and gstAttacked) = 0)) then
+ exit;
+ DrawTexture(sx + 16, sy + 16, ropeIconTex);
+ DrawTextureF(SpritesData[sprAMAmmos].Texture, 0.75, sx + 30, sy + 30, ord(CurAmmoType) - 1, 1, 32, 32);
+ end;
+end;
+
+
+procedure DrawHH(Gear: PGear; ox, oy: LongInt);
+var i, t: LongInt;
+ amt: TAmmoType;
+ sign, hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite, direction
+ dx, dy, ax, ay, aAngle, dAngle, hAngle, lx, ly: real; // laser, change
+ defaultPos, HatVisible: boolean;
+ HH: PHedgehog;
+ CurWeapon: PAmmo;
+begin
+ HH:= Gear^.Hedgehog;
+ if HH^.Unplaced then exit;
+ m:= 1;
+ if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1;
+ sx:= ox + 1; // this offset is very common
+ sy:= oy - 3;
+ sign:= hwSign(Gear^.dX);
+
+ if (Gear^.State and gstHHDeath) <> 0 then
+ begin
+ DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos);
+ Tint(HH^.Team^.Clan^.Color);
+ DrawSprite(sprHHDeath, ox - 16, oy - 26, Gear^.Pos + 8);
+ Tint($FF, $FF, $FF, $FF);
+ exit
+ end
+ else if (Gear^.State and gstHHGone) <> 0 then
+ begin
+ DrawRotatedF(sprTeleport, sx, sy, Gear^.Pos, sign, 0);
+ exit
+ end;
+
+ defaultPos:= true;
+ HatVisible:= false;
+
+
+ if HH^.Effects[hePoisoned] then
+ begin
+ Tint($00, $FF, $40, $40);
+ DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 2, 0, 0, sx, sy, 0, 1, 22, 22, (RealTicks shr 36) mod 360);
+ Tint($FF, $FF, $FF, $FF)
+ end;
+
+ if ((Gear^.State and gstWinner) <> 0) and
+ ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then
+ begin
+ DrawHedgehog(sx, sy,
+ sign,
+ 2,
+ 0,
+ 0);
+ defaultPos:= false
+ end;
+ if (Gear^.State and gstDrowning) <> 0 then
+ begin
+ DrawHedgehog(sx, sy,
+ sign,
+ 1,
+ 7,
+ 0);
+ defaultPos:= false
+ end else
+ if (Gear^.State and gstLoser) <> 0 then
+ begin
+ DrawHedgehog(sx, sy,
+ sign,
+ 2,
+ 3,
+ 0);
+ defaultPos:= false
+ end else
+
+ if (Gear^.State and gstHHDriven) <> 0 then
+ begin
+ if ((Gear^.State and gstHHThinking) = 0) and
+ (ShowCrosshair or ((CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope))) and
+ ((Gear^.State and (gstAttacked or gstAnimation)) = 0) then
+ begin
+ (* These calculations are a little complex for a few reasons:
+ 1: I need to draw the laser from weapon origin to nearest land
+ 2: I need to start the beam outside the hedgie for attractiveness.
+ 3: I need to extend the beam beyond land.
+ This routine perhaps should be pushed into uStore or somesuch instead of continuuing the increase in size of this function.
+ *)
+ dx:= sign * m * Sin(Gear^.Angle * pi / cMaxAngle);
+ dy:= -Cos(Gear^.Angle * pi / cMaxAngle);
+ if cLaserSighting then
+ begin
+ lx:= GetLaunchX(HH^.CurAmmoType, sign * m, Gear^.Angle);
+ ly:= GetLaunchY(HH^.CurAmmoType, Gear^.Angle);
+
+ // ensure we start outside the hedgehog (he's solid after all)
+ while abs(lx * lx + ly * ly) < (Gear^.radius * Gear^.radius) do
+ begin
+ lx:= lx + dx;
+ ly:= ly + dy
+ end;
+
+ // add hog's position
+ lx:= lx + ox - WorldDx;
+ ly:= ly + oy - WorldDy;
+
+ // decrease number of iterations required
+ ax:= dx * 4;
+ ay:= dy * 4;
+
+ tx:= round(lx);
+ ty:= round(ly);
+ hx:= tx;
+ hy:= ty;
+ while ((ty and LAND_HEIGHT_MASK) = 0) and
+ ((tx and LAND_WIDTH_MASK) = 0) and
+ (Land[ty, tx] = 0) do // TODO: check for constant variable instead
+ begin
+ lx:= lx + ax;
+ ly:= ly + ay;
+ tx:= round(lx);
+ ty:= round(ly)
+ end;
+ // reached edge of land. assume infinite beam. Extend it way out past camera
+ if ((ty and LAND_HEIGHT_MASK) <> 0) or ((tx and LAND_WIDTH_MASK) <> 0) then
+ begin
+ tx:= round(lx + ax * (LAND_WIDTH div 4));
+ ty:= round(ly + ay * (LAND_WIDTH div 4));
+ end;
+
+ //if (abs(lx-tx)>8) or (abs(ly-ty)>8) then
+ begin
+ DrawLine(hx, hy, tx, ty, 1.0, $FF, $00, $00, $C0);
+ end;
+ end;
+ // draw crosshair
+ cx:= Round(hwRound(Gear^.X) + dx * 80 + GetLaunchX(HH^.CurAmmoType, sign * m, Gear^.Angle));
+ cy:= Round(hwRound(Gear^.Y) + dy * 80 + GetLaunchY(HH^.CurAmmoType, Gear^.Angle));
+ DrawRotatedTex(HH^.Team^.CrosshairTex,
+ 12, 12, cx + WorldDx, cy + WorldDy, 0,
+ sign * (Gear^.Angle * 180.0) / cMaxAngle);
+ end;
+ hx:= ox + 8 * sign;
+ hy:= oy - 2;
+ aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
+ if CurAmmoGear <> nil then
+ begin
+ case CurAmmoGear^.Kind of
+ gtShotgunShot: begin
+ if (CurAmmoGear^.State and gstAnimation <> 0) then
+ DrawRotated(sprShotgun, hx, hy, sign, aangle)
+ else
+ DrawRotated(sprHandShotgun, hx, hy, sign, aangle);
+ end;
+ gtDEagleShot: DrawRotated(sprDEagle, hx, hy, sign, aangle);
+ gtSniperRifleShot: begin
+ if (CurAmmoGear^.State and gstAnimation <> 0) then
+ DrawRotatedF(sprSniperRifle, hx, hy, 1, sign, aangle)
+ else
+ DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle)
+ end;
+ gtBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle);
+ gtRCPlane: begin
+ DrawRotated(sprHandPlane, hx, hy, sign, 0);
+ defaultPos:= false
+ end;
+ gtRope: begin
+ if Gear^.X < CurAmmoGear^.X then
+ begin
+ dAngle:= 0;
+ hAngle:= 180;
+ i:= 1
+ end else
+ begin
+ dAngle:= 180;
+ hAngle:= 0;
+ i:= -1
+ end;
+ if ((Gear^.State and gstWinner) = 0) then
+ begin
+ DrawHedgehog(ox, oy,
+ i,
+ 1,
+ 0,
+ DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle);
+ with HH^ do
+ if (HatTex <> nil) then
+ begin
+ DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32,
+ i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
+ if HatTex^.w > 64 then
+ begin
+ Tint(HH^.Team^.Clan^.Color);
+ DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32,
+ i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
+ Tint($FF, $FF, $FF, $FF)
+ end
+ end
+ end;
+ DrawAltWeapon(Gear, ox, oy);
+ defaultPos:= false
+ end;
+ gtBlowTorch: begin
+ DrawRotated(sprBlowTorch, hx, hy, sign, aangle);
+ DrawHedgehog(sx, sy,
+ sign,
+ 3,
+ HH^.visStepPos div 2,
+ 0);
+ with HH^ do
+ if (HatTex <> nil) then
+ begin
+ DrawTextureF(HatTex,
+ 1,
+ sx,
+ sy - 5,
+ 0,
+ sign,
+ 32,
+ 32);
+ if HatTex^.w > 64 then
+ begin
+ Tint(HH^.Team^.Clan^.Color);
+ DrawTextureF(HatTex,
+ 1,
+ sx,
+ sy - 5,
+ 32,
+ sign,
+ 32,
+ 32);
+ Tint($FF, $FF, $FF, $FF)
+ end
+ end;
+ defaultPos:= false
+ end;
+ gtShover: DrawRotated(sprHandBaseball, hx, hy, sign, aangle + 180);
+ gtFirePunch: begin
+ DrawHedgehog(sx, sy,
+ sign,
+ 1,
+ 4,
+ 0);
+ defaultPos:= false
+ end;
+ gtPickHammer: begin
+ defaultPos:= false;
+ dec(sy,20);
+ end;
+ gtTeleport: defaultPos:= false;
+ gtWhip: begin
+ DrawRotatedF(sprWhip,
+ sx,
+ sy,
+ 1,
+ sign,
+ 0);
+ defaultPos:= false
+ end;
+ gtHammer: begin
+ DrawRotatedF(sprHammer,
+ sx,
+ sy,
+ 1,
+ sign,
+ 0);
+ defaultPos:= false
+ end;
+ gtResurrector: begin
+ DrawRotated(sprHandResurrector, sx, sy, 0, 0);
+ defaultPos:= false
+ end;
+ gtKamikaze: begin
+ if CurAmmoGear^.Pos = 0 then
+ DrawHedgehog(sx, sy,
+ sign,
+ 1,
+ 6,
+ 0)
+ else
+ DrawRotatedF(sprKamikaze,
+ ox, oy,
+ CurAmmoGear^.Pos - 1,
+ sign,
+ aangle);
+ defaultPos:= false
+ end;
+ gtSeduction: begin
+ if CurAmmoGear^.Pos >= 6 then
+ DrawHedgehog(sx, sy,
+ sign,
+ 2,
+ 2,
+ 0)
+ else
+ begin
+ DrawRotatedF(sprDress,
+ ox, oy,
+ CurAmmoGear^.Pos,
+ sign,
+ 0);
+ DrawSprite(sprCensored, ox - 32, oy - 20, 0)
+ end;
+ defaultPos:= false
+ end;
+ gtFlamethrower: begin
+ DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
+ if CurAmmoGear^.Tex <> nil then DrawCentered(sx, sy - 40, CurAmmoGear^.Tex)
+ end;
+ end;
+
+ case CurAmmoGear^.Kind of
+ gtShotgunShot,
+ gtDEagleShot,
+ gtSniperRifleShot,
+ gtShover: begin
+ DrawHedgehog(sx, sy,
+ sign,
+ 0,
+ 4,
+ 0);
+ defaultPos:= false;
+ HatVisible:= true
+ end
+ end
+ end else
+
+ if ((Gear^.State and gstHHJumping) <> 0) then
+ begin
+ DrawHedgehog(sx, sy,
+ sign*m,
+ 1,
+ 1,
+ 0);
+ HatVisible:= true;
+ defaultPos:= false
+ end else
+
+ if (Gear^.Message and (gmLeft or gmRight) <> 0) and (not isCursorVisible) then
+ begin
+ DrawHedgehog(sx, sy,
+ sign,
+ 0,
+ HH^.visStepPos div 2,
+ 0);
+ defaultPos:= false;
+ HatVisible:= true
+ end
+ else
+
+ if ((Gear^.State and gstAnimation) <> 0) then
+ begin
+ if (TWave(Gear^.Tag) < Low(TWave)) or (TWave(Gear^.Tag) > High(TWave)) then
+ begin
+ Gear^.State:= Gear^.State and not gstAnimation;
+ end
+ else
+ begin
+ DrawRotatedF(Wavez[TWave(Gear^.Tag)].Sprite,
+ sx,
+ sy,
+ Gear^.Pos,
+ sign,
+ 0.0);
+ defaultPos:= false
+ end
+ end
+ else
+ if ((Gear^.State and gstAttacked) = 0) then
+ begin
+ if HH^.Timer > 0 then
+ begin
+ // There must be a tidier way to do this. Anyone?
+ if aangle <= 90 then aangle:= aangle+360;
+ if Gear^.dX > _0 then aangle:= aangle-((aangle-240)*HH^.Timer/10)
+ else aangle:= aangle+((240-aangle)*HH^.Timer/10);
+ dec(HH^.Timer)
+ end;
+ amt:= CurrentHedgehog^.CurAmmoType;
+ CurWeapon:= GetAmmoEntry(HH^);
+ case amt of
+ amBazooka: DrawRotated(sprHandBazooka, hx, hy, sign, aangle);
+ amMortar: DrawRotated(sprHandMortar, hx, hy, sign, aangle);
+ amMolotov: DrawRotated(sprHandMolotov, hx, hy, sign, aangle);
+ amBallgun: DrawRotated(sprHandBallgun, hx, hy, sign, aangle);
+ amDrill: DrawRotated(sprHandDrill, hx, hy, sign, aangle);
+ amRope: DrawRotated(sprHandRope, hx, hy, sign, aangle);
+ amShotgun: DrawRotated(sprHandShotgun, hx, hy, sign, aangle);
+ amDEagle: DrawRotated(sprHandDEagle, hx, hy, sign, aangle);
+ amSineGun: DrawRotated(sprHandShotgun, hx, hy, sign, aangle);
+ amPortalGun: if (CurWeapon^.Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer?
+ DrawRotatedF(sprPortalGun, hx, hy, 0, sign, aangle)
+ else
+ DrawRotatedF(sprPortalGun, hx, hy, 1+(CurWeapon^.Timer and 1), sign, aangle);
+ amSniperRifle: DrawRotatedF(sprSniperRifle, hx, hy, 0, sign, aangle);
+ amBlowTorch: DrawRotated(sprHandBlowTorch, hx, hy, sign, aangle);
+ amCake: DrawRotated(sprHandCake, hx, hy, sign, aangle);
+ amGrenade: DrawRotated(sprHandGrenade, hx, hy, sign, aangle);
+ amWatermelon: DrawRotated(sprHandMelon, hx, hy, sign, aangle);
+ amSkip: DrawRotated(sprHandSkip, hx, hy, sign, aangle);
+ amClusterBomb: DrawRotated(sprHandCluster, hx, hy, sign, aangle);
+ amDynamite: DrawRotated(sprHandDynamite, hx, hy, sign, aangle);
+ amHellishBomb: DrawRotated(sprHandHellish, hx, hy, sign, aangle);
+ amGasBomb: DrawRotated(sprHandCheese, hx, hy, sign, aangle);
+ amMine: DrawRotated(sprHandMine, hx, hy, sign, aangle);
+ amSMine: DrawRotated(sprHandSMine, hx, hy, sign, aangle);
+ amSeduction: DrawRotated(sprHandSeduction, hx, hy, sign, aangle);
+ amVampiric: DrawRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
+ amRCPlane: begin
+ DrawRotated(sprHandPlane, hx, hy, sign, 0);
+ defaultPos:= false
+ end;
+ amGirder: begin
+ DrawRotated(sprHandConstruction, hx, hy, sign, aangle);
+ DrawSpriteClipped(sprGirder,
+ ox-256,
+ oy-256,
+ LongInt(topY)+WorldDy,
+ LongInt(rightX)+WorldDx,
+ cWaterLine+WorldDy,
+ LongInt(leftX)+WorldDx)
+ end;
+ amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
+ amFlamethrower: DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, sign, aangle);
+ amResurrector: DrawCircle(ox, oy, 98, 4, $F5, $DB, $35, $AA); // I'd rather not like to hardcode 100 here
+ end;
+
+ case amt of
+ amAirAttack,
+ amMineStrike,
+ amDrillStrike: DrawRotated(sprHandAirAttack, sx, oy, sign, 0);
+ amPickHammer: DrawHedgehog(sx, sy,
+ sign,
+ 1,
+ 2,
+ 0);
+ amTeleport: DrawRotatedF(sprTeleport, sx, sy, 0, sign, 0);
+ amKamikaze: DrawHedgehog(sx, sy,
+ sign,
+ 1,
+ 5,
+ 0);
+ amWhip: DrawRotatedF(sprWhip,
+ sx,
+ sy,
+ 0,
+ sign,
+ 0);
+ amHammer: DrawRotatedF(sprHammer,
+ sx,
+ sy,
+ 0,
+ sign,
+ 0);
+ else
+ DrawHedgehog(sx, sy,
+ sign,
+ 0,
+ 4,
+ 0);
+
+ HatVisible:= true;
+ (* with HH^ do
+ if (HatTex <> nil)
+ and (HatVisibility > 0) then
+ DrawTextureF(HatTex,
+ HatVisibility,
+ sx,
+ sy - 5,
+ 0,
+ sign,
+ 32,
+ 32); *)
+ end;
+
+ case amt of
+ amBaseballBat: DrawRotated(sprHandBaseball,
+ sx - 4 * sign,
+ sy + 9, sign, aangle);
+ end;
+
+ defaultPos:= false
+ end;
+
+ end else // not gstHHDriven
+ begin
+ if (Gear^.Damage > 0)
+ and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
+ begin
+ DrawHedgehog(sx, sy,
+ sign,
+ 2,
+ 1,
+ Gear^.DirAngle);
+ defaultPos:= false
+ end else
+
+ if ((Gear^.State and gstHHJumping) <> 0) then
+ begin
+ DrawHedgehog(sx, sy,
+ sign*m,
+ 1,
+ 1,
+ 0);
+ defaultPos:= false
+ end;
+ end;
+
+ with HH^ do
+ begin
+ if defaultPos then
+ begin
+ DrawRotatedF(sprHHIdle,
+ sx,
+ sy,
+ (RealTicks div 128 + Gear^.Pos) mod 19,
+ sign,
+ 0);
+ HatVisible:= true;
+ end;
+
+ if HatVisible then
+ if HatVisibility < 1.0 then
+ HatVisibility:= HatVisibility + 0.2
+ else
+ else
+ if HatVisibility > 0.0 then
+ HatVisibility:= HatVisibility - 0.2;
+
+ if (HatTex <> nil)
+ and (HatVisibility > 0) then
+ if DefaultPos then
+ begin
+ DrawTextureF(HatTex,
+ HatVisibility,
+ sx,
+ sy - 5,
+ (RealTicks div 128 + Gear^.Pos) mod 19,
+ sign,
+ 32,
+ 32);
+ if HatTex^.w > 64 then
+ begin
+ Tint(HH^.Team^.Clan^.Color);
+ DrawTextureF(HatTex,
+ HatVisibility,
+ sx,
+ sy - 5,
+ (RealTicks div 128 + Gear^.Pos) mod 19 + 32,
+ sign,
+ 32,
+ 32);
+ Tint($FF, $FF, $FF, $FF)
+ end
+ end
+ else
+ begin
+ DrawTextureF(HatTex,
+ HatVisibility,
+ sx,
+ sy - 5,
+ 0,
+ sign*m,
+ 32,
+ 32);
+ if HatTex^.w > 64 then
+ begin
+ Tint(HH^.Team^.Clan^.Color);
+ DrawTextureF(HatTex,
+ HatVisibility,
+ sx,
+ sy - 5,
+ 32,
+ sign*m,
+ 32,
+ 32);
+ Tint($FF, $FF, $FF, $FF)
+ end
+ end
+ end;
+ if (Gear^.State and gstHHDriven) <> 0 then
+ begin
+ (* if (CurAmmoGear = nil) then
+ begin
+ amt:= CurrentHedgehog^.CurAmmoType;
+ case amt of
+ amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0);
+ end
+ end; *)
+ if CurAmmoGear <> nil then
+ begin
+ case CurAmmoGear^.Kind of
+ gtJetpack: begin
+ DrawSprite(sprJetpack, sx-32, sy-32, 0);
+ if cWaterLine > hwRound(Gear^.Y) + Gear^.Radius then
+ begin
+ if (CurAmmoGear^.MsgParam and gmUp) <> 0 then DrawSprite(sprJetpack, sx-32, sy-28, 1);
+ if (CurAmmoGear^.MsgParam and gmLeft) <> 0 then DrawSprite(sprJetpack, sx-28, sy-28, 2);
+ if (CurAmmoGear^.MsgParam and gmRight) <> 0 then DrawSprite(sprJetpack, sx-36, sy-28, 3)
+ end;
+ if CurAmmoGear^.Tex <> nil then DrawCentered(sx, sy - 40, CurAmmoGear^.Tex);
+ DrawAltWeapon(Gear, sx, sy)
+ end;
+ end;
+ end
+ end;
+
+ with HH^ do
+ begin
+ if ((Gear^.State and not gstWinner) = 0)
+ or ((Gear^.State = gstWait) and (Gear^.dY.QWordValue = 0))
+ or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then
+ begin
+ t:= sy - cHHRadius - 9;
+ if (cTagsMask and htTransparent) <> 0 then
+ Tint($FF, $FF, $FF, $80);
+ if ((cTagsMask and htHealth) <> 0) then
+ begin
+ dec(t, HealthTagTex^.h + 2);
+ DrawCentered(ox, t, HealthTagTex)
+ end;
+ if (cTagsMask and htName) <> 0 then
+ begin
+ dec(t, NameTagTex^.h + 2);
+ DrawCentered(ox, t, NameTagTex)
+ end;
+ if (cTagsMask and htTeamName) <> 0 then
+ begin
+ dec(t, Team^.NameTagTex^.h + 2);
+ DrawCentered(ox, t, Team^.NameTagTex)
+ end;
+ if (cTagsMask and htTransparent) <> 0 then
+ Tint($FF, $FF, $FF, $FF)
+ end;
+ if (Gear^.State and gstHHDriven) <> 0 then // Current hedgehog
+ begin
+ if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtResurrector) then
+ DrawCentered(ox, sy - cHHRadius - 7 - HealthTagTex^.h, HealthTagTex);
+
+ if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then
+ DrawSprite(sprFinger, ox - 16, oy - 64,
+ GameTicks div 32 mod 16);
+
+ if (Gear^.State and gstDrowning) = 0 then
+ if (Gear^.State and gstHHThinking) <> 0 then
+ DrawSprite(sprQuestion, ox - 10, oy - cHHRadius - 34, (RealTicks shr 9) mod 8)
+ end
+ end;
+
+ if HH^.Effects[hePoisoned] then
+ begin
+ Tint($00, $FF, $40, $80);
+ DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 1.5, 0, 0, sx, sy, 0, 1, 22, 22, 360 - (RealTicks shr 37) mod 360);
+ end;
+ if HH^.Effects[heResurrected] then
+ begin
+ Tint($f5, $db, $35, $20);
+ DrawSprite(sprVampiric, sx - 24, sy - 24, 0);
+ end;
+
+ if Gear^.Invulnerable then
+ begin
+ Tint($FF, $FF, $FF, max($40, round($FF * abs(1 - ((RealTicks div 2 + Gear^.uid * 491) mod 1500) / 750))));
+ DrawSprite(sprInvulnerable, sx - 24, sy - 24, 0);
+ end;
+ if cVampiric and
+ (CurrentHedgehog^.Gear <> nil) and
+ (CurrentHedgehog^.Gear = Gear) then
+ begin
+ Tint($FF, 0, 0, max($40, round($FF * abs(1 - (RealTicks mod 1500) / 750))));
+ DrawSprite(sprVampiric, sx - 24, sy - 24, 0);
+ end;
+ Tint($FF, $FF, $FF, $FF)
+end;
+
+
+procedure RenderGear(Gear: PGear; x, y: LongInt);
+var
+ HHGear: PGear;
+ i: Longword;
+ startX, endX, startY, endY: LongInt;
+begin
+ case Gear^.Kind of
+ gtBomb: DrawRotated(sprBomb, x, y, 0, Gear^.DirAngle);
+ gtGasBomb: DrawRotated(sprCheese, x, y, 0, Gear^.DirAngle);
+ gtMolotov: DrawRotated(sprMolotov, x, y, 0, Gear^.DirAngle);
+
+ gtRCPlane: begin
+ if (Gear^.Tag = -1) then
+ DrawRotated(sprPlane, x, y, -1, DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
+ else
+ DrawRotated(sprPlane, x, y,0,DxDy2Angle(Gear^.dY, Gear^.dX));
+ if ((TrainingFlags and tfRCPlane) <> 0) and (TrainingTargetGear <> nil) and ((Gear^.State and gstDrowning) = 0) then
+ DrawRotatedf(sprFinger, x, y, GameTicks div 32 mod 16, 0, DxDy2Angle(Gear^.X - TrainingTargetGear^.X, TrainingTargetGear^.Y - Gear^.Y));
+ end;
+ gtBall: DrawRotatedf(sprBalls, x, y, Gear^.Tag,0, Gear^.DirAngle);
+
+ gtPortal: if ((Gear^.Tag and 1) = 0) // still moving?
+ or (Gear^.IntersectGear = nil) or (Gear^.IntersectGear^.IntersectGear <> Gear) // not linked&backlinked?
+ or ((Gear^.IntersectGear^.Tag and 1) = 0) then // linked portal still moving?
+ DrawRotatedf(sprPortal, x, y, Gear^.Tag, hwSign(Gear^.dX), Gear^.DirAngle)
+ else DrawRotatedf(sprPortal, x, y, 4 + Gear^.Tag div 2, hwSign(Gear^.dX), Gear^.DirAngle);
+
+ gtDrill: if (Gear^.State and gsttmpFlag) <> 0 then
+ DrawRotated(sprAirDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX))
+ else
+ DrawRotated(sprDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
+
+ gtHedgehog: DrawHH(Gear, x, y);
+
+ gtShell: DrawRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
+
+ gtGrave: begin
+ DrawTextureF(Gear^.Hedgehog^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32);
+ if Gear^.Health > 0 then
+ begin
+ //Tint($33, $33, $FF, max($40, round($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750))));
+ Tint($f5, $db, $35, max($40, round($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health)))));
+ //Tint($FF, $FF, $FF, max($40, round($FF * abs(1 - (RealTicks mod 1500) / 750))));
+ DrawSprite(sprVampiric, x - 24, y - 24, 0);
+ Tint($FF, $FF, $FF, $FF)
+ end
+ end;
+ gtBee: DrawRotatedF(sprBee, x, y, (GameTicks shr 5) mod 2, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
+ gtPickHammer: DrawSprite(sprPHammer, x - 16, y - 50 + LongInt(((GameTicks shr 5) and 1) * 2), 0);
+ gtRope: DrawRope(Gear);
+ gtMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then
+ DrawRotated(sprMineOff, x, y, 0, Gear^.DirAngle)
+ else if Gear^.Health <> 0 then DrawRotated(sprMineOn, x, y, 0, Gear^.DirAngle)
+ else DrawRotated(sprMineDead, x, y, 0, Gear^.DirAngle);
+ gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then
+ DrawRotated(sprSMineOff, x, y, 0, Gear^.DirAngle)
+ else if Gear^.Health <> 0 then DrawRotated(sprSMineOn, x, y, 0, Gear^.DirAngle)
+ else DrawRotated(sprMineDead, x, y, 0, Gear^.DirAngle);
+ gtCase: case Gear^.Pos of
+ posCaseAmmo : begin
+ i:= (GameTicks shr 6) mod 64;
+ if i > 18 then i:= 0;
+ DrawSprite(sprCase, x - 24, y - 24, i);
+ end;
+ posCaseHealth: begin
+ i:= ((GameTicks shr 6) + 38) mod 64;
+ if i > 13 then i:= 0;
+ DrawSprite(sprFAid, x - 24, y - 24, i);
+ end;
+ posCaseUtility: begin
+ i:= (GameTicks shr 6) mod 70;
+ if i > 23 then i:= 0;
+ i:= i mod 12;
+ DrawSprite(sprUtility, x - 24, y - 24, i);
+ end;
+ end;
+ gtExplosives: begin
+ if ((Gear^.State and gstDrowning) <> 0) then
+ DrawSprite(sprExplosivesRoll, x - 24, y - 24, 0)
+ else if Gear^.State and gstAnimation = 0 then
+ begin
+ i:= (GameTicks shr 6 + Gear^.uid*3) mod 64;
+ if i > 18 then i:= 0;
+ DrawSprite(sprExplosives, x - 24, y - 24, i)
+ end
+ else if Gear^.State and gsttmpFlag = 0 then
+ DrawRotatedF(sprExplosivesRoll, x, y + 4, 0, 0, Gear^.DirAngle)
+ else
+ DrawRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle);
+ end;
+ gtDynamite: DrawSprite2(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1);
+ gtClusterBomb: DrawRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle);
+ gtCluster: DrawSprite(sprClusterParticle, x - 8, y - 8, 0);
+ gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), x, y, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16);
+ gtParachute: begin
+ DrawSprite(sprParachute, x - 24, y - 48, 0);
+ DrawAltWeapon(Gear, x + 1, y - 3)
+ end;
+ gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 0)
+ else DrawSprite(sprAirplane, x - SpritesData[sprAirplane].Width div 2, y - SpritesData[sprAirplane].Height div 2, 1);
+ gtAirBomb: DrawRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
+ gtTeleport: begin
+ HHGear:= Gear^.Hedgehog^.Gear;
+ if not Gear^.Hedgehog^.Unplaced then DrawRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0);
+ DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0);
+ end;
+ gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12);
+ gtTarget: begin
+ Tint($FF, $FF, $FF, round($FF * Gear^.Timer / 1000));
+ DrawSprite(sprTarget, x - 16, y - 16, 0);
+ Tint($FF, $FF, $FF, $FF);
+ end;
+ gtMortar: DrawRotated(sprMortar, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
+ gtCake: if Gear^.Pos = 6 then
+ DrawRotatedf(sprCakeWalk, x, y, (GameTicks div 40) mod 6, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90)
+ else
+ DrawRotatedf(sprCakeDown, x, y, 5 - Gear^.Pos, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90);
+ gtSeduction: if Gear^.Pos >= 14 then DrawSprite(sprSeduction, x - 16, y - 16, 0);
+ gtWatermelon: DrawRotatedf(sprWatermelon, x, y, 0, 0, Gear^.DirAngle);
+ gtMelonPiece: DrawRotatedf(sprWatermelon, x, y, 1, 0, Gear^.DirAngle);
+ gtHellishBomb: DrawRotated(sprHellishBomb, x, y, 0, Gear^.DirAngle);
+ gtBirdy: begin
+ if Gear^.State and gstAnimation = gstAnimation then
+ begin
+ if Gear^.State and gstTmpFlag = 0 then // Appearing
+ begin
+ endX:= x - WorldDx;
+ endY:= y - WorldDy;
+ if Gear^.Tag < 0 then
+ startX:= max(LAND_WIDTH + 1024, endX + 2048)
+ else
+ startX:= max(-LAND_WIDTH - 1024, endX - 2048);
+ startY:= endY - 256;
+ DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + round((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1)), startY + WorldDy + round((endY - startY) * sqrt(1 - power((LongInt(Gear^.Timer)/2000)-1, 2))), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75);
+ end
+ else // Disappearing
+ begin
+ startX:= x - WorldDx;
+ startY:= y - WorldDy;
+ if Gear^.Tag > 0 then
+ endX:= max(LAND_WIDTH + 1024, startX + 2048)
+ else
+ endX:= max(-LAND_WIDTH - 1024, startX - 2048);
+ endY:= startY + 256;
+ DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + round((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + round((endY - startY) * cos(LongInt(Gear^.Timer)/2000 * (Pi/2)) - (endY - startY)) + hwRound(Gear^.dY * Gear^.Timer), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75);
+ end;
+ end
+ else
+ DrawTextureF(SpritesData[sprBirdy].Texture, 1, x, y, ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75);
+ end;
+ gtEgg: DrawRotatedTextureF(SpritesData[sprEgg].Texture, 1, 0, 0, x, y, 0, 1, 16, 16, Gear^.DirAngle);
+ gtPiano: begin
+ if (Gear^.State and gstDrowning) = 0 then
+ begin
+ Tint($FF, $FF, $FF, $10);
+ for i:= 8 downto 1 do
+ DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, x, y - hwRound(Gear^.dY * 4 * i), 0, 1, 128, 128, 0);
+ Tint($FF, $FF, $FF, $FF)
+ end;
+ DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, x, y, 0, 1, 128, 128, 0);
+ end;
+ gtPoisonCloud: begin
+ if Gear^.Timer < 1020 then
+ Tint($C0, $C0, $00, Gear^.Timer div 8)
+ else if Gear^.Timer > 3980 then
+ Tint($C0, $C0, $00, (5000 - Gear^.Timer) div 8)
+ else
+ Tint($C0, $C0, $00, $C0);
+ DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360);
+ Tint($FF, $FF, $FF, $FF)
+ end;
+ gtResurrector: begin
+ DrawRotated(sprCross, x, y, 0, 0);
+ Tint($f5, $db, $35, max($00, round($C0 * abs(1 - (GameTicks mod 6000) / 3000))));
+ DrawTexture(x - 108, y - 108, SpritesData[sprVampiric].Texture, 4.5);
+ Tint($FF, $FF, $FF, $FF);
+ end;
+ gtNapalmBomb: DrawRotated(sprNapalmBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
+ end;
+ if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(x + 8, y + 8, Gear^.Tex);
+end;
+
+end.
--- a/hedgewars/uIO.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uIO.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,7 +20,7 @@
unit uIO;
interface
-uses SDLh;
+uses SDLh, uTypes;
var ipcPort: Word = 0;
hiTicks: Word;
@@ -35,14 +35,16 @@
procedure SendIPCTimeInc;
procedure SendKeepAliveMessage(Lag: Longword);
procedure LoadRecordFromFile(fileName: shortstring);
+procedure SendStat(sit: TStatInfoType; s: shortstring);
procedure IPCWaitPongEvent;
procedure IPCCheckSock;
procedure InitIPC;
procedure CloseIPC;
procedure NetGetNextCmd;
+procedure doPut(putX, putY: LongInt; fromAI: boolean);
implementation
-uses uConsole, uConsts, uWorld, uMisc, uLand, uChat, uTeams;
+uses uConsole, uConsts, uVariables, uCommands, uUtils, uDebug;
type PCmd = ^TCmd;
TCmd = packed record
@@ -64,7 +66,6 @@
SendEmptyPacketTicks: LongWord;
-
function AddCmd(Time: Word; str: shortstring): PCmd;
var command: PCmd;
begin
@@ -128,7 +129,7 @@
'e': ParseCommand(copy(s, 2, Length(s) - 1), true);
'E': OutError(copy(s, 2, Length(s) - 1), true);
'W': OutError(copy(s, 2, Length(s) - 1), false);
- 'M': CheckLandDigest(s);
+ 'M': ParseCommand('landcheck ' + s, true);
'T': case s[2] of
'L': GameType:= gmtLocal;
'D': GameType:= gmtDemo;
@@ -138,7 +139,7 @@
else
loTicks:= SDLNet_Read16(@s[byte(s[0]) - 1]);
AddCmd(loTicks, s);
- {$IFDEF DEBUGFILE}AddFileLog('IPC in: '+s[1]+' ticks '+inttostr(lastcmd^.loTime));{$ENDIF}
+ {$IFDEF DEBUGFILE}AddFileLog('IPC in: '+s[1]+' ticks '+IntToStr(lastcmd^.loTime));{$ENDIF}
end
end;
@@ -203,6 +204,15 @@
close(f)
end;
+procedure SendStat(sit: TStatInfoType; s: shortstring);
+const stc: array [TStatInfoType] of char = 'rDkKHTPsSB';
+var buf: shortstring;
+begin
+buf:= 'i' + stc[sit] + s;
+SendIPCRaw(@buf[0], length(buf) + 1)
+end;
+
+
procedure SendIPC(s: shortstring);
begin
if IPCSock <> nil then
@@ -300,18 +310,19 @@
',': ParseCommand('skip', true);
's': begin
s:= copy(headcmd^.str, 2, Pred(headcmd^.len));
- AddChatString(s);
+ ParseCommand('chatmsg ' + s, true);
WriteLnToConsole(s)
end;
'b': begin
s:= copy(headcmd^.str, 2, Pred(headcmd^.len));
- AddChatString(#4 + s);
+ ParseCommand('chatmsg '#4 + s, true);
WriteLnToConsole(s)
end;
- 'F': TeamGone(copy(headcmd^.str, 2, Pred(headcmd^.len)));
+// TODO: deprecate 'F'
+ 'F': ParseCommand('teamgone ' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
'N': begin
tmpflag:= false;
- {$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+inttostr(hiTicks shl 16 + headcmd^.loTime)){$ENDIF}
+ {$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+IntToStr(hiTicks shl 16 + headcmd^.loTime)){$ENDIF}
end;
'p': begin
x16:= SDLNet_Read16(@(headcmd^.X));
@@ -342,8 +353,8 @@
if (headcmd <> nil) and tmpflag and (not CurrentTeam^.hasGone) then
TryDo(GameTicks < hiTicks shl 16 + headcmd^.loTime,
'oops, queue error. in buffer: ' + headcmd^.cmd +
- ' (' + inttostr(GameTicks) + ' > ' +
- inttostr(hiTicks shl 16 + headcmd^.loTime) + ')',
+ ' (' + IntToStr(GameTicks) + ' > ' +
+ IntToStr(hiTicks shl 16 + headcmd^.loTime) + ')',
true);
isInLag:= (headcmd = nil) and tmpflag and (not CurrentTeam^.hasGone);
@@ -351,8 +362,59 @@
if isInLag then fastUntilLag:= false
end;
+procedure chFatalError(var s: shortstring);
+begin
+ SendIPC('E' + s);
+end;
+
+procedure doPut(putX, putY: LongInt; fromAI: boolean);
+begin
+if CheckNoTeamOrHH or isPaused then exit;
+if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1;
+bShowFinger:= false;
+if not CurrentTeam^.ExtDriven and bShowAmmoMenu then
+ begin
+ bSelected:= true;
+ exit
+ end;
+
+with CurrentHedgehog^.Gear^,
+ CurrentHedgehog^ do
+ if (State and gstHHChooseTarget) <> 0 then
+ begin
+ isCursorVisible:= false;
+ if not CurrentTeam^.ExtDriven then
+ begin
+ if fromAI then
+ begin
+ TargetPoint.X:= putX;
+ TargetPoint.Y:= putY
+ end else
+ begin
+ TargetPoint.X:= CursorPoint.X - WorldDx;
+ TargetPoint.Y:= cScreenHeight - CursorPoint.Y - WorldDy;
+ end;
+ SendIPCXY('p', TargetPoint.X, TargetPoint.Y);
+ end
+ else
+ begin
+ TargetPoint.X:= putX;
+ TargetPoint.Y:= putY
+ end;
+ {$IFDEF DEBUGFILE}AddFilelog('put: ' + inttostr(TargetPoint.X) + ', ' + inttostr(TargetPoint.Y));{$ENDIF}
+ State:= State and not gstHHChooseTarget;
+ if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) <> 0 then
+ Message:= Message or gmAttack;
+ end
+ else
+ if CurrentTeam^.ExtDriven then
+ OutError('got /put while not being in choose target mode', false)
+end;
+
procedure initModule;
begin
+ RegisterVariable('fatal', vtCommand, @chFatalError, true );
+
IPCSock:= nil;
headcmd:= nil;
--- a/hedgewars/uKeys.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uKeys.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,10 +20,7 @@
unit uKeys;
interface
-uses uConsts, SDLh;
-
-type TBinds = array[0..cKeyMaxIndex] of shortstring;
-type TKeyboardState = array[0..cKeyMaxIndex] of Byte;
+uses SDLh, uTypes;
procedure initModule;
procedure freeModule;
@@ -85,8 +82,7 @@
{$ENDIF}
{$ENDIF}
implementation
-uses uTeams, uConsole, uMisc;
-//const KeyNumber = 1024;
+uses uConsole, uCommands, uMisc, uVariables, uConsts, uUtils, uDebug;
var tkbd, tkbdn: TKeyboardState;
KeyNames: array [0..cKeyMaxIndex] of string[15];
@@ -196,7 +192,7 @@
k:= SDL_GetMouseState(nil, nil);
{$IFNDEF IPHONEOS}pkbd:={$ENDIF}SDL_GetKeyState(@j);
-TryDo(j < cKeyMaxIndex, 'SDL keys number is more than expected (' + inttostr(j) + ')', true);
+TryDo(j < cKeyMaxIndex, 'SDL keys number is more than expected (' + IntToStr(j) + ')', true);
{$IFNDEF IPHONEOS}
for i:= 1 to pred(j) do
@@ -265,7 +261,7 @@
for i:= 6 to cKeyMaxIndex do
begin
s:= shortstring(sdl_getkeyname(i));
- //writeln(stdout,inttostr(i) + ': ' + s);
+ //writeln(stdout,IntToStr(i) + ': ' + s);
if s = 'unknown key' then KeyNames[i]:= ''
else
begin
@@ -275,7 +271,7 @@
end;
end;
-//for i:= 0 to cKeyMaxIndex do writeln(stdout,inttostr(i) + ': ' + KeyNames[i]);
+//for i:= 0 to cKeyMaxIndex do writeln(stdout,IntToStr(i) + ': ' + KeyNames[i]);
// get the size of keyboard array
SDL_GetKeyState(@k);
@@ -285,21 +281,21 @@
begin
for i:= 0 to Pred(ControllerNumAxes[j]) do
begin
- keynames[k + 0]:= 'j' + inttostr(j) + 'a' + inttostr(i) + 'u';
- keynames[k + 1]:= 'j' + inttostr(j) + 'a' + inttostr(i) + 'd';
+ keynames[k + 0]:= 'j' + IntToStr(j) + 'a' + IntToStr(i) + 'u';
+ keynames[k + 1]:= 'j' + IntToStr(j) + 'a' + IntToStr(i) + 'd';
inc(k, 2);
end;
for i:= 0 to Pred(ControllerNumHats[j]) do
begin
- keynames[k + 0]:= 'j' + inttostr(j) + 'h' + inttostr(i) + 'u';
- keynames[k + 1]:= 'j' + inttostr(j) + 'h' + inttostr(i) + 'r';
- keynames[k + 2]:= 'j' + inttostr(j) + 'h' + inttostr(i) + 'd';
- keynames[k + 3]:= 'j' + inttostr(j) + 'h' + inttostr(i) + 'l';
+ keynames[k + 0]:= 'j' + IntToStr(j) + 'h' + IntToStr(i) + 'u';
+ keynames[k + 1]:= 'j' + IntToStr(j) + 'h' + IntToStr(i) + 'r';
+ keynames[k + 2]:= 'j' + IntToStr(j) + 'h' + IntToStr(i) + 'd';
+ keynames[k + 3]:= 'j' + IntToStr(j) + 'h' + IntToStr(i) + 'l';
inc(k, 4);
end;
for i:= 0 to Pred(ControllerNumButtons[j]) do
begin
- keynames[k]:= 'j' + inttostr(j) + 'b' + inttostr(i);
+ keynames[k]:= 'j' + IntToStr(j) + 'b' + IntToStr(i);
inc(k, 1);
end;
end;
@@ -350,7 +346,7 @@
DefaultBinds[KeyNameToCode('left_shift')]:= '+precise';
{$ENDIF}
-for i:= 1 to 10 do DefaultBinds[KeyNameToCode('f'+inttostr(i))]:= 'slot '+inttostr(i);
+for i:= 1 to 10 do DefaultBinds[KeyNameToCode('f'+IntToStr(i))]:= 'slot '+IntToStr(i);
SetDefaultBinds();
end;
@@ -425,7 +421,7 @@
ControllerNumControllers:= SDL_NumJoysticks();
if ControllerNumControllers > 6 then ControllerNumControllers:= 6;
-WriteLnToConsole('Number of game controllers: ' + inttostr(ControllerNumControllers));
+WriteLnToConsole('Number of game controllers: ' + IntToStr(ControllerNumControllers));
if ControllerNumControllers > 0 then
begin
@@ -441,10 +437,10 @@
//ControllerNumBalls[j]:= SDL_JoystickNumBalls(Controller[j]);
ControllerNumHats[j]:= SDL_JoystickNumHats(Controller[j]);
ControllerNumButtons[j]:= SDL_JoystickNumButtons(Controller[j]);
- WriteLnToConsole('* Number of axes: ' + inttostr(ControllerNumAxes[j]));
- //WriteLnToConsole('* Number of balls: ' + inttostr(ControllerNumBalls[j]));
- WriteLnToConsole('* Number of hats: ' + inttostr(ControllerNumHats[j]));
- WriteLnToConsole('* Number of buttons: ' + inttostr(ControllerNumButtons[j]));
+ WriteLnToConsole('* Number of axes: ' + IntToStr(ControllerNumAxes[j]));
+ //WriteLnToConsole('* Number of balls: ' + IntToStr(ControllerNumBalls[j]));
+ WriteLnToConsole('* Number of hats: ' + IntToStr(ControllerNumHats[j]));
+ WriteLnToConsole('* Number of buttons: ' + IntToStr(ControllerNumButtons[j]));
ControllerEnabled:= 1;
if ControllerNumAxes[j] > 20 then ControllerNumAxes[j]:= 20;
--- a/hedgewars/uLand.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uLand.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,23 +20,7 @@
unit uLand;
interface
-uses SDLh, uLandTemplates, uFloat, uConsts, GLunit;
-
-type
- TLandArray = packed array of array of LongWord;
- TCollisionArray = packed array of array of Word;
- TPreview = packed array[0..127, 0..31] of byte;
- TDirtyTag = packed array of array of byte;
-
-var Land: TCollisionArray;
- LandPixels: TLandArray;
- LandDirty: TDirtyTag;
- hasBorder: boolean;
- hasGirders: boolean;
- isMap: boolean;
- playHeight, playWidth, leftX, rightX, topY, MaxHedgehogs: Longword; // idea is that a template can specify height/width. Or, a map, a height/width by the dimensions of the image. If the map has pixels near top of image, it triggers border.
- LandBackSurface: PSDL_Surface;
- digest: shortstring;
+uses SDLh, uLandTemplates, uFloat, uConsts, GLunit, uTypes;
type direction = record x, y: LongInt; end;
const DIR_N: direction = (x: 0; y: -1);
@@ -48,11 +32,10 @@
procedure freeModule;
procedure GenMap;
function GenPreview: TPreview;
-procedure CheckLandDigest(s: shortstring);
-function LandBackPixel(x, y: LongInt): LongWord;
implementation
-uses uConsole, uStore, uMisc, uRandom, uTeams, uLandObjects, Adler32, uIO, uLandTexture, sysutils;
+uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, sysutils,
+ uVariables, uUtils, uCommands, Adler32, uDebug;
operator=(const a, b: direction) c: Boolean;
begin
@@ -64,30 +47,6 @@
ar: array[0..Pred(cMaxEdgePoints)] of TPoint;
end;
-procedure LogLandDigest;
-var s: shortstring;
- adler, i: LongInt;
-begin
-adler:= 1;
-for i:= 0 to LAND_HEIGHT-1 do
- Adler32Update(adler, @Land[i,0], LAND_WIDTH);
-s:= 'M'+inttostr(adler);
-
-CheckLandDigest(s);
-SendIPCRaw(@s[0], Length(s) + 1)
-end;
-
-procedure CheckLandDigest(s: shortstring);
-begin
-{$IFDEF DEBUGFILE}
- AddFileLog('CheckLandDigest: ' + s + ' digest : ' + digest);
-{$ENDIF}
- if digest = '' then
- digest:= s
- else
- TryDo(s = digest, 'Different maps generated, sorry', true);
-end;
-
procedure DrawLine(X1, Y1, X2, Y2: LongInt; Color: Longword);
var
eX, eY, dX, dY: LongInt;
@@ -319,17 +278,6 @@
end;
end;
-function LandBackPixel(x, y: LongInt): LongWord;
-var p: PLongWordArray;
-begin
- if LandBackSurface = nil then LandBackPixel:= 0
- else
- begin
- p:= LandBackSurface^.pixels;
- LandBackPixel:= p^[LandBackSurface^.w * (y mod LandBackSurface^.h) + (x mod LandBackSurface^.w)];// or $FF000000;
- end
-end;
-
procedure ColorizeLand(Surface: PSDL_Surface);
var tmpsurf: PSDL_Surface;
r, rr: TSDL_Rect;
@@ -385,7 +333,7 @@
r.x:= x mod tmpsurf^.w;
r.y:= 0;
r.w:= 1;
- r.h:= min(16, yd - yu + 1);
+ r.h:= Min(16, yd - yu + 1);
SDL_UpperBlit(tmpsurf, @r, Surface, @rr);
end;
yd:= yu - 1;
@@ -1239,8 +1187,6 @@
AddProgress;
-{$IFDEF DEBUGFILE}LogLandDigest;{$ENDIF}
-
// check for land near top
c:= 0;
if (GameFlags and gfBorder) <> 0 then
@@ -1348,8 +1294,35 @@
GenPreview:= Preview
end;
+
+procedure chLandCheck(var s: shortstring);
+begin
+{$IFDEF DEBUGFILE}
+ AddFileLog('CheckLandDigest: ' + s + ' digest : ' + digest);
+{$ENDIF}
+ if digest = '' then
+ digest:= s
+ else
+ TryDo(s = digest, 'Different maps generated, sorry', true);
+end;
+
+procedure chSendLandDigest(var s: shortstring);
+var adler, i: LongInt;
+begin
+ adler:= 1;
+ for i:= 0 to LAND_HEIGHT-1 do
+ Adler32Update(adler, @Land[i,0], LAND_WIDTH);
+ s:= 'M' + IntToStr(adler);
+
+ chLandCheck(s);
+ SendIPCRaw(@s[0], Length(s) + 1)
+end;
+
procedure initModule;
begin
+ RegisterVariable('landcheck', vtCommand, @chLandCheck, false);
+ RegisterVariable('sendlanddigest', vtCommand, @chSendLandDigest, false);
+
LandBackSurface:= nil;
digest:= '';
--- a/hedgewars/uLandGraphics.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uLandGraphics.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,7 +20,7 @@
unit uLandGraphics;
interface
-uses uFloat, uConsts;
+uses uFloat, uConsts, uTypes;
type PRangeArray = ^TRangeArray;
TRangeArray = array[0..31] of record
@@ -30,34 +30,35 @@
function SweepDirty: boolean;
function Despeckle(X, Y: LongInt): boolean;
function CheckLandValue(X, Y: LongInt; LandFlag: Word): boolean;
-function DrawExplosion(X, Y, Radius: LongInt): Longword;
+function DrawExplosion(X, Y, Radius: LongInt): Longword;
procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte);
procedure DrawTunnel(X, Y, dX, dY: hwFloat; ticks, HalfWidth: LongInt);
procedure FillRoundInLand(X, Y, Radius: LongInt; Value: Longword);
procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet: boolean);
+function LandBackPixel(x, y: LongInt): LongWord;
function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean): boolean;
implementation
-uses SDLh, uMisc, uLand, uLandTexture;
+uses SDLh, uLandTexture, uVariables, uUtils, uDebug;
procedure FillCircleLines(x, y, dx, dy: LongInt; Value: Longword);
var i: LongInt;
begin
if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if (Land[y + dy, i] and lfIndestructible) = 0 then
Land[y + dy, i]:= Value;
if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if (Land[y - dy, i] and lfIndestructible) = 0 then
Land[y - dy, i]:= Value;
if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if (Land[y + dx, i] and lfIndestructible) = 0 then
Land[y + dx, i]:= Value;
if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if (Land[y - dx, i] and lfIndestructible) = 0 then
Land[y - dx, i]:= Value;
end;
@@ -68,33 +69,33 @@
if not doSet then
begin
if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if (Land[y + dy, i] > 0) and (Land[y + dy, i] < 256) then dec(Land[y + dy, i]); // check > 0 because explosion can erase collision data
if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if (Land[y - dy, i] > 0) and (Land[y - dy, i] < 256) then dec(Land[y - dy, i]);
if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if (Land[y + dx, i] > 0) and (Land[y + dx, i] < 256) then dec(Land[y + dx, i]);
if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if (Land[y - dx, i] > 0) and (Land[y - dx, i] < 256) then dec(Land[y - dx, i]);
end else
begin
if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if (Land[y + dy, i] < 256) then
inc(Land[y + dy, i]);
if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if (Land[y - dy, i] < 256) then
inc(Land[y - dy, i]);
if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if (Land[y + dx, i] < 256) then
inc(Land[y + dx, i]);
if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if (Land[y - dx, i] < 256) then
inc(Land[y - dx, i]);
end
@@ -145,7 +146,7 @@
begin
t:= y + dy;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if (not isMap and ((Land[t, i] and lfIndestructible) = 0)) or ((Land[t, i] and lfBasic) <> 0) then
if (cReducedQuality and rqBlurryLand) = 0 then
LandPixels[t, i]:= 0
@@ -154,7 +155,7 @@
t:= y - dy;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if (not isMap and ((Land[t, i] and lfIndestructible) = 0)) or ((Land[t, i] and lfBasic) <> 0) then
if (cReducedQuality and rqBlurryLand) = 0 then
LandPixels[t, i]:= 0
@@ -163,7 +164,7 @@
t:= y + dx;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if (not isMap and ((Land[t, i] and lfIndestructible) = 0)) or ((Land[t, i] and lfBasic) <> 0) then
if (cReducedQuality and rqBlurryLand) = 0 then
LandPixels[t, i]:= 0
@@ -172,7 +173,7 @@
t:= y - dx;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if (not isMap and ((Land[t, i] and lfIndestructible) = 0)) or ((Land[t, i] and lfBasic) <> 0) then
if (cReducedQuality and rqBlurryLand) = 0 then
LandPixels[t, i]:= 0
@@ -188,7 +189,7 @@
cnt:= 0;
t:= y + dy;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if ((Land[t, i] and lfBasic) <> 0) then
begin
inc(cnt);
@@ -206,7 +207,7 @@
t:= y - dy;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if ((Land[t, i] and lfBasic) <> 0) then
begin
inc(cnt);
@@ -224,7 +225,7 @@
t:= y + dx;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if ((Land[t, i] and lfBasic) <> 0) then
begin
inc(cnt);
@@ -242,7 +243,7 @@
t:= y - dx;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if ((Land[t, i] and lfBasic) <> 0) then
begin
inc(cnt);
@@ -265,7 +266,7 @@
begin
t:= y + dy;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then
begin
if (cReducedQuality and rqBlurryLand) = 0 then
@@ -280,7 +281,7 @@
t:= y - dy;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
+ for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then
begin
if (cReducedQuality and rqBlurryLand) = 0 then
@@ -294,7 +295,7 @@
t:= y + dx;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then
begin
if (cReducedQuality and rqBlurryLand) = 0 then
@@ -309,7 +310,7 @@
t:= y - dx;
if (t and LAND_HEIGHT_MASK) = 0 then
- for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
+ for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then
begin
if (cReducedQuality and rqBlurryLand) = 0 then
@@ -393,10 +394,10 @@
if (dx = dy) then FillLandCircleLinesEBC(x, y, dx, dy);
end;
-tx:= max(X - Radius - 1, 0);
-dx:= min(X + Radius + 1, LAND_WIDTH) - tx;
-ty:= max(Y - Radius - 1, 0);
-dy:= min(Y + Radius + 1, LAND_HEIGHT) - ty;
+tx:= Max(X - Radius - 1, 0);
+dx:= Min(X + Radius + 1, LAND_WIDTH) - tx;
+ty:= Max(Y - Radius - 1, 0);
+dy:= Min(Y + Radius + 1, LAND_HEIGHT) - ty;
UpdateLandTexture(tx, dx, ty, dy);
DrawExplosion:= cnt
end;
@@ -406,8 +407,8 @@
begin
for i:= 0 to Pred(Count) do
begin
- for ty:= max(y - Radius, 0) to min(y + Radius, LAND_HEIGHT) do
- for tx:= max(0, ar^[i].Left - Radius) to min(LAND_WIDTH, ar^[i].Right + Radius) do
+ for ty:= Max(y - Radius, 0) to Min(y + Radius, LAND_HEIGHT) do
+ for tx:= Max(0, ar^[i].Left - Radius) to Min(LAND_WIDTH, ar^[i].Right + Radius) do
if (Land[ty, tx] and lfBasic) <> 0 then
if (cReducedQuality and rqBlurryLand) = 0 then
LandPixels[ty, tx]:= LandBackPixel(tx, ty)
@@ -427,8 +428,8 @@
for i:= 0 to Pred(Count) do
begin
- for ty:= max(y - Radius, 0) to min(y + Radius, LAND_HEIGHT) do
- for tx:= max(0, ar^[i].Left - Radius) to min(LAND_WIDTH, ar^[i].Right + Radius) do
+ for ty:= Max(y - Radius, 0) to Min(y + Radius, LAND_HEIGHT) do
+ for tx:= Max(0, ar^[i].Left - Radius) to Min(LAND_WIDTH, ar^[i].Right + Radius) do
if ((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0) then
begin
if (cReducedQuality and rqBlurryLand) = 0 then
@@ -584,10 +585,10 @@
ny:= ny + dX;
end;
-tx:= max(stX - HalfWidth * 2 - 4 - abs(hwRound(dX * ticks)), 0);
-ty:= max(stY - HalfWidth * 2 - 4 - abs(hwRound(dY * ticks)), 0);
-ddx:= min(stX + HalfWidth * 2 + 4 + abs(hwRound(dX * ticks)), LAND_WIDTH) - tx;
-ddy:= min(stY + HalfWidth * 2 + 4 + abs(hwRound(dY * ticks)), LAND_HEIGHT) - ty;
+tx:= Max(stX - HalfWidth * 2 - 4 - abs(hwRound(dX * ticks)), 0);
+ty:= Max(stY - HalfWidth * 2 - 4 - abs(hwRound(dY * ticks)), 0);
+ddx:= Min(stX + HalfWidth * 2 + 4 + abs(hwRound(dX * ticks)), LAND_WIDTH) - tx;
+ddy:= Min(stY + HalfWidth * 2 + 4 + abs(hwRound(dY * ticks)), LAND_HEIGHT) - ty;
UpdateLandTexture(tx, ddx, ty, ddy)
end;
@@ -660,10 +661,10 @@
if SDL_MustLock(Image) then
SDL_UnlockSurface(Image);
-x:= max(cpX, leftX);
-w:= min(cpX + Image^.w, LAND_WIDTH) - x;
-y:= max(cpY, topY);
-h:= min(cpY + Image^.h, LAND_HEIGHT) - y;
+x:= Max(cpX, leftX);
+w:= Min(cpX + Image^.w, LAND_WIDTH) - x;
+y:= Max(cpY, topY);
+h:= Min(cpY + Image^.h, LAND_HEIGHT) - y;
UpdateLandTexture(x, w, y, h)
end;
@@ -772,4 +773,17 @@
begin
CheckLandValue:= ((X and LAND_WIDTH_MASK <> 0) or (Y and LAND_HEIGHT_MASK <> 0)) or ((Land[Y, X] and LandFlag) = 0)
end;
+
+function LandBackPixel(x, y: LongInt): LongWord;
+var p: PLongWordArray;
+begin
+ if LandBackSurface = nil then LandBackPixel:= 0
+ else
+ begin
+ p:= LandBackSurface^.pixels;
+ LandBackPixel:= p^[LandBackSurface^.w * (y mod LandBackSurface^.h) + (x mod LandBackSurface^.w)];// or $FF000000;
+ end
+end;
+
+
end.
--- a/hedgewars/uLandObjects.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uLandObjects.pas Tue Nov 30 22:46:47 2010 +0100
@@ -29,7 +29,8 @@
procedure AddOnLandObjects(Surface: PSDL_Surface);
implementation
-uses uLand, uStore, uConsts, uMisc, uConsole, uRandom, uVisualGears, uSound, GLunit;
+uses uStore, uConsts, uConsole, uRandom, uVisualGears, uSound, GLunit,
+ uTypes, uVariables, uUtils, uDebug;
const MaxRects = 512;
MAXOBJECTRECTS = 16;
--- a/hedgewars/uLandTexture.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uLandTexture.pas Tue Nov 30 22:46:47 2010 +0100
@@ -28,8 +28,7 @@
procedure DrawLand(dX, dY: LongInt);
implementation
-uses uMisc, uLand, uStore, uConsts, GLunit;
-
+uses uConsts, GLunit, uTypes, uVariables, uTextures, uDebug, uRender;
const TEXSIZE = 256;
--- a/hedgewars/uLocale.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uLocale.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,37 +20,9 @@
unit uLocale;
interface
-type TAmmoStrId = (sidNothing, sidGrenade, sidClusterBomb, sidBazooka, sidBee, sidShotgun,
- sidPickHammer, sidSkip, sidRope, sidMine, sidDEagle,
- sidDynamite, sidBaseballBat, sidFirePunch, sidSeconds,
- sidParachute, sidAirAttack, sidMineStrike, sidBlowTorch,
- sidGirder, sidTeleport, sidSwitch, sidMortar, sidWhip,
- sidKamikaze, sidCake, sidSeduction, sidWatermelon,
- sidHellishBomb, sidDrill, sidBallgun, sidNapalm, sidRCPlane,
- sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
- sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
- sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower,
- sidSMine, sidHammer, sidResurrector, sidDrillStrike);
-
- TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
- sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
- sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady);
-
- TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
- eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, eidHurtSelf,
- eidHomerun, eidGone);
-
- TGoalStrId = (gidCaption, gidSubCaption, gidForts, gidLowGravity, gidInvulnerable,
- gidVampiric, gidKarma, gidKing, gidPlaceHog, gidArtillery,
- gidSolidLand, gidSharedAmmo, gidMineTimer, gidNoMineTimer, gidRandomMineTimer,
- gidDamageModifier, gidResetHealth, gidAISurvival, gidInfAttack, gidResetWeps, gidPerHogAmmo);
+uses uTypes;
const MAX_EVENT_STRINGS = 100;
-var trammo: array[TAmmoStrId] of ansistring; // name of the weapon
- trammoc: array[TAmmoStrId] of ansistring; // caption of the weapon
- trammod: array[TAmmoStrId] of ansistring; // description of the weapon
- trmsg: array[TMsgStrId] of ansistring; // message of the event
- trgoal: array[TGoalStrId] of ansistring; // message of the goal
procedure LoadLocale(FileName: shortstring);
function Format(fmt: shortstring; var arg: shortstring): shortstring;
@@ -58,7 +30,7 @@
function GetEventString(e: TEventId): ansistring;
implementation
-uses uMisc, uRandom;
+uses uRandom, uUtils, uVariables, uDebug;
var trevt: array[TEventId] of array [0..Pred(MAX_EVENT_STRINGS)] of ansistring;
trevt_n: array[TEventId] of integer;
@@ -100,7 +72,7 @@
0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammo[TAmmoStrId(b+1)]:= s;
1: if (b >=0) and (b <= ord(High(TMsgStrId))) then trmsg[TMsgStrId(b)]:= s;
2: if (b >=0) and (b <= ord(High(TEventId))) then begin
- TryDo(trevt_n[TEventId(b)] < MAX_EVENT_STRINGS, 'Too many event strings in ' + inttostr(a) + ':' + inttostr(b), false);
+ TryDo(trevt_n[TEventId(b)] < MAX_EVENT_STRINGS, 'Too many event strings in ' + IntToStr(a) + ':' + IntToStr(b), false);
if first[TEventId(b)] then
begin
trevt_n[TEventId(b)]:= 0;
--- a/hedgewars/uMisc.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uMisc.pas Tue Nov 30 22:46:47 2010 +0100
@@ -21,237 +21,19 @@
unit uMisc;
interface
-uses SDLh, uConsts, uFloat, GLunit, Math;
-
-var
-/////// init flags ///////
- cScreenWidth : LongInt = 1024;
- cScreenHeight : LongInt = 768;
- cBits : LongInt = 32;
- //ipcPort is in uIO
- cFullScreen : boolean = false;
- isSoundEnabled : boolean = true;
- isMusicEnabled : boolean = false;
- cLocaleFName : shortstring = 'en.txt';
- cInitVolume : LongInt = 100;
- cTimerInterval : LongInt = 8;
- PathPrefix : shortstring = './';
- cShowFPS : boolean = false;
- cAltDamage : boolean = true;
- cReducedQuality : LongWord = rqNone;
- //userNick is in uChat
- recordFileName : shortstring = '';
- cReadyDelay : Longword = 0;
- cLogfileBase : shortstring = 'debug';
-//////////////////////////
-
- isCursorVisible : boolean;
- isTerminated : boolean;
- isInLag : boolean;
- isPaused : boolean;
+uses SDLh, uConsts, GLunit, uTypes;
- isSEBackup : boolean;
- isInMultiShoot : boolean;
- isSpeed : boolean;
- isFirstFrame : boolean;
-
- fastUntilLag : boolean;
-
- GameState : TGameState;
- GameType : TGameType;
- GameFlags : Longword;
- TrainingFlags : Longword;
- TurnTimeLeft : Longword;
- ReadyTimeLeft : Longword;
- cSuddenDTurns : LongInt;
- cDamagePercent : LongInt;
- cMineDudPercent : LongWord;
- cTemplateFilter : LongInt;
- cMapGen : LongInt;
- cMazeSize : LongInt;
-
- cHedgehogTurnTime: Longword;
- cMinesTime : LongInt;
- cMaxAIThinkTime : Longword;
-
- cHealthCaseProb : LongInt;
- cHealthCaseAmount: LongInt;
- cWaterRise : LongInt;
- cHealthDecrease : LongInt;
-
- cCloudsNumber : LongInt;
-
- cTagsMask : byte;
- zoom : GLfloat;
- ZoomValue : GLfloat;
-
- cWaterLine : LongInt;
- cGearScrEdgesDist: LongInt;
- GameTicks : LongWord;
- TrainingTimeInc : Longword;
- TrainingTimeInD : Longword;
- TrainingTimeInM : Longword;
- TrainingTimeMax : Longword;
-
- TimeTrialStartTime: Longword;
- TimeTrialStopTime : Longword;
-
- // originally from uConsts
- Pathz: array[TPathType] of shortstring;
- CountTexz: array[1..Pred(AMMO_INFINITE)] of PTexture;
- LAND_WIDTH : LongInt;
- LAND_HEIGHT : LongInt;
- LAND_WIDTH_MASK : LongWord;
- LAND_HEIGHT_MASK : LongWord;
- cMaxCaptions : LongInt;
-
- cLeftScreenBorder : LongInt;
- cRightScreenBorder : LongInt;
- cScreenSpace : LongInt;
-
- cCaseFactor : Longword;
- cLandMines : Longword;
- cExplosives : Longword;
-
- cSeed : shortstring;
- cVolumeDelta : LongInt;
- cHasFocus : boolean;
- cInactDelay : Longword;
-
- bBetweenTurns : boolean;
- bWaterRising : boolean;
-
- ShowCrosshair : boolean;
- CursorMovementX : LongInt;
- CursorMovementY : LongInt;
- cDrownSpeed : hwFloat;
- cDrownSpeedf : float;
- cMaxWindSpeed : hwFloat;
- cWindSpeed : hwFloat;
- cWindSpeedf : float;
- cGravity : hwFloat;
- cGravityf : float;
- cDamageModifier : hwFloat;
- cLaserSighting : boolean;
- cVampiric : boolean;
- cArtillery : boolean;
- WeaponTooltipTex : PTexture;
-
- flagMakeCapture : boolean;
-
- InitStepsFlags : Longword;
- RealTicks : Longword;
- AttackBar : LongInt;
-
- WaterColorArray : array[0..3] of HwColor4f;
-
- CursorPoint : TPoint;
- TargetPoint : TPoint;
-
- TextureList : PTexture;
-
- ScreenFade : TScreenFade;
- ScreenFadeValue : LongInt;
- ScreenFadeSpeed : LongInt;
-
-{$IFDEF SDL13}
- SDLwindow : PSDL_Window;
-{$ENDIF}
+procedure movecursor(dx, dy: LongInt);
+function doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
+procedure MakeScreenshot(filename: shortstring);
+function GetTeamStatString(p: PTeam): shortstring;
procedure initModule;
procedure freeModule;
-procedure SplitBySpace(var a, b: shortstring);
-procedure SplitByChar(var a, b: ansistring; c: char);
-function EnumToStr(const en : TGearType) : shortstring; overload;
-function EnumToStr(const en : TSound) : shortstring; overload;
-function EnumToStr(const en : TAmmoType) : shortstring; overload;
-function EnumToStr(const en : THogEffect) : shortstring; overload;
-procedure movecursor(dx, dy: LongInt);
-function hwSign(r: hwFloat): LongInt; inline;
-function Min(a, b: LongInt): LongInt; inline;
-function Max(a, b: LongInt): LongInt; inline;
-procedure OutError(Msg: shortstring; isFatalError: boolean);
-procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean); inline;
-procedure SDLTry(Assert: boolean; isFatal: boolean);
-function IntToStr(n: LongInt): shortstring;
-function FloatToStr(n: hwFloat): shortstring;
-function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat;
-function DxDy2Angle32(const _dY, _dX: hwFloat): LongInt;
-function DxDy2AttackAngle(const _dY, _dX: hwFloat): LongInt;
-(*
-procedure AdjustColor(var Color: Longword);
-procedure SetKB(n: Longword);
-*)
-procedure SendKB;
-procedure SetLittle(var r: hwFloat);
-procedure SendStat(sit: TStatInfoType; s: shortstring);
-function Str2PChar(const s: shortstring): PChar;
-function NewTexture(width, height: Longword; buf: Pointer): PTexture;
-function Surface2Tex(surf: PSDL_Surface; enableClamp: boolean): PTexture;
-procedure FreeTexture(tex: PTexture);
-function toPowerOf2(i: Longword): Longword; inline;
-function DecodeBase64(s: shortstring): shortstring;
-function doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
-function endian(independent: LongWord): LongWord; inline;
-{$IFDEF DEBUGFILE}
-procedure AddFileLog(s: shortstring);
-(* function RectToStr(Rect: TSDL_Rect): shortstring; *)
-{$ENDIF}
-procedure MakeScreenshot(filename: shortstring);
implementation
-uses uConsole, uStore, uIO, uSound, typinfo, sysutils, uMobile;
-
-var KBnum: Longword;
-{$IFDEF DEBUGFILE}
- f: textfile;
-{$ENDIF}
-
-// should this include "strtolower()" for the split string?
-procedure SplitBySpace(var a, b: shortstring);
-var i, t: LongInt;
-begin
-i:= Pos(' ', a);
-if i > 0 then
- begin
- for t:= 1 to Pred(i) do
- if (a[t] >= 'A')and(a[t] <= 'Z') then Inc(a[t], 32);
- b:= copy(a, i + 1, Length(a) - i);
- byte(a[0]):= Pred(i)
- end else b:= '';
-end;
-
-procedure SplitByChar(var a, b: ansistring; c: char);
-var i: LongInt;
-begin
-i:= Pos(c, a);
-if i > 0 then
- begin
- b:= copy(a, i + 1, Length(a) - i);
- setlength(a, Pred(i));
- end else b:= '';
-end;
-
-function EnumToStr(const en : TGearType) : shortstring; overload;
-begin
-EnumToStr:= GetEnumName(TypeInfo(TGearType), ord(en))
-end;
-
-function EnumToStr(const en : TSound) : shortstring; overload;
-begin
-EnumToStr:= GetEnumName(TypeInfo(TSound), ord(en))
-end;
-
-function EnumToStr(const en : TAmmoType) : shortstring; overload;
-begin
-EnumToStr:= GetEnumName(TypeInfo(TAmmoType), ord(en))
-end;
-
-function EnumToStr(const en: THogEffect) : shortstring; overload;
-begin
- EnumToStr := GetEnumName(TypeInfo(THogEffect), ord(en))
-end;
+uses typinfo, sysutils, uVariables;
procedure movecursor(dx, dy: LongInt);
var x, y: LongInt;
@@ -264,328 +46,6 @@
SDL_WarpMouse(x, y);
end;
-function hwSign(r: hwFloat): LongInt;
-begin
-// yes, we have negative zero for a reason
-if r.isNegative then hwSign:= -1 else hwSign:= 1
-end;
-
-function Min(a, b: LongInt): LongInt;
-begin
-if a < b then Min:= a else Min:= b
-end;
-
-function Max(a, b: LongInt): LongInt;
-begin
-if a > b then Max:= a else Max:= b
-end;
-
-procedure OutError(Msg: shortstring; isFatalError: boolean);
-begin
-// obsolete? written in WriteLnToConsole() anyway
-// {$IFDEF DEBUGFILE}AddFileLog(Msg);{$ENDIF}
-WriteLnToConsole(Msg);
-if isFatalError then
- begin
- SendIPC('E' + GetLastConsoleLine);
- SDL_Quit;
- halt(1)
- end
-end;
-
-procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean);
-begin
-if not Assert then OutError(Msg, isFatal)
-end;
-
-procedure SDLTry(Assert: boolean; isFatal: boolean);
-begin
-if not Assert then OutError(SDL_GetError, isFatal)
-end;
-
-(*
-procedure AdjustColor(var Color: Longword);
-begin
-Color:= SDL_MapRGB(PixelFormat, (Color shr 16) and $FF, (Color shr 8) and $FF, Color and $FF)
-end;
-
-procedure SetKB(n: Longword);
-begin
-KBnum:= n
-end;
-*)
-
-
-function IntToStr(n: LongInt): shortstring;
-begin
-str(n, IntToStr)
-end;
-
-function FloatToStr(n: hwFloat): shortstring;
-begin
-FloatToStr:= cstr(n) + '_' + inttostr(Lo(n.QWordValue))
-end;
-
-procedure SetTextureParameters(enableClamp: Boolean);
-begin
- if enableClamp and ((cReducedQuality and rqClampLess) = 0) then
- begin
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)
- end;
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
-end;
-
-function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat;
-var dY, dX: Extended;
-begin
-dY:= _dY.QWordValue / $100000000;
-if _dY.isNegative then dY:= - dY;
-dX:= _dX.QWordValue / $100000000;
-if _dX.isNegative then dX:= - dX;
-DxDy2Angle:= arctan2(dY, dX) * 180 / pi
-end;
-
-function DxDy2Angle32(const _dY, _dX: hwFloat): LongInt;
-const _16divPI: Extended = 16/pi;
-var dY, dX: Extended;
-begin
-dY:= _dY.QWordValue / $100000000;
-if _dY.isNegative then dY:= - dY;
-dX:= _dX.QWordValue / $100000000;
-if _dX.isNegative then dX:= - dX;
-DxDy2Angle32:= trunc(arctan2(dY, dX) * _16divPI) and $1f
-end;
-
-function DxDy2AttackAngle(const _dY, _dX: hwFloat): LongInt;
-const MaxAngleDivPI: Extended = cMaxAngle/pi;
-var dY, dX: Extended;
-begin
-dY:= _dY.QWordValue / $100000000;
-if _dY.isNegative then dY:= - dY;
-dX:= _dX.QWordValue / $100000000;
-if _dX.isNegative then dX:= - dX;
-DxDy2AttackAngle:= trunc(arctan2(dY, dX) * MaxAngleDivPI)
-end;
-
-procedure SendKB;
-var s: shortstring;
-begin
-if KBnum <> 0 then
-begin
-s:= 'K' + inttostr(KBnum);
-SendIPCRaw(@s, Length(s) + 1)
-end
-end;
-
-procedure SetLittle(var r: hwFloat);
-begin
-r:= SignAs(cLittle, r)
-end;
-
-procedure SendStat(sit: TStatInfoType; s: shortstring);
-const stc: array [TStatInfoType] of char = 'rDkKHTPsSB';
-var buf: shortstring;
-begin
-buf:= 'i' + stc[sit] + s;
-SendIPCRaw(@buf[0], length(buf) + 1)
-end;
-
-function Str2PChar(const s: shortstring): PChar;
-const CharArray: array[byte] of Char = '';
-begin
-CharArray:= s;
-CharArray[Length(s)]:= #0;
-Str2PChar:= @CharArray
-end;
-
-function isPowerOf2(i: Longword): boolean;
-begin
-if i = 0 then exit(true);
-while (i and 1) = 0 do i:= i shr 1;
-isPowerOf2:= (i = 1)
-end;
-
-function toPowerOf2(i: Longword): Longword;
-begin
-toPowerOf2:= 1;
-while (toPowerOf2 < i) do toPowerOf2:= toPowerOf2 shl 1
-end;
-
-procedure ResetVertexArrays(texture: PTexture);
-begin
-with texture^ do
- begin
- vb[0].X:= 0;
- vb[0].Y:= 0;
- vb[1].X:= w;
- vb[1].Y:= 0;
- vb[2].X:= w;
- vb[2].Y:= h;
- vb[3].X:= 0;
- vb[3].Y:= h;
-
- tb[0].X:= 0;
- tb[0].Y:= 0;
- tb[1].X:= rx;
- tb[1].Y:= 0;
- tb[2].X:= rx;
- tb[2].Y:= ry;
- tb[3].X:= 0;
- tb[3].Y:= ry
- end;
-end;
-
-function NewTexture(width, height: Longword; buf: Pointer): PTexture;
-begin
-new(NewTexture);
-NewTexture^.PrevTexture:= nil;
-NewTexture^.NextTexture:= nil;
-NewTexture^.Scale:= 1;
-if TextureList <> nil then
- begin
- TextureList^.PrevTexture:= NewTexture;
- NewTexture^.NextTexture:= TextureList
- end;
-TextureList:= NewTexture;
-
-NewTexture^.w:= width;
-NewTexture^.h:= height;
-NewTexture^.rx:= 1.0;
-NewTexture^.ry:= 1.0;
-
-ResetVertexArrays(NewTexture);
-
-glGenTextures(1, @NewTexture^.id);
-
-glBindTexture(GL_TEXTURE_2D, NewTexture^.id);
-glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, buf);
-
-SetTextureParameters(true);
-end;
-
-function Surface2Tex(surf: PSDL_Surface; enableClamp: boolean): PTexture;
-var tw, th, x, y: Longword;
- tmpp: pointer;
- fromP4, toP4: PLongWordArray;
-begin
-new(Surface2Tex);
-Surface2Tex^.PrevTexture:= nil;
-Surface2Tex^.NextTexture:= nil;
-if TextureList <> nil then
- begin
- TextureList^.PrevTexture:= Surface2Tex;
- Surface2Tex^.NextTexture:= TextureList
- end;
-TextureList:= Surface2Tex;
-
-Surface2Tex^.w:= surf^.w;
-Surface2Tex^.h:= surf^.h;
-
-if (surf^.format^.BytesPerPixel <> 4) then
- begin
- TryDo(false, 'Surface2Tex failed, expecting 32 bit surface', true);
- Surface2Tex^.id:= 0;
- exit
- end;
-
-
-glGenTextures(1, @Surface2Tex^.id);
-
-glBindTexture(GL_TEXTURE_2D, Surface2Tex^.id);
-
-if SDL_MustLock(surf) then
- SDLTry(SDL_LockSurface(surf) >= 0, true);
-
-if (not SupportNPOTT) and (not (isPowerOf2(Surf^.w) and isPowerOf2(Surf^.h))) then
- begin
- tw:= toPowerOf2(Surf^.w);
- th:= toPowerOf2(Surf^.h);
-
- Surface2Tex^.rx:= Surf^.w / tw;
- Surface2Tex^.ry:= Surf^.h / th;
-
- GetMem(tmpp, tw * th * surf^.format^.BytesPerPixel);
-
- fromP4:= Surf^.pixels;
- toP4:= tmpp;
-
- for y:= 0 to Pred(Surf^.h) do
- begin
- for x:= 0 to Pred(Surf^.w) do toP4^[x]:= fromP4^[x];
- for x:= Surf^.w to Pred(tw) do toP4^[x]:= 0;
- toP4:= @(toP4^[tw]);
- fromP4:= @(fromP4^[Surf^.pitch div 4])
- end;
-
- for y:= Surf^.h to Pred(th) do
- begin
- for x:= 0 to Pred(tw) do toP4^[x]:= 0;
- toP4:= @(toP4^[tw])
- end;
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tw, th, 0, GL_RGBA, GL_UNSIGNED_BYTE, tmpp);
-
- FreeMem(tmpp, tw * th * surf^.format^.BytesPerPixel)
- end
-else
- begin
- Surface2Tex^.rx:= 1.0;
- Surface2Tex^.ry:= 1.0;
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, surf^.w, surf^.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, surf^.pixels);
- end;
-
-ResetVertexArrays(Surface2Tex);
-
-if SDL_MustLock(surf) then
- SDL_UnlockSurface(surf);
-
-SetTextureParameters(enableClamp);
-end;
-
-procedure FreeTexture(tex: PTexture);
-begin
- if tex <> nil then
- begin
- if tex^.NextTexture <> nil then
- tex^.NextTexture^.PrevTexture:= tex^.PrevTexture;
- if tex^.PrevTexture <> nil then
- tex^.PrevTexture^.NextTexture:= tex^.NextTexture
- else
- TextureList:= tex^.NextTexture;
- glDeleteTextures(1, @tex^.id);
- Dispose(tex);
- end
-end;
-
-function DecodeBase64(s: shortstring): shortstring;
-const table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
-var i, t, c: Longword;
-begin
-c:= 0;
-for i:= 1 to Length(s) do
- begin
- t:= Pos(s[i], table);
- if s[i] = '=' then inc(c);
- if t > 0 then byte(s[i]):= t - 1 else byte(s[i]):= 0
- end;
-
-i:= 1;
-t:= 1;
-while i <= length(s) do
- begin
- DecodeBase64[t ]:= char((byte(s[i ]) shl 2) or (byte(s[i + 1]) shr 4));
- DecodeBase64[t + 1]:= char((byte(s[i + 1]) shl 4) or (byte(s[i + 2]) shr 2));
- DecodeBase64[t + 2]:= char((byte(s[i + 2]) shl 6) or (byte(s[i + 3]) ));
- inc(t, 3);
- inc(i, 4)
- end;
-
-if c < 3 then t:= t - c;
-
-byte(DecodeBase64[0]):= t - 1
-end;
procedure MakeScreenshot(filename: shortstring);
var p: Pointer;
@@ -610,8 +70,6 @@
0, 0, 0, 0 // number of important colors
);
begin
-playSound(sndShutter);
-
// flash
ScreenFade:= sfFromWhite;
ScreenFadeValue:= sfMax;
@@ -659,20 +117,6 @@
FreeMem(p)
end;
-{$IFDEF DEBUGFILE}
-procedure AddFileLog(s: shortstring);
-begin
-writeln(f, GameTicks: 6, ': ', s);
-flush(f)
-end;
-(*
-function RectToStr(Rect: TSDL_Rect): shortstring;
-begin
-RectToStr:= '(x: ' + inttostr(rect.x) + '; y: ' + inttostr(rect.y) + '; w: ' + inttostr(rect.w) + '; h: ' + inttostr(rect.h) + ')'
-end;
-*)
-{$ENDIF}
-
function doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface;
{* for more information http://www.idevgames.com/forum/showpost.php?p=85864&postcount=7 *}
var convertedSurf: PSDL_Surface = nil;
@@ -687,200 +131,21 @@
exit(tmpsurf);
end;
-function endian(independent: LongWord): LongWord; inline;
+
+function GetTeamStatString(p: PTeam): shortstring;
+var s: ansistring;
begin
-{$IFDEF ENDIAN_LITTLE}
-endian:= independent;
-{$ELSE}
-endian:= (((independent and $FF000000) shr 24) or
- ((independent and $00FF0000) shr 8) or
- ((independent and $0000FF00) shl 8) or
- ((independent and $000000FF) shl 24))
-{$ENDIF}
+ s:= p^.TeamName + ':' + IntToStr(p^.TeamHealth) + ':';
+ GetTeamStatString:= s;
end;
-
procedure initModule;
-{$IFDEF DEBUGFILE}{$IFNDEF IPHONEOS}var i: LongInt;{$ENDIF}{$ENDIF}
begin
- Pathz:= cPathz;
- {* REFERENCE
- 4096 -> $FFFFF000
- 2048 -> $FFFFF800
- 1024 -> $FFFFFC00
- 512 -> $FFFFFE00 *}
- if (cReducedQuality and rqLowRes) <> 0 then
- begin
- LAND_WIDTH:= 2048;
- LAND_HEIGHT:= 1024;
- LAND_WIDTH_MASK:= $FFFFF800;
- LAND_HEIGHT_MASK:= $FFFFFC00;
- end
- else
- begin
- LAND_WIDTH:= 4096;
- LAND_HEIGHT:= 2048;
- LAND_WIDTH_MASK:= $FFFFF000;
- LAND_HEIGHT_MASK:= $FFFFF800
- end;
-
- cDrownSpeed.QWordValue := 257698038; // 0.06
- cDrownSpeedf := 0.06;
- cMaxWindSpeed.QWordValue:= 1073742; // 0.00025
- cWindSpeed.QWordValue := 429496; // 0.0001
- cWindSpeedf := 0.0001;
- cGravity := cMaxWindSpeed * 2;
- cGravityf := 0.00025 * 2;
- cDamageModifier := _1;
- TargetPoint := cTargetPointRef;
- TextureList := nil;
-
- // int, longint longword and byte
- CursorMovementX := 0;
- CursorMovementY := 0;
- GameTicks := 0;
- TrainingTimeInc := 10000;
- TrainingTimeInD := 500;
- TrainingTimeInM := 5000;
- TrainingTimeMax := 60000;
- TimeTrialStartTime := 0;
- TimeTrialStopTime := 0;
- cWaterLine := LAND_HEIGHT;
- cGearScrEdgesDist := 240;
-
- GameFlags := 0;
- TrainingFlags := 0;
- TurnTimeLeft := 0;
- cSuddenDTurns := 15;
- cDamagePercent := 100;
- cMineDudPercent := 0;
- cTemplateFilter := 0;
- cMapGen := 0; // MAPGEN_REGULAR
- cMazeSize := 0;
- cHedgehogTurnTime := 45000;
- cMinesTime := 3;
- cMaxAIThinkTime := 9000;
- cCloudsNumber := 9;
- cHealthCaseProb := 35;
- cHealthCaseAmount := 25;
- cWaterRise := 47;
- cHealthDecrease := 5;
-
- cTagsMask := 0;
- KBnum := 0;
- InitStepsFlags := 0;
- RealTicks := 0;
- AttackBar := 0; // 0 - none, 1 - just bar at the right-down corner, 2 - from weapon
- cCaseFactor := 5; {0..9}
- cLandMines := 4;
- cExplosives := 2;
-
- GameState := Low(TGameState);
- GameType := gmtLocal;
- zoom := cDefaultZoomLevel;
- ZoomValue := cDefaultZoomLevel;
- WeaponTooltipTex:= nil;
- cLaserSighting := false;
- cVampiric := false;
- cArtillery := false;
- flagMakeCapture := false;
- bBetweenTurns := false;
- bWaterRising := false;
- isCursorVisible := false;
- isTerminated := false;
- isInLag := false;
- isPaused := false;
- isInMultiShoot := false;
- isSpeed := false;
- fastUntilLag := false;
- isFirstFrame := true;
- isSEBackup := true;
- cSeed := '';
- cVolumeDelta := 0;
- cHasFocus := true;
- cInactDelay := 1250;
- ReadyTimeLeft := 0;
-
- ScreenFade := sfNone;
-
-{$IFDEF SDL13}
- SDLwindow := nil;
-{$ENDIF}
-
- // those values still aren't perfect
- cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth);
- cRightScreenBorder:= round(cMinZoomLevel * cScreenWidth + LAND_WIDTH);
- cScreenSpace:= cRightScreenBorder - cLeftScreenBorder;
-
- if isPhone() then
- cMaxCaptions:= 3
- else
- cMaxCaptions:= 4;
-
-{$IFDEF DEBUGFILE}
-{$I-}
-{$IFDEF IPHONEOS}
- Assign(f,'../Documents/hw-' + cLogfileBase + '.log');
- Rewrite(f);
-{$ELSE}
- if (ParamStr(1) <> '') and (ParamStr(2) <> '') then
- if (ParamCount <> 3) and (ParamCount <> cDefaultParamNum) then
- begin
- for i:= 0 to 7 do
- begin
- assign(f, ExtractFileDir(ParamStr(2)) + '/' + cLogfileBase + inttostr(i) + '.log');
- rewrite(f);
- if IOResult = 0 then break;
- end;
- if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr
- end
- else
- begin
- for i:= 0 to 7 do
- begin
- assign(f, ParamStr(1) + '/Logs/' + cLogfileBase + inttostr(i) + '.log');
- rewrite(f);
- if IOResult = 0 then break;
- end;
- if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr
- end
- else
- f:= stderr;
-{$ENDIF}
-{$I+}
-{$ENDIF}
-
end;
procedure freeModule;
begin
recordFileName:= '';
- while TextureList <> nil do FreeTexture(TextureList);
-
-{$IFDEF DEBUGFILE}
- writeln(f, 'halt at ', GameTicks, ' ticks. TurnTimeLeft = ', TurnTimeLeft);
- flush(f);
- close(f);
-{$ENDIF}
-
- // re-init flags so they will always contain safe values
- cScreenWidth := 1024;
- cScreenHeight := 768;
- cBits := 32;
- //ipcPort is in uIO
- cFullScreen := false;
- isSoundEnabled := true;
- isMusicEnabled := false;
- cLocaleFName := 'en.txt';
- cInitVolume := 100;
- cTimerInterval := 8;
- PathPrefix := './';
- cShowFPS := false;
- cAltDamage := true;
- cReducedQuality := rqNone;
- //userNick is in uChat
- recordFileName := '';
- cReadyDelay := 0;
end;
end.
--- a/hedgewars/uMobile.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uMobile.pas Tue Nov 30 22:46:47 2010 +0100
@@ -42,7 +42,6 @@
procedure perfExt_SaveFinishedSynching; inline;
implementation
-uses uTeams, uConsole;
function isPhone: Boolean; inline;
begin
--- a/hedgewars/uRandom.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uRandom.pas Tue Nov 30 22:46:47 2010 +0100
@@ -30,12 +30,8 @@
function GetRandom: hwFloat; overload;
function GetRandom(m: LongWord): LongWord; overload;
function rndSign(num: hwFloat): hwFloat;
-{$IFDEF DEBUGFILE}
-procedure DumpBuffer;
-{$ENDIF}
implementation
-uses uMisc;
var cirbuf: array[0..63] of Longword;
n: byte;
@@ -76,7 +72,6 @@
function GetRandom(m: LongWord): LongWord;
begin
-TryDo((m > 0),'GetRandom(0) called! Please report this to the developers!',true);
GetNext;
GetRandom:= GetNext mod m
end;
@@ -87,15 +82,6 @@
rndSign:= num
end;
-{$IFDEF DEBUGFILE}
-procedure DumpBuffer;
-var i: LongInt;
-begin
-for i:= 0 to 63 do
- AddFileLog('[' + inttostr(i) + '] = ' + inttostr(cirbuf[i]))
-end;
-{$ENDIF}
-
procedure initModule;
begin
n:= 54;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uRender.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,444 @@
+{$INCLUDE "options.inc"}
+unit uRender;
+
+interface
+
+uses SDLh, uTypes, GLunit;
+
+procedure DrawSpriteFromRect(Sprite: TSprite; r: TSDL_Rect; X, Y, Height, Position: LongInt);
+procedure DrawFromRect(X, Y, W, H: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
+procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
+procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt);
+procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt);
+procedure DrawSpriteClipped(Sprite: TSprite; X, Y, TopY, RightX, BottomY, LeftX: LongInt);
+procedure DrawTexture(X, Y: LongInt; Texture: PTexture; Scale: GLfloat = 1.0);
+procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, w, h: LongInt);
+procedure DrawRotatedTextureF(Texture: PTexture; Scale, OffsetX, OffsetY: GLfloat; X, Y, Frame, Dir, w, h: LongInt; Angle: real);
+procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real);
+procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real);
+procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
+procedure DrawCentered(X, Top: LongInt; Source: PTexture);
+procedure DrawLine(X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte);
+procedure DrawFillRect(r: TSDL_Rect);
+procedure DrawCircle(X, Y, Radius, Width: LongInt; r, g, b, a: Byte);
+procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
+procedure Tint(r, g, b, a: Byte); inline;
+procedure Tint(c: Longword); inline;
+
+var
+ HHTexture: PTexture;
+
+implementation
+uses uVariables;
+var
+ lastTint: Longword;
+
+procedure DrawSpriteFromRect(Sprite: TSprite; r: TSDL_Rect; X, Y, Height, Position: LongInt);
+begin
+r.y:= r.y + Height * Position;
+r.h:= Height;
+DrawFromRect(X, Y, @r, SpritesData[Sprite].Texture)
+end;
+
+procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
+begin
+DrawFromRect(X, Y, r^.w, r^.h, r, SourceTexture)
+end;
+
+procedure DrawFromRect(X, Y, W, H: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
+var rr: TSDL_Rect;
+ _l, _r, _t, _b: real;
+ VertexBuffer, TextureBuffer: array [0..3] of TVertex2f;
+begin
+if (SourceTexture^.h = 0) or (SourceTexture^.w = 0) then exit;
+
+// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
+if (abs(X) > W) and ((abs(X + W / 2) - W / 2) > cScreenWidth / cScaleFactor) then
+ exit;
+if (abs(Y) > H) and ((abs(Y + H / 2 - (0.5 * cScreenHeight)) - H / 2) > cScreenHeight / cScaleFactor) then
+ exit;
+
+rr.x:= X;
+rr.y:= Y;
+rr.w:= W;
+rr.h:= H;
+
+_l:= r^.x / SourceTexture^.w * SourceTexture^.rx;
+_r:= (r^.x + r^.w) / SourceTexture^.w * SourceTexture^.rx;
+_t:= r^.y / SourceTexture^.h * SourceTexture^.ry;
+_b:= (r^.y + r^.h) / SourceTexture^.h * SourceTexture^.ry;
+
+glBindTexture(GL_TEXTURE_2D, SourceTexture^.id);
+
+VertexBuffer[0].X:= X;
+VertexBuffer[0].Y:= Y;
+VertexBuffer[1].X:= rr.w + X;
+VertexBuffer[1].Y:= Y;
+VertexBuffer[2].X:= rr.w + X;
+VertexBuffer[2].Y:= rr.h + Y;
+VertexBuffer[3].X:= X;
+VertexBuffer[3].Y:= rr.h + Y;
+
+TextureBuffer[0].X:= _l;
+TextureBuffer[0].Y:= _t;
+TextureBuffer[1].X:= _r;
+TextureBuffer[1].Y:= _t;
+TextureBuffer[2].X:= _r;
+TextureBuffer[2].Y:= _b;
+TextureBuffer[3].X:= _l;
+TextureBuffer[3].Y:= _b;
+
+
+glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
+glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
+glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
+end;
+
+
+procedure DrawTexture(X, Y: LongInt; Texture: PTexture; Scale: GLfloat);
+begin
+
+glPushMatrix;
+glTranslatef(X, Y, 0);
+glScalef(Scale, Scale, 1);
+
+glBindTexture(GL_TEXTURE_2D, Texture^.id);
+
+glVertexPointer(2, GL_FLOAT, 0, @Texture^.vb);
+glTexCoordPointer(2, GL_FLOAT, 0, @Texture^.tb);
+glDrawArrays(GL_TRIANGLE_FAN, 0, Length(Texture^.vb));
+
+glPopMatrix
+end;
+
+procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, w, h: LongInt);
+begin
+ DrawRotatedTextureF(Texture, Scale, 0, 0, X, Y, Frame, Dir, w, h, 0)
+end;
+
+procedure DrawRotatedTextureF(Texture: PTexture; Scale, OffsetX, OffsetY: GLfloat; X, Y, Frame, Dir, w, h: LongInt; Angle: real);
+var ft, fb, fl, fr: GLfloat;
+ hw, nx, ny: LongInt;
+ VertexBuffer, TextureBuffer: array [0..3] of TVertex2f;
+begin
+// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
+if (abs(X) > W) and ((abs(X + dir * OffsetX) - W / 2) * cScaleFactor > cScreenWidth) then
+ exit;
+if (abs(Y) > H) and ((abs(Y + OffsetY - (0.5 * cScreenHeight)) - W / 2) * cScaleFactor > cScreenHeight) then
+ exit;
+
+glPushMatrix;
+glTranslatef(X, Y, 0);
+
+if Dir < 0 then
+ glRotatef(Angle, 0, 0, -1)
+else
+ glRotatef(Angle, 0, 0, 1);
+
+glTranslatef(Dir*OffsetX, OffsetY, 0);
+glScalef(Scale, Scale, 1);
+
+// Any reason for this call? And why only in t direction, not s?
+//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+if Dir < 0 then
+ hw:= w div -2
+else
+ hw:= w div 2;
+
+nx:= round(Texture^.w / w); // number of horizontal frames
+ny:= round(Texture^.h / h); // number of vertical frames
+
+ft:= (Frame mod ny) * Texture^.ry / ny;
+fb:= ((Frame mod ny) + 1) * Texture^.ry / ny;
+fl:= (Frame div ny) * Texture^.rx / nx;
+fr:= ((Frame div ny) + 1) * Texture^.rx / nx;
+
+glBindTexture(GL_TEXTURE_2D, Texture^.id);
+
+VertexBuffer[0].X:= -hw;
+VertexBuffer[0].Y:= w / -2;
+VertexBuffer[1].X:= hw;
+VertexBuffer[1].Y:= w / -2;
+VertexBuffer[2].X:= hw;
+VertexBuffer[2].Y:= w / 2;
+VertexBuffer[3].X:= -hw;
+VertexBuffer[3].Y:= w / 2;
+
+TextureBuffer[0].X:= fl;
+TextureBuffer[0].Y:= ft;
+TextureBuffer[1].X:= fr;
+TextureBuffer[1].Y:= ft;
+TextureBuffer[2].X:= fr;
+TextureBuffer[2].Y:= fb;
+TextureBuffer[3].X:= fl;
+TextureBuffer[3].Y:= fb;
+
+glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
+glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
+glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
+
+glPopMatrix
+end;
+
+procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real);
+begin
+ DrawRotatedTex(SpritesData[Sprite].Texture,
+ SpritesData[Sprite].Width,
+ SpritesData[Sprite].Height,
+ X, Y, Dir, Angle)
+end;
+
+procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real);
+begin
+glPushMatrix;
+glTranslatef(X, Y, 0);
+
+if Dir < 0 then
+ glRotatef(Angle, 0, 0, -1)
+else
+ glRotatef(Angle, 0, 0, 1);
+if Dir < 0 then glScalef(-1.0, 1.0, 1.0);
+
+DrawSprite(Sprite, -SpritesData[Sprite].Width div 2, -SpritesData[Sprite].Height div 2, Frame);
+
+glPopMatrix
+end;
+
+procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
+var VertexBuffer: array [0..3] of TVertex2f;
+begin
+// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
+if (abs(X) > 2 * hw) and ((abs(X) - hw) > cScreenWidth / cScaleFactor) then
+ exit;
+if (abs(Y) > 2 * hh) and ((abs(Y - 0.5 * cScreenHeight) - hh) > cScreenHeight / cScaleFactor) then
+ exit;
+
+glPushMatrix;
+glTranslatef(X, Y, 0);
+
+if Dir < 0 then
+ begin
+ hw:= - hw;
+ glRotatef(Angle, 0, 0, -1);
+ end else
+ glRotatef(Angle, 0, 0, 1);
+
+
+glBindTexture(GL_TEXTURE_2D, Tex^.id);
+
+VertexBuffer[0].X:= -hw;
+VertexBuffer[0].Y:= -hh;
+VertexBuffer[1].X:= hw;
+VertexBuffer[1].Y:= -hh;
+VertexBuffer[2].X:= hw;
+VertexBuffer[2].Y:= hh;
+VertexBuffer[3].X:= -hw;
+VertexBuffer[3].Y:= hh;
+
+glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
+glTexCoordPointer(2, GL_FLOAT, 0, @Tex^.tb);
+glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
+
+glPopMatrix
+end;
+
+procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt);
+var row, col, numFramesFirstCol: LongInt;
+begin
+numFramesFirstCol:= SpritesData[Sprite].imageHeight div SpritesData[Sprite].Height;
+row:= Frame mod numFramesFirstCol;
+col:= Frame div numFramesFirstCol;
+DrawSprite2 (Sprite, X, Y, col, row);
+end;
+
+procedure DrawSpriteClipped(Sprite: TSprite; X, Y, TopY, RightX, BottomY, LeftX: LongInt);
+var r: TSDL_Rect;
+begin
+r.x:= 0;
+r.y:= 0;
+r.w:= SpritesData[Sprite].Width;
+r.h:= SpritesData[Sprite].Height;
+
+if (X < LeftX) then
+ r.x:= LeftX - X;
+if (Y < TopY) then
+ r.y:= TopY - Y;
+
+if (Y + SpritesData[Sprite].Height > BottomY) then
+ r.h:= BottomY - Y + 1;
+if (X + SpritesData[Sprite].Width > RightX) then
+ r.w:= RightX - X + 1;
+
+dec(r.h, r.y);
+dec(r.w, r.x);
+
+DrawFromRect(X + r.x, Y + r.y, @r, SpritesData[Sprite].Texture)
+end;
+
+procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt);
+var r: TSDL_Rect;
+begin
+ r.x:= FrameX * SpritesData[Sprite].Width;
+ r.w:= SpritesData[Sprite].Width;
+ r.y:= FrameY * SpritesData[Sprite].Height;
+ r.h:= SpritesData[Sprite].Height;
+ DrawFromRect(X, Y, @r, SpritesData[Sprite].Texture)
+end;
+
+procedure DrawCentered(X, Top: LongInt; Source: PTexture);
+var scale: GLfloat;
+begin
+ if (Source^.w + 20) > cScreenWidth then
+ scale:= cScreenWidth / (Source^.w + 20)
+ else
+ scale:= 1.0;
+ DrawTexture(X - round(Source^.w * scale) div 2, Top, Source, scale)
+end;
+
+procedure DrawLine(X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte);
+var VertexBuffer: array [0..3] of TVertex2f;
+begin
+ glDisable(GL_TEXTURE_2D);
+ glEnable(GL_LINE_SMOOTH);
+
+ glPushMatrix;
+ glTranslatef(WorldDx, WorldDy, 0);
+ glLineWidth(Width);
+
+ Tint(r, g, b, a);
+ VertexBuffer[0].X:= X0;
+ VertexBuffer[0].Y:= Y0;
+ VertexBuffer[1].X:= X1;
+ VertexBuffer[1].Y:= Y1;
+
+ glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
+ glDrawArrays(GL_LINES, 0, Length(VertexBuffer));
+ Tint($FF, $FF, $FF, $FF);
+
+ glPopMatrix;
+
+ glEnable(GL_TEXTURE_2D);
+ glDisable(GL_LINE_SMOOTH);
+end;
+
+procedure DrawFillRect(r: TSDL_Rect);
+var VertexBuffer: array [0..3] of TVertex2f;
+begin
+// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
+if (abs(r.x) > r.w) and ((abs(r.x + r.w / 2) - r.w / 2) * cScaleFactor > cScreenWidth) then
+ exit;
+if (abs(r.y) > r.h) and ((abs(r.y + r.h / 2 - (0.5 * cScreenHeight)) - r.h / 2) * cScaleFactor > cScreenHeight) then
+ exit;
+
+glDisable(GL_TEXTURE_2D);
+
+Tint($00, $00, $00, $80);
+
+VertexBuffer[0].X:= r.x;
+VertexBuffer[0].Y:= r.y;
+VertexBuffer[1].X:= r.x + r.w;
+VertexBuffer[1].Y:= r.y;
+VertexBuffer[2].X:= r.x + r.w;
+VertexBuffer[2].Y:= r.y + r.h;
+VertexBuffer[3].X:= r.x;
+VertexBuffer[3].Y:= r.y + r.h;
+
+glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
+glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
+
+Tint($FF, $FF, $FF, $FF);
+glEnable(GL_TEXTURE_2D)
+end;
+
+procedure DrawCircle(X, Y, Radius, Width: LongInt; r, g, b, a: Byte);
+var
+ i: LongInt;
+ CircleVertex: array [0..359] of TVertex2f;
+begin
+ for i := 0 to 359 do begin
+ CircleVertex[i].X := X + Radius*cos(i*pi/180);
+ CircleVertex[i].Y := Y + Radius*sin(i*pi/180);
+ end;
+ glDisable(GL_TEXTURE_2D);
+ glEnable(GL_LINE_SMOOTH);
+ glPushMatrix;
+ glLineWidth(Width);
+ Tint(r, g, b, a);
+ glVertexPointer(2, GL_FLOAT, 0, @CircleVertex[0]);
+ glDrawArrays(GL_LINE_LOOP, 0, 360);
+ Tint($FF, $FF, $FF, $FF);
+ glPopMatrix;
+ glEnable(GL_TEXTURE_2D);
+ glDisable(GL_LINE_SMOOTH);
+end;
+
+
+procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
+const VertexBuffer: array [0..3] of TVertex2f = (
+ (x: -16; y: -16),
+ (x: 16; y: -16),
+ (x: 16; y: 16),
+ (x: -16; y: 16));
+var l, r, t, b: real;
+ TextureBuffer: array [0..3] of TVertex2f;
+begin
+ // don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
+ if (abs(X) > 32) and ((abs(X) - 16) * cScaleFactor > cScreenWidth) then
+ exit;
+ if (abs(Y) > 32) and ((abs(Y - 0.5 * cScreenHeight) - 16) * cScaleFactor > cScreenHeight) then
+ exit;
+
+ t:= Pos * 32 / HHTexture^.h;
+ b:= (Pos + 1) * 32 / HHTexture^.h;
+
+ if Dir = -1 then
+ begin
+ l:= (Step + 1) * 32 / HHTexture^.w;
+ r:= Step * 32 / HHTexture^.w
+ end else
+ begin
+ l:= Step * 32 / HHTexture^.w;
+ r:= (Step + 1) * 32 / HHTexture^.w
+ end;
+
+
+ glPushMatrix();
+ glTranslatef(X, Y, 0);
+ glRotatef(Angle, 0, 0, 1);
+
+ glBindTexture(GL_TEXTURE_2D, HHTexture^.id);
+
+ TextureBuffer[0].X:= l;
+ TextureBuffer[0].Y:= t;
+ TextureBuffer[1].X:= r;
+ TextureBuffer[1].Y:= t;
+ TextureBuffer[2].X:= r;
+ TextureBuffer[2].Y:= b;
+ TextureBuffer[3].X:= l;
+ TextureBuffer[3].Y:= b;
+
+ glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
+ glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
+ glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
+
+ glPopMatrix
+end;
+
+
+procedure Tint(r, g, b, a: Byte); inline;
+var nc: Longword;
+begin
+nc:= (a shl 24) or (b shl 16) or (g shl 8) or r;
+if nc = lastTint then
+ exit;
+glColor4ub(r, g, b, a);
+lastTint:= nc;
+end;
+
+procedure Tint(c: Longword); inline;
+begin
+Tint(((c shr 16) and $FF), ((c shr 8) and $FF), (c and $FF), $FF);
+end;
+
+end.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uRenderUtils.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,356 @@
+{$INCLUDE "options.inc"}
+unit uRenderUtils;
+
+interface
+uses SDLh, uTypes;
+
+procedure flipSurface(Surface: PSDL_Surface; Vertical: Boolean);
+procedure copyRotatedSurface(src, dest: PSDL_Surface); // this is necessary since width/height are read only in SDL
+procedure copyToXY(src, dest: PSDL_Surface; destX, destY: LongInt);
+function RenderStringTex(s: ansistring; Color: Longword; font: THWFont): PTexture;
+function RenderSpeechBubbleTex(s: ansistring; SpeechType: Longword; font: THWFont): PTexture;
+procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean);
+
+implementation
+uses uUtils, uVariables, uConsts, uTextures, sysutils, uDebug;
+
+procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean);
+var r: TSDL_Rect;
+begin
+ r:= rect^;
+ if Clear then SDL_FillRect(Surface, @r, 0);
+
+ BorderColor:= SDL_MapRGB(Surface^.format, BorderColor shr 16, BorderColor shr 8, BorderColor and $FF);
+ FillColor:= SDL_MapRGB(Surface^.format, FillColor shr 16, FillColor shr 8, FillColor and $FF);
+
+ r.y:= rect^.y + 1;
+ r.h:= rect^.h - 2;
+ SDL_FillRect(Surface, @r, BorderColor);
+ r.x:= rect^.x + 1;
+ r.w:= rect^.w - 2;
+ r.y:= rect^.y;
+ r.h:= rect^.h;
+ SDL_FillRect(Surface, @r, BorderColor);
+ r.x:= rect^.x + 2;
+ r.y:= rect^.y + 1;
+ r.w:= rect^.w - 4;
+ r.h:= rect^.h - 2;
+ SDL_FillRect(Surface, @r, FillColor);
+ r.x:= rect^.x + 1;
+ r.y:= rect^.y + 2;
+ r.w:= rect^.w - 2;
+ r.h:= rect^.h - 4;
+ SDL_FillRect(Surface, @r, FillColor)
+end;
+
+function WriteInRoundRect(Surface: PSDL_Surface; X, Y: LongInt; Color: LongWord; Font: THWFont; s: ansistring): TSDL_Rect;
+var w, h: LongInt;
+ tmpsurf: PSDL_Surface;
+ clr: TSDL_Color;
+ finalRect: TSDL_Rect;
+begin
+ TTF_SizeUTF8(Fontz[Font].Handle, Str2PChar(s), w, h);
+ finalRect.x:= X;
+ finalRect.y:= Y;
+ finalRect.w:= w + FontBorder * 2 + 4;
+ finalRect.h:= h + FontBorder * 2;
+ DrawRoundRect(@finalRect, cWhiteColor, endian(cNearBlackColorChannels.value), Surface, true);
+ clr.r:= (Color shr 16) and $FF;
+ clr.g:= (Color shr 8) and $FF;
+ clr.b:= Color and $FF;
+ tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, Str2PChar(s), clr);
+ finalRect.x:= X + FontBorder + 2;
+ finalRect.y:= Y + FontBorder;
+ SDLTry(tmpsurf <> nil, true);
+ SDL_UpperBlit(tmpsurf, nil, Surface, @finalRect);
+ SDL_FreeSurface(tmpsurf);
+ finalRect.x:= X;
+ finalRect.y:= Y;
+ finalRect.w:= w + FontBorder * 2 + 4;
+ finalRect.h:= h + FontBorder * 2;
+ WriteInRoundRect:= finalRect;
+end;
+
+procedure flipSurface(Surface: PSDL_Surface; Vertical: Boolean);
+var y, x, i, j: LongInt;
+ tmpPixel: Longword;
+ pixels: PLongWordArray;
+begin
+ TryDo(Surface^.format^.BytesPerPixel = 4, 'flipSurface failed, expecting 32 bit surface', true);
+ pixels:= Surface^.pixels;
+ if Vertical then
+ for y := 0 to (Surface^.h div 2) - 1 do
+ for x := 0 to Surface^.w - 1 do
+ begin
+ i:= y * Surface^.w + x;
+ j:= (Surface^.h - y - 1) * Surface^.w + x;
+ tmpPixel:= pixels^[i];
+ pixels^[i]:= pixels^[j];
+ pixels^[j]:= tmpPixel;
+ end
+ else
+ for x := 0 to (Surface^.w div 2) - 1 do
+ for y := 0 to Surface^.h -1 do
+ begin
+ i:= y*Surface^.w + x;
+ j:= y*Surface^.w + (Surface^.w - x - 1);
+ tmpPixel:= pixels^[i];
+ pixels^[i]:= pixels^[j];
+ pixels^[j]:= tmpPixel;
+ end;
+end;
+
+procedure copyToXY(src, dest: PSDL_Surface; destX, destY: LongInt);
+var srcX, srcY, i, j, maxDest: LongInt;
+ srcPixels, destPixels: PLongWordArray;
+ r0, g0, b0, a0, r1, g1, b1, a1: Byte;
+begin
+ maxDest:= (dest^.pitch div 4) * dest^.h;
+ srcPixels:= src^.pixels;
+ destPixels:= dest^.pixels;
+
+ for srcX:= 0 to src^.w - 1 do
+ for srcY:= 0 to src^.h - 1 do
+ begin
+ i:= (destY + srcY) * (dest^.pitch div 4) + destX + srcX;
+ j:= srcY * (src^.pitch div 4) + srcX;
+ if (i < maxDest) and (srcPixels^[j] and AMask <> 0) then
+ begin
+ SDL_GetRGBA(destPixels^[i], dest^.format, @r0, @g0, @b0, @a0);
+ SDL_GetRGBA(srcPixels^[j], src^.format, @r1, @g1, @b1, @a1);
+ r0:= (r0 * (255 - LongInt(a1)) + r1 * LongInt(a1)) div 255;
+ g0:= (g0 * (255 - LongInt(a1)) + g1 * LongInt(a1)) div 255;
+ b0:= (b0 * (255 - LongInt(a1)) + b1 * LongInt(a1)) div 255;
+ a0:= (a0 * (255 - LongInt(a1)) + a1 * LongInt(a1)) div 255;
+ destPixels^[i]:= SDL_MapRGBA(dest^.format, r0, g0, b0, a0);
+ end;
+ end;
+end;
+
+procedure copyRotatedSurface(src, dest: PSDL_Surface); // this is necessary since width/height are read only in SDL, apparently
+var y, x, i, j: LongInt;
+ srcPixels, destPixels: PLongWordArray;
+begin
+ TryDo(src^.format^.BytesPerPixel = 4, 'rotateSurface failed, expecting 32 bit surface', true);
+ TryDo(dest^.format^.BytesPerPixel = 4, 'rotateSurface failed, expecting 32 bit surface', true);
+
+ srcPixels:= src^.pixels;
+ destPixels:= dest^.pixels;
+
+ j:= 0;
+ for x := 0 to src^.w - 1 do
+ for y := 0 to src^.h - 1 do
+ begin
+ i:= (src^.h - 1 - y) * (src^.pitch div 4) + x;
+ destPixels^[j]:= srcPixels^[i];
+ inc(j)
+ end;
+end;
+
+function RenderStringTex(s: ansistring; Color: Longword; font: THWFont): PTexture;
+var w, h: LongInt;
+ finalSurface: PSDL_Surface;
+begin
+ if length(s) = 0 then s:= ' ';
+ font:= CheckCJKFont(s, font);
+ w:= 0; h:= 0; // avoid compiler hints
+ TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(s), w, h);
+
+ finalSurface:= SDL_CreateRGBSurface(SDL_SWSURFACE, w + FontBorder * 2 + 4, h + FontBorder * 2,
+ 32, RMask, GMask, BMask, AMask);
+
+ TryDo(finalSurface <> nil, 'RenderString: fail to create surface', true);
+
+ WriteInRoundRect(finalSurface, 0, 0, Color, font, s);
+
+ TryDo(SDL_SetColorKey(finalSurface, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true);
+
+ RenderStringTex:= Surface2Tex(finalSurface, false);
+
+ SDL_FreeSurface(finalSurface);
+end;
+
+
+function RenderSpeechBubbleTex(s: ansistring; SpeechType: Longword; font: THWFont): PTexture;
+var textWidth, textHeight, x, y, w, h, i, j, pos, prevpos, line, numLines, edgeWidth, edgeHeight, cornerWidth, cornerHeight: LongInt;
+ finalSurface, tmpsurf, rotatedEdge: PSDL_Surface;
+ rect: TSDL_Rect;
+ chars: set of char = [#9,' ','.',';',':','?','!',','];
+ substr: shortstring;
+ edge, corner, tail: TSPrite;
+begin
+ case SpeechType of
+ 1: begin;
+ edge:= sprSpeechEdge;
+ corner:= sprSpeechCorner;
+ tail:= sprSpeechTail;
+ end;
+ 2: begin;
+ edge:= sprThoughtEdge;
+ corner:= sprThoughtCorner;
+ tail:= sprThoughtTail;
+ end;
+ 3: begin;
+ edge:= sprShoutEdge;
+ corner:= sprShoutCorner;
+ tail:= sprShoutTail;
+ end;
+ end;
+ edgeHeight:= SpritesData[edge].Height;
+ edgeWidth:= SpritesData[edge].Width;
+ cornerWidth:= SpritesData[corner].Width;
+ cornerHeight:= SpritesData[corner].Height;
+ // This one screws up WrapText
+ //s:= 'This is the song that never ends. ''cause it goes on and on my friends. Some people, started singing it not knowing what it was. And they''ll just go on singing it forever just because... This is the song that never ends...';
+ // This one does not
+ //s:= 'This is the song that never ends. cause it goes on and on my friends. Some people, started singing it not knowing what it was. And they will go on singing it forever just because... This is the song that never ends... ';
+
+ numLines:= 0;
+
+ if length(s) = 0 then s:= '...';
+ font:= CheckCJKFont(s, font);
+ w:= 0; h:= 0; // avoid compiler hints
+ TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(s), w, h);
+ if w<8 then w:= 8;
+ j:= 0;
+ if (length(s) > 20) then
+ begin
+ w:= 0;
+ i:= round(Sqrt(length(s)) * 2);
+ s:= WrapText(s, #1, chars, i);
+ pos:= 1; prevpos:= 0; line:= 0;
+ // Find the longest line for the purposes of centring the text. Font dependant.
+ while pos <= length(s) do
+ begin
+ if (s[pos] = #1) or (pos = length(s)) then
+ begin
+ inc(numlines);
+ if s[pos] <> #1 then inc(pos);
+ while s[prevpos+1] = ' ' do inc(prevpos);
+ substr:= copy(s, prevpos+1, pos-prevpos-1);
+ i:= 0; j:= 0;
+ TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(substr), i, j);
+ if i > w then w:= i;
+ prevpos:= pos;
+ end;
+ inc(pos);
+ end;
+ end
+ else numLines := 1;
+
+ textWidth:=((w-(cornerWidth-edgeWidth)*2) div edgeWidth)*edgeWidth+edgeWidth;
+ textHeight:=(((numlines * h + 2)-((cornerHeight-edgeWidth)*2)) div edgeWidth)*edgeWidth;
+
+ textHeight:=max(textHeight,edgeWidth);
+ //textWidth:=max(textWidth,SpritesData[tail].Width);
+ rect.x:= 0;
+ rect.y:= 0;
+ rect.w:= textWidth + (cornerWidth * 2);
+ rect.h:= textHeight + cornerHeight*2 - edgeHeight + SpritesData[tail].Height;
+ //s:= inttostr(w) + ' ' + inttostr(numlines) + ' ' + inttostr(rect.x) + ' '+inttostr(rect.y) + ' ' + inttostr(rect.w) + ' ' + inttostr(rect.h);
+
+ finalSurface:= SDL_CreateRGBSurface(SDL_SWSURFACE, rect.w, rect.h, 32, RMask, GMask, BMask, AMask);
+
+ TryDo(finalSurface <> nil, 'RenderString: fail to create surface', true);
+
+ //////////////////////////////// CORNERS ///////////////////////////////
+ copyToXY(SpritesData[corner].Surface, finalSurface, 0, 0); /////////////////// NW
+
+ flipSurface(SpritesData[corner].Surface, true); // store all 4 versions in memory to avoid repeated flips?
+ x:= 0;
+ y:= textHeight + cornerHeight -1;
+ copyToXY(SpritesData[corner].Surface, finalSurface, x, y); /////////////////// SW
+
+ flipSurface(SpritesData[corner].Surface, false);
+ x:= rect.w-cornerWidth-1;
+ y:= textHeight + cornerHeight -1;
+ copyToXY(SpritesData[corner].Surface, finalSurface, x, y); /////////////////// SE
+
+ flipSurface(SpritesData[corner].Surface, true);
+ x:= rect.w-cornerWidth-1;
+ y:= 0;
+ copyToXY(SpritesData[corner].Surface, finalSurface, x, y); /////////////////// NE
+ flipSurface(SpritesData[corner].Surface, false); // restore original position
+ //////////////////////////////// END CORNERS ///////////////////////////////
+
+ //////////////////////////////// EDGES //////////////////////////////////////
+ x:= cornerWidth;
+ y:= 0;
+ while x < rect.w-cornerWidth-1 do
+ begin
+ copyToXY(SpritesData[edge].Surface, finalSurface, x, y); ///////////////// top edge
+ inc(x,edgeWidth);
+ end;
+ flipSurface(SpritesData[edge].Surface, true);
+ x:= cornerWidth;
+ y:= textHeight + cornerHeight*2 - edgeHeight-1;
+ while x < rect.w-cornerWidth-1 do
+ begin
+ copyToXY(SpritesData[edge].Surface, finalSurface, x, y); ///////////////// bottom edge
+ inc(x,edgeWidth);
+ end;
+ flipSurface(SpritesData[edge].Surface, true); // restore original position
+
+ rotatedEdge:= SDL_CreateRGBSurface(SDL_SWSURFACE, edgeHeight, edgeWidth, 32, RMask, GMask, BMask, AMask);
+ x:= rect.w - edgeHeight - 1;
+ y:= cornerHeight;
+ //// initially was going to rotate in place, but the SDL spec claims width/height are read only
+ copyRotatedSurface(SpritesData[edge].Surface,rotatedEdge);
+ while y < textHeight + cornerHeight do
+ begin
+ copyToXY(rotatedEdge, finalSurface, x, y);
+ inc(y,edgeWidth);
+ end;
+ flipSurface(rotatedEdge, false); // restore original position
+ x:= 0;
+ y:= cornerHeight;
+ while y < textHeight + cornerHeight do
+ begin
+ copyToXY(rotatedEdge, finalSurface, x, y);
+ inc(y,edgeWidth);
+ end;
+ //////////////////////////////// END EDGES //////////////////////////////////////
+
+ x:= cornerWidth;
+ y:= textHeight + cornerHeight * 2 - edgeHeight - 1;
+ copyToXY(SpritesData[tail].Surface, finalSurface, x, y);
+
+ rect.x:= edgeHeight;
+ rect.y:= edgeHeight;
+ rect.w:= rect.w - edgeHeight * 2;
+ rect.h:= textHeight + cornerHeight * 2 - edgeHeight * 2;
+ i:= rect.w;
+ j:= rect.h;
+ SDL_FillRect(finalSurface, @rect, cWhiteColor);
+
+ pos:= 1; prevpos:= 0; line:= 0;
+ while pos <= length(s) do
+ begin
+ if (s[pos] = #1) or (pos = length(s)) then
+ begin
+ if s[pos] <> #1 then inc(pos);
+ while s[prevpos+1] = ' 'do inc(prevpos);
+ substr:= copy(s, prevpos+1, pos-prevpos-1);
+ if Length(substr) <> 0 then
+ begin
+ tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, Str2PChar(substr), cNearBlackColorChannels);
+ rect.x:= edgeHeight + 1 + ((i - w) div 2);
+ // trying to more evenly position the text, vertically
+ rect.y:= edgeHeight + ((j-(numLines*h)) div 2) + line * h;
+ SDLTry(tmpsurf <> nil, true);
+ SDL_UpperBlit(tmpsurf, nil, finalSurface, @rect);
+ SDL_FreeSurface(tmpsurf);
+ inc(line);
+ prevpos:= pos;
+ end;
+ end;
+ inc(pos);
+ end;
+
+ RenderSpeechBubbleTex:= Surface2Tex(finalSurface, true);
+
+ SDL_FreeSurface(rotatedEdge);
+ SDL_FreeSurface(finalSurface);
+end;
+
+end.
\ No newline at end of file
--- a/hedgewars/uScript.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uScript.pas Tue Nov 30 22:46:47 2010 +0100
@@ -41,7 +41,6 @@
{$IFNDEF LUA_DISABLED}
uses LuaPas in 'LuaPas.pas',
uConsole,
- uMisc,
uConsts,
uVisualGears,
uGears,
@@ -49,11 +48,16 @@
uWorld,
uAmmos,
uSound,
- uTeams,
- uKeys,
uChat,
uStats,
- uRandom;
+ uRandom,
+ uTypes,
+ uVariables,
+ uCommands,
+ uUtils,
+ uKeys,
+ uCaptions,
+ uDebug;
var luaState : Plua_State;
ScriptAmmoLoadout : shortstring;
@@ -299,7 +303,7 @@
else begin
gear := GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
- lua_pushinteger(L, PHedgehog(gear^.Hedgehog)^.BotLevel)
+ lua_pushinteger(L, gear^.Hedgehog^.BotLevel)
else
lua_pushnil(L);
end;
@@ -319,7 +323,7 @@
gear:= GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
begin
- lua_pushinteger(L, PHedgehog(gear^.Hedgehog)^.Team^.Clan^.ClanIndex)
+ lua_pushinteger(L, gear^.Hedgehog^.Team^.Clan^.ClanIndex)
end
else
lua_pushnil(L);
@@ -340,7 +344,7 @@
gear:= GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
begin
- lua_pushstring(L, str2pchar(PHedgehog(gear^.Hedgehog)^.Team^.TeamName))
+ lua_pushstring(L, str2pchar(gear^.Hedgehog^.Team^.TeamName))
end
else
lua_pushnil(L);
@@ -361,7 +365,7 @@
gear:= GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
begin
- lua_pushstring(L, str2pchar(PHedgehog(gear^.Hedgehog)^.Name))
+ lua_pushstring(L, str2pchar(gear^.Hedgehog^.Name))
end
else
lua_pushnil(L);
@@ -570,7 +574,7 @@
else begin
gear := GearByUID(lua_tointeger(L, 1));
if gear <> nil then
- PHedgehog(gear^.Hedgehog)^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_tointeger(L, 3) <> 0;
+ gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_toboolean(L, 3);
end;
lc_seteffect := 0;
end;
@@ -821,6 +825,21 @@
end;
lc_getrandom:= 1
end;
+
+function lc_setwind(L : Plua_State) : LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 1 then
+ LuaError('Lua: Wrong number of parameters passed to SetWind!')
+ else
+ begin
+ cWindSpeed:= int2hwfloat(lua_tointeger(L, 1)) / 100 * cMaxWindSpeed;
+ cWindSpeedf:= SignAs(cWindSpeed,cWindSpeed).QWordValue / SignAs(_1,_1).QWordValue;
+ if cWindSpeed.isNegative then
+ CWindSpeedf := -cWindSpeedf;
+ AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1)^.Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed);
+ end;
+ lc_setwind:= 0
+end;
///////////////////
procedure ScriptPrintStack;
@@ -1211,6 +1230,7 @@
lua_register(luaState, 'GetGearMessage', @lc_getgearmessage);
lua_register(luaState, 'SetGearMessage', @lc_setgearmessage);
lua_register(luaState, 'GetRandom', @lc_getrandom);
+lua_register(luaState, 'SetWind', @lc_setwind);
ScriptClearStack; // just to be sure stack is empty
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uSinTable.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,1053 @@
+(*
+ * Hedgewars, a free turn based strategy game
+ * Copyright (c) 2007 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *)
+
+unit uSinTable;
+
+interface
+
+const SinTable: array[0..1024] of QWord = (
+ $00000000,
+ $006487EB,
+ $00C90FC6,
+ $012D9782,
+ $01921F10,
+ $01F6A660,
+ $025B2D62,
+ $02BFB407,
+ $03243A40,
+ $0388BFFC,
+ $03ED452D,
+ $0451C9C3,
+ $04B64DAF,
+ $051AD0E0,
+ $057F5348,
+ $05E3D4D7,
+ $0648557E,
+ $06ACD52C,
+ $071153D3,
+ $0775D163,
+ $07DA4DCC,
+ $083EC900,
+ $08A342EE,
+ $0907BB86,
+ $096C32BB,
+ $09D0A87B,
+ $0A351CB8,
+ $0A998F62,
+ $0AFE0069,
+ $0B626FBF,
+ $0BC6DD53,
+ $0C2B4916,
+ $0C8FB2F9,
+ $0CF41AEB,
+ $0D5880DF,
+ $0DBCE4C3,
+ $0E214689,
+ $0E85A622,
+ $0EEA037D,
+ $0F4E5E8B,
+ $0FB2B73D,
+ $10170D83,
+ $107B614E,
+ $10DFB28F,
+ $11440135,
+ $11A84D31,
+ $120C9675,
+ $1270DCF0,
+ $12D52093,
+ $1339614E,
+ $139D9F13,
+ $1401D9D1,
+ $14661179,
+ $14CA45FC,
+ $152E774A,
+ $1592A554,
+ $15F6D00B,
+ $165AF75E,
+ $16BF1B3E,
+ $17233B9D,
+ $1787586A,
+ $17EB7197,
+ $184F8713,
+ $18B398CF,
+ $1917A6BC,
+ $197BB0CB,
+ $19DFB6EB,
+ $1A43B90E,
+ $1AA7B724,
+ $1B0BB11E,
+ $1B6FA6EC,
+ $1BD3987F,
+ $1C3785C8,
+ $1C9B6EB6,
+ $1CFF533B,
+ $1D633348,
+ $1DC70ECC,
+ $1E2AE5B8,
+ $1E8EB7FE,
+ $1EF2858D,
+ $1F564E57,
+ $1FBA124B,
+ $201DD15B,
+ $20818B77,
+ $20E5408F,
+ $2148F095,
+ $21AC9B79,
+ $2210412C,
+ $2273E19E,
+ $22D77CBF,
+ $233B1281,
+ $239EA2D5,
+ $24022DAA,
+ $2465B2F1,
+ $24C9329C,
+ $252CAC9A,
+ $259020DD,
+ $25F38F55,
+ $2656F7F3,
+ $26BA5AA7,
+ $271DB762,
+ $27810E14,
+ $27E45EB0,
+ $2847A924,
+ $28AAED62,
+ $290E2B5B,
+ $297162FF,
+ $29D4943F,
+ $2A37BF0B,
+ $2A9AE355,
+ $2AFE010D,
+ $2B611823,
+ $2BC42889,
+ $2C27322F,
+ $2C8A3506,
+ $2CED30FF,
+ $2D50260A,
+ $2DB31418,
+ $2E15FB1A,
+ $2E78DB01,
+ $2EDBB3BD,
+ $2F3E853F,
+ $2FA14F78,
+ $30041258,
+ $3066CDD1,
+ $30C981D3,
+ $312C2E50,
+ $318ED336,
+ $31F17079,
+ $32540608,
+ $32B693D3,
+ $331919CD,
+ $337B97E6,
+ $33DE0E0E,
+ $34407C36,
+ $34A2E250,
+ $3505404B,
+ $3567961A,
+ $35C9E3AC,
+ $362C28F3,
+ $368E65DE,
+ $36F09A61,
+ $3752C66A,
+ $37B4E9EB,
+ $381704D5,
+ $38791719,
+ $38DB20A7,
+ $393D2170,
+ $399F1966,
+ $3A010879,
+ $3A62EE9A,
+ $3AC4CBBA,
+ $3B269FCB,
+ $3B886ABB,
+ $3BEA2C7E,
+ $3C4BE503,
+ $3CAD943C,
+ $3D0F3A1A,
+ $3D70D68C,
+ $3DD26986,
+ $3E33F2F6,
+ $3E9572CF,
+ $3EF6E901,
+ $3F58557E,
+ $3FB9B836,
+ $401B111A,
+ $407C601B,
+ $40DDA52A,
+ $413EE039,
+ $41A01138,
+ $42013818,
+ $426254CA,
+ $42C3673F,
+ $43246F69,
+ $43856D38,
+ $43E6609E,
+ $4447498B,
+ $44A827F0,
+ $4508FBBF,
+ $4569C4E9,
+ $45CA835E,
+ $462B3710,
+ $468BDFF0,
+ $46EC7DEE,
+ $474D10FD,
+ $47AD990D,
+ $480E160F,
+ $486E87F5,
+ $48CEEEAF,
+ $492F4A2F,
+ $498F9A65,
+ $49EFDF44,
+ $4A5018BB,
+ $4AB046BD,
+ $4B10693A,
+ $4B708024,
+ $4BD08B6C,
+ $4C308B02,
+ $4C907ED9,
+ $4CF066E1,
+ $4D50430C,
+ $4DB0134A,
+ $4E0FD78D,
+ $4E6F8FC7,
+ $4ECF3BE8,
+ $4F2EDBE2,
+ $4F8E6FA6,
+ $4FEDF725,
+ $504D7250,
+ $50ACE11A,
+ $510C4372,
+ $516B994B,
+ $51CAE295,
+ $522A1F43,
+ $52894F44,
+ $52E8728C,
+ $5347890A,
+ $53A692B0,
+ $54058F70,
+ $54647F3B,
+ $54C36203,
+ $552237B8,
+ $5581004C,
+ $55DFBBB0,
+ $563E69D7,
+ $569D0AB0,
+ $56FB9E2E,
+ $575A2443,
+ $57B89CDE,
+ $581707F3,
+ $58756572,
+ $58D3B54D,
+ $5931F775,
+ $59902BDC,
+ $59EE5273,
+ $5A4C6B2B,
+ $5AAA75F7,
+ $5B0872C8,
+ $5B66618E,
+ $5BC4423C,
+ $5C2214C4,
+ $5C7FD916,
+ $5CDD8F25,
+ $5D3B36E1,
+ $5D98D03D,
+ $5DF65B29,
+ $5E53D798,
+ $5EB1457C,
+ $5F0EA4C4,
+ $5F6BF565,
+ $5FC9374E,
+ $60266A71,
+ $60838EC1,
+ $60E0A42F,
+ $613DAAAC,
+ $619AA22A,
+ $61F78A9B,
+ $625463F0,
+ $62B12E1B,
+ $630DE90E,
+ $636A94BB,
+ $63C73113,
+ $6423BE08,
+ $64803B8B,
+ $64DCA98F,
+ $65390805,
+ $659556DF,
+ $65F1960E,
+ $664DC585,
+ $66A9E535,
+ $6705F510,
+ $6761F508,
+ $67BDE50F,
+ $6819C516,
+ $6875950F,
+ $68D154EC,
+ $692D049F,
+ $6988A41B,
+ $69E4334F,
+ $6A3FB230,
+ $6A9B20AE,
+ $6AF67EBB,
+ $6B51CC49,
+ $6BAD094B,
+ $6C0835B2,
+ $6C635170,
+ $6CBE5C77,
+ $6D1956B9,
+ $6D744028,
+ $6DCF18B5,
+ $6E29E054,
+ $6E8496F6,
+ $6EDF3C8C,
+ $6F39D10A,
+ $6F945460,
+ $6FEEC681,
+ $70492760,
+ $70A376EE,
+ $70FDB51D,
+ $7157E1DF,
+ $71B1FD26,
+ $720C06E5,
+ $7265FF0E,
+ $72BFE593,
+ $7319BA65,
+ $73737D77,
+ $73CD2EBC,
+ $7426CE24,
+ $74805BA4,
+ $74D9D72C,
+ $753340AF,
+ $758C981F,
+ $75E5DD6E,
+ $763F108F,
+ $76983174,
+ $76F1400F,
+ $774A3C52,
+ $77A32630,
+ $77FBFD9B,
+ $7854C285,
+ $78AD74E0,
+ $7906149F,
+ $795EA1B5,
+ $79B71C13,
+ $7A0F83AC,
+ $7A67D872,
+ $7AC01A58,
+ $7B184950,
+ $7B70654C,
+ $7BC86E3F,
+ $7C20641B,
+ $7C7846D3,
+ $7CD01659,
+ $7D27D2A0,
+ $7D7F7B99,
+ $7DD71139,
+ $7E2E9370,
+ $7E860232,
+ $7EDD5D71,
+ $7F34A51F,
+ $7F8BD930,
+ $7FE2F995,
+ $803A0641,
+ $8090FF28,
+ $80E7E43A,
+ $813EB56C,
+ $819572AF,
+ $81EC1BF7,
+ $8242B135,
+ $8299325D,
+ $82EF9F62,
+ $8345F835,
+ $839C3CC9,
+ $83F26D12,
+ $84488902,
+ $849E908B,
+ $84F483A1,
+ $854A6236,
+ $85A02C3C,
+ $85F5E1A8,
+ $864B826B,
+ $86A10E78,
+ $86F685C2,
+ $874BE83C,
+ $87A135D9,
+ $87F66E8C,
+ $884B9247,
+ $88A0A0FD,
+ $88F59AA1,
+ $894A7F26,
+ $899F4E7F,
+ $89F408A0,
+ $8A48AD7A,
+ $8A9D3D00,
+ $8AF1B727,
+ $8B461BE0,
+ $8B9A6B1F,
+ $8BEEA4D7,
+ $8C42C8FA,
+ $8C96D77C,
+ $8CEAD050,
+ $8D3EB368,
+ $8D9280B9,
+ $8DE63834,
+ $8E39D9CD,
+ $8E8D6578,
+ $8EE0DB27,
+ $8F343ACD,
+ $8F87845E,
+ $8FDAB7CC,
+ $902DD50C,
+ $9080DC0F,
+ $90D3CCCA,
+ $9126A72F,
+ $91796B31,
+ $91CC18C5,
+ $921EAFDD,
+ $9271306C,
+ $92C39A66,
+ $9315EDBE,
+ $93682A67,
+ $93BA5055,
+ $940C5F7A,
+ $945E57CB,
+ $94B0393B,
+ $950203BD,
+ $9553B744,
+ $95A553C4,
+ $95F6D930,
+ $9648477C,
+ $96999E9A,
+ $96EADE80,
+ $973C071F,
+ $978D186C,
+ $97DE125A,
+ $982EF4DD,
+ $987FBFE7,
+ $98D0736D,
+ $99210F62,
+ $997193BA,
+ $99C20068,
+ $9A125560,
+ $9A629296,
+ $9AB2B7FD,
+ $9B02C588,
+ $9B52BB2C,
+ $9BA298DC,
+ $9BF25E8C,
+ $9C420C2F,
+ $9C91A1B9,
+ $9CE11F1F,
+ $9D308453,
+ $9D7FD149,
+ $9DCF05F6,
+ $9E1E224C,
+ $9E6D2640,
+ $9EBC11C6,
+ $9F0AE4D1,
+ $9F599F56,
+ $9FA84148,
+ $9FF6CA9A,
+ $A0453B42,
+ $A0939332,
+ $A0E1D25F,
+ $A12FF8BC,
+ $A17E063F,
+ $A1CBFAD9,
+ $A219D681,
+ $A2679928,
+ $A2B542C5,
+ $A302D349,
+ $A3504AAB,
+ $A39DA8DD,
+ $A3EAEDD3,
+ $A4381983,
+ $A4852BDF,
+ $A4D224DD,
+ $A51F046F,
+ $A56BCA8B,
+ $A5B87724,
+ $A6050A2F,
+ $A65183A0,
+ $A69DE36B,
+ $A6EA2984,
+ $A73655DF,
+ $A7826871,
+ $A7CE612E,
+ $A81A400B,
+ $A86604FB,
+ $A8B1AFF3,
+ $A8FD40E7,
+ $A948B7CB,
+ $A9941495,
+ $A9DF5738,
+ $AA2A7FA9,
+ $AA758DDB,
+ $AAC081C5,
+ $AB0B5B59,
+ $AB561A8D,
+ $ABA0BF54,
+ $ABEB49A4,
+ $AC35B971,
+ $AC800EB0,
+ $ACCA4954,
+ $AD146953,
+ $AD5E6EA1,
+ $ADA85932,
+ $ADF228FC,
+ $AE3BDDF3,
+ $AE85780B,
+ $AECEF73A,
+ $AF185B73,
+ $AF61A4AC,
+ $AFAAD2D9,
+ $AFF3E5EF,
+ $B03CDDE3,
+ $B085BAA9,
+ $B0CE7C36,
+ $B117227F,
+ $B15FAD79,
+ $B1A81D19,
+ $B1F07153,
+ $B238AA1C,
+ $B280C769,
+ $B2C8C930,
+ $B310AF64,
+ $B35879FB,
+ $B3A028E9,
+ $B3E7BC25,
+ $B42F33A1,
+ $B4768F55,
+ $B4BDCF34,
+ $B504F334,
+ $B54BFB49,
+ $B592E769,
+ $B5D9B789,
+ $B6206B9E,
+ $B667039D,
+ $B6AD7F7A,
+ $B6F3DF2C,
+ $B73A22A7,
+ $B78049E1,
+ $B7C654CE,
+ $B80C4364,
+ $B8521599,
+ $B897CB60,
+ $B8DD64B0,
+ $B922E17E,
+ $B96841BF,
+ $B9AD8569,
+ $B9F2AC70,
+ $BA37B6CB,
+ $BA7CA46D,
+ $BAC1754E,
+ $BB062962,
+ $BB4AC09E,
+ $BB8F3AF8,
+ $BBD39866,
+ $BC17D8DD,
+ $BC5BFC52,
+ $BCA002BA,
+ $BCE3EC0D,
+ $BD27B83E,
+ $BD6B6744,
+ $BDAEF913,
+ $BDF26DA3,
+ $BE35C4E7,
+ $BE78FED6,
+ $BEBC1B66,
+ $BEFF1A8C,
+ $BF41FC3E,
+ $BF84C071,
+ $BFC7671B,
+ $C009F032,
+ $C04C5BAB,
+ $C08EA97D,
+ $C0D0D99E,
+ $C112EC02,
+ $C154E0A0,
+ $C196B76D,
+ $C1D87060,
+ $C21A0B6E,
+ $C25B888D,
+ $C29CE7B4,
+ $C2DE28D7,
+ $C31F4BEE,
+ $C36050ED,
+ $C3A137CB,
+ $C3E2007E,
+ $C422AAFC,
+ $C463373A,
+ $C4A3A530,
+ $C4E3F4D2,
+ $C5242618,
+ $C56438F7,
+ $C5A42D65,
+ $C5E40359,
+ $C623BAC8,
+ $C66353A9,
+ $C6A2CDF2,
+ $C6E22999,
+ $C7216694,
+ $C76084DA,
+ $C79F8461,
+ $C7DE651F,
+ $C81D270B,
+ $C85BCA1B,
+ $C89A4E44,
+ $C8D8B37F,
+ $C916F9C0,
+ $C95520FE,
+ $C9932930,
+ $C9D1124D,
+ $CA0EDC49,
+ $CA4C871D,
+ $CA8A12BF,
+ $CAC77F24,
+ $CB04CC45,
+ $CB41FA16,
+ $CB7F088F,
+ $CBBBF7A6,
+ $CBF8C752,
+ $CC35778A,
+ $CC720844,
+ $CCAE7977,
+ $CCEACB19,
+ $CD26FD21,
+ $CD630F87,
+ $CD9F0240,
+ $CDDAD543,
+ $CE168888,
+ $CE521C04,
+ $CE8D8FAF,
+ $CEC8E380,
+ $CF04176E,
+ $CF3F2B6E,
+ $CF7A1F79,
+ $CFB4F385,
+ $CFEFA78A,
+ $D02A3B7D,
+ $D064AF56,
+ $D09F030C,
+ $D0D93696,
+ $D11349EB,
+ $D14D3D02,
+ $D1870FD2,
+ $D1C0C253,
+ $D1FA547A,
+ $D233C641,
+ $D26D179C,
+ $D2A64885,
+ $D2DF58F1,
+ $D31848D8,
+ $D3511832,
+ $D389C6F5,
+ $D3C25519,
+ $D3FAC295,
+ $D4330F60,
+ $D46B3B73,
+ $D4A346C3,
+ $D4DB3148,
+ $D512FAFB,
+ $D54AA3D1,
+ $D5822BC4,
+ $D5B992C9,
+ $D5F0D8D8,
+ $D627FDEA,
+ $D65F01F5,
+ $D695E4F1,
+ $D6CCA6D6,
+ $D703479A,
+ $D739C736,
+ $D77025A2,
+ $D7A662D4,
+ $D7DC7EC5,
+ $D812796C,
+ $D84852C1,
+ $D87E0ABB,
+ $D8B3A152,
+ $D8E9167F,
+ $D91E6A38,
+ $D9539C76,
+ $D988AD30,
+ $D9BD9C5E,
+ $D9F269F8,
+ $DA2715F5,
+ $DA5BA04F,
+ $DA9008FC,
+ $DAC44FF5,
+ $DAF87531,
+ $DB2C78A8,
+ $DB605A53,
+ $DB941A29,
+ $DBC7B822,
+ $DBFB3437,
+ $DC2E8E60,
+ $DC61C694,
+ $DC94DCCB,
+ $DCC7D0FF,
+ $DCFAA326,
+ $DD2D533A,
+ $DD5FE131,
+ $DD924D06,
+ $DDC496AF,
+ $DDF6BE25,
+ $DE28C360,
+ $DE5AA658,
+ $DE8C6707,
+ $DEBE0563,
+ $DEEF8167,
+ $DF20DB09,
+ $DF521242,
+ $DF83270B,
+ $DFB4195C,
+ $DFE4E92D,
+ $E0159678,
+ $E0462134,
+ $E076895A,
+ $E0A6CEE2,
+ $E0D6F1C6,
+ $E106F1FD,
+ $E136CF81,
+ $E1668A4A,
+ $E1962250,
+ $E1C5978C,
+ $E1F4E9F7,
+ $E224198A,
+ $E253263D,
+ $E2821009,
+ $E2B0D6E7,
+ $E2DF7AD0,
+ $E30DFBBC,
+ $E33C59A4,
+ $E36A9482,
+ $E398AC4D,
+ $E3C6A0FF,
+ $E3F47291,
+ $E42220FC,
+ $E44FAC38,
+ $E47D143F,
+ $E4AA590A,
+ $E4D77A91,
+ $E50478CE,
+ $E53153B9,
+ $E55E0B4D,
+ $E58A9F81,
+ $E5B71050,
+ $E5E35DB2,
+ $E60F87A0,
+ $E63B8E14,
+ $E6677106,
+ $E6933071,
+ $E6BECC4C,
+ $E6EA4493,
+ $E715993D,
+ $E740CA44,
+ $E76BD7A2,
+ $E796C150,
+ $E7C18746,
+ $E7EC2980,
+ $E816A7F6,
+ $E84102A1,
+ $E86B397B,
+ $E8954C7D,
+ $E8BF3BA2,
+ $E8E906E2,
+ $E912AE37,
+ $E93C319B,
+ $E9659107,
+ $E98ECC75,
+ $E9B7E3DE,
+ $E9E0D73D,
+ $EA09A68A,
+ $EA3251C0,
+ $EA5AD8D9,
+ $EA833BCD,
+ $EAAB7A97,
+ $EAD39531,
+ $EAFB8B94,
+ $EB235DBB,
+ $EB4B0B9E,
+ $EB729539,
+ $EB99FA84,
+ $EBC13B7B,
+ $EBE85816,
+ $EC0F5050,
+ $EC362422,
+ $EC5CD387,
+ $EC835E7A,
+ $ECA9C4F3,
+ $ECD006EC,
+ $ECF62461,
+ $ED1C1D4B,
+ $ED41F1A4,
+ $ED67A167,
+ $ED8D2C8E,
+ $EDB29312,
+ $EDD7D4EE,
+ $EDFCF21D,
+ $EE21EA98,
+ $EE46BE5A,
+ $EE6B6D5D,
+ $EE8FF79C,
+ $EEB45D11,
+ $EED89DB6,
+ $EEFCB986,
+ $EF20B07B,
+ $EF448290,
+ $EF682FBF,
+ $EF8BB802,
+ $EFAF1B55,
+ $EFD259B1,
+ $EFF57311,
+ $F0186771,
+ $F03B36C9,
+ $F05DE116,
+ $F0806651,
+ $F0A2C676,
+ $F0C5017F,
+ $F0E71767,
+ $F1090828,
+ $F12AD3BD,
+ $F14C7A22,
+ $F16DFB50,
+ $F18F5744,
+ $F1B08DF6,
+ $F1D19F64,
+ $F1F28B86,
+ $F2135259,
+ $F233F3D8,
+ $F2546FFC,
+ $F274C6C2,
+ $F294F824,
+ $F2B5041D,
+ $F2D4EAA8,
+ $F2F4ABC1,
+ $F3144762,
+ $F333BD87,
+ $F3530E2B,
+ $F3723949,
+ $F3913EDB,
+ $F3B01EDE,
+ $F3CED94D,
+ $F3ED6E23,
+ $F40BDD5A,
+ $F42A26F0,
+ $F4484ADD,
+ $F466491F,
+ $F48421B1,
+ $F4A1D48D,
+ $F4BF61B0,
+ $F4DCC915,
+ $F4FA0AB6,
+ $F5172691,
+ $F5341C9F,
+ $F550ECDE,
+ $F56D9747,
+ $F58A1BD8,
+ $F5A67A8B,
+ $F5C2B35C,
+ $F5DEC647,
+ $F5FAB347,
+ $F6167A59,
+ $F6321B77,
+ $F64D969E,
+ $F668EBC9,
+ $F6841AF5,
+ $F69F241C,
+ $F6BA073B,
+ $F6D4C44E,
+ $F6EF5B50,
+ $F709CC3E,
+ $F7241713,
+ $F73E3BCB,
+ $F7583A63,
+ $F77212D5,
+ $F78BC51F,
+ $F7A5513C,
+ $F7BEB729,
+ $F7D7F6E1,
+ $F7F11060,
+ $F80A03A4,
+ $F822D0A6,
+ $F83B7765,
+ $F853F7DD,
+ $F86C5208,
+ $F88485E4,
+ $F89C936D,
+ $F8B47AA0,
+ $F8CC3B78,
+ $F8E3D5F1,
+ $F8FB4A09,
+ $F91297BC,
+ $F929BF05,
+ $F940BFE2,
+ $F9579A4F,
+ $F96E4E48,
+ $F984DBCA,
+ $F99B42D2,
+ $F9B1835B,
+ $F9C79D63,
+ $F9DD90E6,
+ $F9F35DE1,
+ $FA090450,
+ $FA1E8430,
+ $FA33DD7E,
+ $FA491036,
+ $FA5E1C55,
+ $FA7301D8,
+ $FA87C0BC,
+ $FA9C58FD,
+ $FAB0CA99,
+ $FAC5158C,
+ $FAD939D2,
+ $FAED376A,
+ $FB010E50,
+ $FB14BE80,
+ $FB2847F8,
+ $FB3BAAB4,
+ $FB4EE6B3,
+ $FB61FBF0,
+ $FB74EA69,
+ $FB87B21A,
+ $FB9A5302,
+ $FBACCD1D,
+ $FBBF2068,
+ $FBD14CE1,
+ $FBE35284,
+ $FBF5314F,
+ $FC06E93F,
+ $FC187A52,
+ $FC29E484,
+ $FC3B27D4,
+ $FC4C443D,
+ $FC5D39BE,
+ $FC6E0855,
+ $FC7EAFFD,
+ $FC8F30B6,
+ $FC9F8A7C,
+ $FCAFBD4D,
+ $FCBFC926,
+ $FCCFAE05,
+ $FCDF6BE8,
+ $FCEF02CB,
+ $FCFE72AD,
+ $FD0DBB8C,
+ $FD1CDD64,
+ $FD2BD833,
+ $FD3AABF8,
+ $FD4958B0,
+ $FD57DE58,
+ $FD663CEF,
+ $FD747472,
+ $FD8284DF,
+ $FD906E34,
+ $FD9E306F,
+ $FDABCB8D,
+ $FDB93F8C,
+ $FDC68C6B,
+ $FDD3B228,
+ $FDE0B0BF,
+ $FDED8830,
+ $FDFA3878,
+ $FE06C196,
+ $FE132387,
+ $FE1F5E4A,
+ $FE2B71DC,
+ $FE375E3C,
+ $FE432368,
+ $FE4EC15E,
+ $FE5A381D,
+ $FE6587A2,
+ $FE70AFEB,
+ $FE7BB0F8,
+ $FE868AC7,
+ $FE913D55,
+ $FE9BC8A1,
+ $FEA62CAA,
+ $FEB0696D,
+ $FEBA7EEA,
+ $FEC46D1F,
+ $FECE3409,
+ $FED7D3A9,
+ $FEE14BFB,
+ $FEEA9D00,
+ $FEF3C6B4,
+ $FEFCC918,
+ $FF05A429,
+ $FF0E57E6,
+ $FF16E44E,
+ $FF1F495F,
+ $FF278719,
+ $FF2F9D79,
+ $FF378C80,
+ $FF3F542A,
+ $FF46F478,
+ $FF4E6D68,
+ $FF55BEF9,
+ $FF5CE92A,
+ $FF63EBF9,
+ $FF6AC766,
+ $FF717B6F,
+ $FF780814,
+ $FF7E6D54,
+ $FF84AB2C,
+ $FF8AC19E,
+ $FF90B0A7,
+ $FF967847,
+ $FF9C187C,
+ $FFA19147,
+ $FFA6E2A6,
+ $FFAC0C97,
+ $FFB10F1C,
+ $FFB5EA32,
+ $FFBA9DD9,
+ $FFBF2A10,
+ $FFC38ED7,
+ $FFC7CC2C,
+ $FFCBE210,
+ $FFCFD082,
+ $FFD39780,
+ $FFD7370B,
+ $FFDAAF21,
+ $FFDDFFC3,
+ $FFE128F0,
+ $FFE42AA6,
+ $FFE704E7,
+ $FFE9B7B1,
+ $FFEC4304,
+ $FFEEA6E0,
+ $FFF0E344,
+ $FFF2F82F,
+ $FFF4E5A2,
+ $FFF6AB9D,
+ $FFF84A1E,
+ $FFF9C126,
+ $FFFB10B5,
+ $FFFC38CA,
+ $FFFD3965,
+ $FFFE1286,
+ $FFFEC42C,
+ $FFFF4E59,
+ $FFFFB10B,
+ $FFFFEC43,
+ $100000000
+ );
+
+implementation
+
+end.
--- a/hedgewars/uSound.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uSound.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,13 +20,7 @@
unit uSound;
interface
-uses SDLh, uConsts;
-
-type PVoicepack = ^TVoicepack;
- TVoicepack = record
- name: shortstring;
- chunks: array [TSound] of PMixChunk;
- end;
+uses SDLh, uConsts, uTypes;
var MusicFN: shortstring;
@@ -52,7 +46,7 @@
implementation
-uses uMisc, uConsole;
+uses uVariables, uConsole, uUtils, uCommands, uDebug;
const chanTPU = 32;
var Volume: LongInt;
@@ -323,8 +317,17 @@
Mix_ResumeMusic(Mus);
end;
+procedure chVoicepack(var s: shortstring);
+begin
+ if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/voicepack"', true);
+ if s[1]='"' then Delete(s, 1, 1);
+ if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
+ CurrentTeam^.voicepack:= AskForVoicepack(s)
+end;
+
procedure initModule;
begin
+ RegisterVariable('voicepack', vtCommand, @chVoicepack, false);
MusicFN:='';
end;
--- a/hedgewars/uStats.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uStats.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,27 +20,7 @@
unit uStats;
interface
-uses uGears, uConsts;
-
-type TStatistics = record
- DamageRecv,
- DamageGiven: Longword;
- StepDamageRecv,
- StepDamageGiven,
- StepKills: Longword;
- MaxStepDamageRecv,
- MaxStepDamageGiven,
- MaxStepKills: Longword;
- FinishedTurns: Longword;
- end;
-
-type TTeamStats = record
- Kills : Longword;
- AIKills : Longword;
- TeamKills : Longword;
- TurnSkips : Longword;
- TeamDamage : Longword;
-end;
+uses uConsts, uTypes;
var TotalRounds: LongInt;
FinishedTurnsTotal: LongInt;
@@ -55,7 +35,8 @@
procedure SendStats;
implementation
-uses uTeams, uSound, uMisc, uLocale, uWorld;
+uses uSound, uLocale, uVariables, uUtils, uIO, uCaptions, uDebug, uMisc;
+
var DamageGiven : Longword = 0;
DamageClan : Longword = 0;
DamageTotal : Longword = 0;
@@ -71,10 +52,10 @@
procedure HedgehogDamaged(Gear: PGear);
begin
-if CurrentHedgehog^.Team^.Clan = PHedgehog(Gear^.Hedgehog)^.Team^.Clan then
+if CurrentHedgehog^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then
vpHurtSameClan:= CurrentHedgehog^.Team^.voicepack
else
- vpHurtEnemy:= PHedgehog(Gear^.Hedgehog)^.Team^.voicepack;
+ vpHurtEnemy:= Gear^.Hedgehog^.Team^.voicepack;
if bBetweenTurns then exit;
@@ -83,7 +64,7 @@
if Gear <> CurrentHedgehog^.Gear then
inc(CurrentHedgehog^.stats.StepDamageGiven, Gear^.Damage);
-if CurrentHedgehog^.Team^.Clan = PHedgehog(Gear^.Hedgehog)^.Team^.Clan then inc(DamageClan, Gear^.Damage);
+if CurrentHedgehog^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then inc(DamageClan, Gear^.Damage);
if Gear^.Health <= Gear^.Damage then
begin
@@ -92,14 +73,14 @@
inc(KillsTotal);
inc(CurrentHedgehog^.Team^.stats.Kills);
if (CurrentHedgehog^.Team^.TeamName =
- PHedgehog(Gear^.Hedgehog)^.Team^.TeamName) then begin
+ Gear^.Hedgehog^.Team^.TeamName) then begin
inc(CurrentHedgehog^.Team^.stats.TeamKills);
inc(CurrentHedgehog^.Team^.stats.TeamDamage, Gear^.Damage);
end;
- if CurrentHedgehog^.Team^.Clan = PHedgehog(Gear^.Hedgehog)^.Team^.Clan then inc(KillsClan);
+ if CurrentHedgehog^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then inc(KillsClan);
end;
-inc(PHedgehog(Gear^.Hedgehog)^.stats.StepDamageRecv, Gear^.Damage);
+inc(Gear^.Hedgehog^.stats.StepDamageRecv, Gear^.Damage);
inc(DamageGiven, Gear^.Damage);
inc(DamageTotal, Gear^.Damage)
end;
@@ -177,7 +158,7 @@
for t:= 0 to Pred(ClansCount) do
with ClansArray[t]^ do
begin
- SendStat(siClanHealth, inttostr(Color) + ' ' + inttostr(ClanHealth));
+ SendStat(siClanHealth, IntToStr(Color) + ' ' + IntToStr(ClanHealth));
end;
Kills:= 0;
@@ -237,8 +218,8 @@
{ send player stats for winner teams }
if Clan^.ClanHealth > 0 then begin
- SendStat(siPlayerKills, inttostr(Clan^.Color) + ' ' +
- inttostr(stats.Kills) + ' ' + TeamName);
+ SendStat(siPlayerKills, IntToStr(Clan^.Color) + ' ' +
+ IntToStr(stats.Kills) + ' ' + TeamName);
end;
{ determine maximum values of TeamKills, TurnSkips, TeamDamage }
@@ -261,25 +242,25 @@
for t:= 0 to Pred(TeamsCount) do begin
with TeamsArray[t]^ do begin
if Clan^.ClanHealth = 0 then begin
- SendStat(siPlayerKills, inttostr(Clan^.Color) + ' ' +
- inttostr(stats.Kills) + ' ' + TeamName);
+ SendStat(siPlayerKills, IntToStr(Clan^.Color) + ' ' +
+ IntToStr(stats.Kills) + ' ' + TeamName);
end;
end;
end;
if msdhh <> nil then
- SendStat(siMaxStepDamage, inttostr(msd) + ' ' + msdhh^.Name + ' (' + msdhh^.Team^.TeamName + ')');
+ SendStat(siMaxStepDamage, IntToStr(msd) + ' ' + msdhh^.Name + ' (' + msdhh^.Team^.TeamName + ')');
if mskcnt = 1 then
- SendStat(siMaxStepKills, inttostr(msk) + ' ' + mskhh^.Name + ' (' + mskhh^.Team^.TeamName + ')');
+ SendStat(siMaxStepKills, IntToStr(msk) + ' ' + mskhh^.Name + ' (' + mskhh^.Team^.TeamName + ')');
if maxTeamKills > 1 then
- SendStat(siMaxTeamKills, inttostr(maxTeamKills) + ' ' + maxTeamKillsName);
+ SendStat(siMaxTeamKills, IntToStr(maxTeamKills) + ' ' + maxTeamKillsName);
if maxTurnSkips > 2 then
- SendStat(siMaxTurnSkips, inttostr(maxTurnSkips) + ' ' + maxTurnSkipsName);
+ SendStat(siMaxTurnSkips, IntToStr(maxTurnSkips) + ' ' + maxTurnSkipsName);
if maxTeamDamage > 30 then
- SendStat(siMaxTeamDamage, inttostr(maxTeamDamage) + ' ' + maxTeamDamageName);
+ SendStat(siMaxTeamDamage, IntToStr(maxTeamDamage) + ' ' + maxTeamDamageName);
-if KilledHHs > 0 then SendStat(siKilledHHs, inttostr(KilledHHs));
+if KilledHHs > 0 then SendStat(siKilledHHs, IntToStr(KilledHHs));
end;
procedure initModule;
--- a/hedgewars/uStore.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uStore.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,54 +20,13 @@
unit uStore;
interface
-uses sysutils, uConsts, uTeams, SDLh, GLunit, uWorld;
-
-
-var PixelFormat: PSDL_PixelFormat;
- SDLPrimSurface: PSDL_Surface;
- PauseTexture,
- SyncTexture,
- ConfirmTexture: PTexture;
- cScaleFactor: GLfloat;
- SupportNPOTT: Boolean;
- Step: LongInt;
- squaresize : LongInt;
- numsquares : LongInt;
- ProgrTex: PTexture;
- MissionIcons: PSDL_Surface;
- ropeIconTex: PTexture;
- rotationQt: GLfloat;
+uses sysutils, uConsts, SDLh, GLunit, uTypes;
procedure initModule;
procedure freeModule;
procedure StoreLoad;
procedure StoreRelease;
-procedure DrawSpriteFromRect(Sprite: TSprite; r: TSDL_Rect; X, Y, Height, Position: LongInt);
-procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt);
-procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt);
-procedure DrawSpriteClipped(Sprite: TSprite; X, Y, TopY, RightX, BottomY, LeftX: LongInt);
-procedure DrawTexture(X, Y: LongInt; Texture: PTexture; Scale: GLfloat = 1.0);
-procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, w, h: LongInt);
-procedure DrawRotatedTextureF(Texture: PTexture; Scale, OffsetX, OffsetY: GLfloat; X, Y, Frame, Dir, w, h: LongInt; Angle: real);
-procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real);
-procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real);
-procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
-procedure DrawCentered(X, Top: LongInt; Source: PTexture);
-procedure DrawFromRect(X, Y, W, H: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
-procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
-procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
-procedure DrawLine(X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte);
-procedure DrawFillRect(r: TSDL_Rect);
-procedure DrawCircle(X, Y, Radius: LongInt; Width: Single; r, g, b, a: Byte);
-procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean);
-function CheckCJKFont(s: ansistring; font: THWFont): THWFont;
-function RenderStringTex(s: ansistring; Color: Longword; font: THWFont): PTexture;
-function RenderSpeechBubbleTex(s: ansistring; SpeechType: Longword; font: THWFont): PTexture;
-procedure flipSurface(Surface: PSDL_Surface; Vertical: Boolean);
-//procedure rotateSurface(Surface: PSDL_Surface);
-procedure copyRotatedSurface(src, dest: PSDL_Surface); // this is necessary since width/height are read only in SDL
-procedure copyToXY(src, dest: PSDL_Surface; destX, destY: LongInt);
procedure RenderHealth(var Hedgehog: THedgehog);
procedure AddProgress;
procedure FinishProgress;
@@ -78,91 +37,14 @@
procedure RenderWeaponTooltip(atype: TAmmoType);
procedure ShowWeaponTooltip(x, y: LongInt);
procedure FreeWeaponTooltip;
-procedure Tint(r, g, b, a: Byte); inline;
-procedure Tint(c: Longword); inline;
implementation
-uses uMisc, uConsole, uLocale, uMobile;
+uses uMisc, uConsole, uMobile, uVariables, uUtils, uTextures, uRender, uRenderUtils, uCommands, uDebug;
type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple);
-var HHTexture: PTexture;
- MaxTextureSize: LongInt;
+var MaxTextureSize: LongInt;
cGPUVendor: TGPUVendor;
- lastTint: Longword;
-
-procedure Tint(r, g, b, a: Byte); inline;
-var nc: Longword;
-begin
-nc:= (a shl 24) or (b shl 16) or (g shl 8) or r;
-if nc = lastTint then
- exit;
-glColor4ub(r, g, b, a);
-lastTint:= nc;
-end;
-
-procedure Tint(c: Longword); inline;
-begin
-Tint(((c shr 16) and $FF), ((c shr 8) and $FF), (c and $FF), $FF);
-end;
-
-procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean);
-var r: TSDL_Rect;
-begin
-r:= rect^;
-if Clear then SDL_FillRect(Surface, @r, 0);
-
-BorderColor:= SDL_MapRGB(Surface^.format, BorderColor shr 16, BorderColor shr 8, BorderColor and $FF);
-FillColor:= SDL_MapRGB(Surface^.format, FillColor shr 16, FillColor shr 8, FillColor and $FF);
-
-r.y:= rect^.y + 1;
-r.h:= rect^.h - 2;
-SDL_FillRect(Surface, @r, BorderColor);
-r.x:= rect^.x + 1;
-r.w:= rect^.w - 2;
-r.y:= rect^.y;
-r.h:= rect^.h;
-SDL_FillRect(Surface, @r, BorderColor);
-r.x:= rect^.x + 2;
-r.y:= rect^.y + 1;
-r.w:= rect^.w - 4;
-r.h:= rect^.h - 2;
-SDL_FillRect(Surface, @r, FillColor);
-r.x:= rect^.x + 1;
-r.y:= rect^.y + 2;
-r.w:= rect^.w - 2;
-r.h:= rect^.h - 4;
-SDL_FillRect(Surface, @r, FillColor)
-end;
-
-function WriteInRoundRect(Surface: PSDL_Surface; X, Y: LongInt; Color: LongWord; Font: THWFont; s: ansistring): TSDL_Rect;
-var w, h: LongInt;
- tmpsurf: PSDL_Surface;
- clr: TSDL_Color;
- finalRect: TSDL_Rect;
-begin
-w:= 0; h:= 0; // avoid compiler hints
-TTF_SizeUTF8(Fontz[Font].Handle, Str2PChar(s), w, h);
-finalRect.x:= X;
-finalRect.y:= Y;
-finalRect.w:= w + FontBorder * 2 + 4;
-finalRect.h:= h + FontBorder * 2;
-DrawRoundRect(@finalRect, cWhiteColor, endian(cNearBlackColorChannels.value), Surface, true);
-clr.r:= (Color shr 16) and $FF;
-clr.g:= (Color shr 8) and $FF;
-clr.b:= Color and $FF;
-tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, Str2PChar(s), clr);
-finalRect.x:= X + FontBorder + 2;
-finalRect.y:= Y + FontBorder;
-SDLTry(tmpsurf <> nil, true);
-SDL_UpperBlit(tmpsurf, nil, Surface, @finalRect);
-SDL_FreeSurface(tmpsurf);
-finalRect.x:= X;
-finalRect.y:= Y;
-finalRect.w:= w + FontBorder * 2 + 4;
-finalRect.h:= h + FontBorder * 2;
-WriteInRoundRect:= finalRect;
-end;
function WriteInRect(Surface: PSDL_Surface; X, Y: LongInt; Color: LongWord; Font: THWFont; s: ansistring): TSDL_Rect;
var w, h: LongInt;
@@ -479,396 +361,6 @@
{$ENDIF}
end;
-procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
-begin
-DrawFromRect(X, Y, r^.w, r^.h, r, SourceTexture)
-end;
-
-procedure DrawFromRect(X, Y, W, H: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
-var rr: TSDL_Rect;
- _l, _r, _t, _b: real;
- VertexBuffer, TextureBuffer: array [0..3] of TVertex2f;
-begin
-if (SourceTexture^.h = 0) or (SourceTexture^.w = 0) then exit;
-
-// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
-if (abs(X) > W) and ((abs(X + W / 2) - W / 2) > cScreenWidth / cScaleFactor) then
- exit;
-if (abs(Y) > H) and ((abs(Y + H / 2 - (0.5 * cScreenHeight)) - H / 2) > cScreenHeight / cScaleFactor) then
- exit;
-
-rr.x:= X;
-rr.y:= Y;
-rr.w:= W;
-rr.h:= H;
-
-_l:= r^.x / SourceTexture^.w * SourceTexture^.rx;
-_r:= (r^.x + r^.w) / SourceTexture^.w * SourceTexture^.rx;
-_t:= r^.y / SourceTexture^.h * SourceTexture^.ry;
-_b:= (r^.y + r^.h) / SourceTexture^.h * SourceTexture^.ry;
-
-glBindTexture(GL_TEXTURE_2D, SourceTexture^.id);
-
-VertexBuffer[0].X:= X;
-VertexBuffer[0].Y:= Y;
-VertexBuffer[1].X:= rr.w + X;
-VertexBuffer[1].Y:= Y;
-VertexBuffer[2].X:= rr.w + X;
-VertexBuffer[2].Y:= rr.h + Y;
-VertexBuffer[3].X:= X;
-VertexBuffer[3].Y:= rr.h + Y;
-
-TextureBuffer[0].X:= _l;
-TextureBuffer[0].Y:= _t;
-TextureBuffer[1].X:= _r;
-TextureBuffer[1].Y:= _t;
-TextureBuffer[2].X:= _r;
-TextureBuffer[2].Y:= _b;
-TextureBuffer[3].X:= _l;
-TextureBuffer[3].Y:= _b;
-
-
-glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
-glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
-glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
-end;
-
-procedure DrawTexture(X, Y: LongInt; Texture: PTexture; Scale: GLfloat);
-begin
-
-glPushMatrix;
-glTranslatef(X, Y, 0);
-glScalef(Scale, Scale, 1);
-
-glBindTexture(GL_TEXTURE_2D, Texture^.id);
-
-glVertexPointer(2, GL_FLOAT, 0, @Texture^.vb);
-glTexCoordPointer(2, GL_FLOAT, 0, @Texture^.tb);
-glDrawArrays(GL_TRIANGLE_FAN, 0, Length(Texture^.vb));
-
-glPopMatrix
-end;
-
-procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, w, h: LongInt);
-begin
- DrawRotatedTextureF(Texture, Scale, 0, 0, X, Y, Frame, Dir, w, h, 0)
-end;
-
-procedure DrawRotatedTextureF(Texture: PTexture; Scale, OffsetX, OffsetY: GLfloat; X, Y, Frame, Dir, w, h: LongInt; Angle: real);
-var ft, fb, fl, fr: GLfloat;
- hw, nx, ny: LongInt;
- VertexBuffer, TextureBuffer: array [0..3] of TVertex2f;
-begin
-// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
-if (abs(X) > W) and ((abs(X + dir * OffsetX) - W / 2) * cScaleFactor > cScreenWidth) then
- exit;
-if (abs(Y) > H) and ((abs(Y + OffsetY - (0.5 * cScreenHeight)) - W / 2) * cScaleFactor > cScreenHeight) then
- exit;
-
-glPushMatrix;
-glTranslatef(X, Y, 0);
-
-if Dir < 0 then
- glRotatef(Angle, 0, 0, -1)
-else
- glRotatef(Angle, 0, 0, 1);
-
-glTranslatef(Dir*OffsetX, OffsetY, 0);
-glScalef(Scale, Scale, 1);
-
-// Any reason for this call? And why only in t direction, not s?
-//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
-if Dir < 0 then
- hw:= w div -2
-else
- hw:= w div 2;
-
-nx:= round(Texture^.w / w); // number of horizontal frames
-ny:= round(Texture^.h / h); // number of vertical frames
-
-ft:= (Frame mod ny) * Texture^.ry / ny;
-fb:= ((Frame mod ny) + 1) * Texture^.ry / ny;
-fl:= (Frame div ny) * Texture^.rx / nx;
-fr:= ((Frame div ny) + 1) * Texture^.rx / nx;
-
-glBindTexture(GL_TEXTURE_2D, Texture^.id);
-
-VertexBuffer[0].X:= -hw;
-VertexBuffer[0].Y:= w / -2;
-VertexBuffer[1].X:= hw;
-VertexBuffer[1].Y:= w / -2;
-VertexBuffer[2].X:= hw;
-VertexBuffer[2].Y:= w / 2;
-VertexBuffer[3].X:= -hw;
-VertexBuffer[3].Y:= w / 2;
-
-TextureBuffer[0].X:= fl;
-TextureBuffer[0].Y:= ft;
-TextureBuffer[1].X:= fr;
-TextureBuffer[1].Y:= ft;
-TextureBuffer[2].X:= fr;
-TextureBuffer[2].Y:= fb;
-TextureBuffer[3].X:= fl;
-TextureBuffer[3].Y:= fb;
-
-glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
-glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
-glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
-
-glPopMatrix
-end;
-
-procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real);
-begin
- DrawRotatedTex(SpritesData[Sprite].Texture,
- SpritesData[Sprite].Width,
- SpritesData[Sprite].Height,
- X, Y, Dir, Angle)
-end;
-
-procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real);
-begin
-glPushMatrix;
-glTranslatef(X, Y, 0);
-
-if Dir < 0 then
- glRotatef(Angle, 0, 0, -1)
-else
- glRotatef(Angle, 0, 0, 1);
-if Dir < 0 then glScalef(-1.0, 1.0, 1.0);
-
-DrawSprite(Sprite, -SpritesData[Sprite].Width div 2, -SpritesData[Sprite].Height div 2, Frame);
-
-glPopMatrix
-end;
-
-procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
-var VertexBuffer: array [0..3] of TVertex2f;
-begin
-// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
-if (abs(X) > 2 * hw) and ((abs(X) - hw) > cScreenWidth / cScaleFactor) then
- exit;
-if (abs(Y) > 2 * hh) and ((abs(Y - 0.5 * cScreenHeight) - hh) > cScreenHeight / cScaleFactor) then
- exit;
-
-glPushMatrix;
-glTranslatef(X, Y, 0);
-
-if Dir < 0 then
- begin
- hw:= - hw;
- glRotatef(Angle, 0, 0, -1);
- end else
- glRotatef(Angle, 0, 0, 1);
-
-
-glBindTexture(GL_TEXTURE_2D, Tex^.id);
-
-VertexBuffer[0].X:= -hw;
-VertexBuffer[0].Y:= -hh;
-VertexBuffer[1].X:= hw;
-VertexBuffer[1].Y:= -hh;
-VertexBuffer[2].X:= hw;
-VertexBuffer[2].Y:= hh;
-VertexBuffer[3].X:= -hw;
-VertexBuffer[3].Y:= hh;
-
-glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
-glTexCoordPointer(2, GL_FLOAT, 0, @Tex^.tb);
-glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
-
-glPopMatrix
-end;
-
-procedure DrawSpriteFromRect(Sprite: TSprite; r: TSDL_Rect; X, Y, Height, Position: LongInt);
-begin
-r.y:= r.y + Height * Position;
-r.h:= Height;
-DrawFromRect(X, Y, @r, SpritesData[Sprite].Texture)
-end;
-
-procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt);
-var row, col, numFramesFirstCol: LongInt;
-begin
-numFramesFirstCol:= SpritesData[Sprite].imageHeight div SpritesData[Sprite].Height;
-row:= Frame mod numFramesFirstCol;
-col:= Frame div numFramesFirstCol;
-DrawSprite2 (Sprite, X, Y, col, row);
-end;
-
-procedure DrawSpriteClipped(Sprite: TSprite; X, Y, TopY, RightX, BottomY, LeftX: LongInt);
-var r: TSDL_Rect;
-begin
-r.x:= 0;
-r.y:= 0;
-r.w:= SpritesData[Sprite].Width;
-r.h:= SpritesData[Sprite].Height;
-
-if (X < LeftX) then
- r.x:= LeftX - X;
-if (Y < TopY) then
- r.y:= TopY - Y;
-
-if (Y + SpritesData[Sprite].Height > BottomY) then
- r.h:= BottomY - Y + 1;
-if (X + SpritesData[Sprite].Width > RightX) then
- r.w:= RightX - X + 1;
-
-dec(r.h, r.y);
-dec(r.w, r.x);
-
-DrawFromRect(X + r.x, Y + r.y, @r, SpritesData[Sprite].Texture)
-end;
-
-procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt);
-var r: TSDL_Rect;
-begin
- r.x:= FrameX * SpritesData[Sprite].Width;
- r.w:= SpritesData[Sprite].Width;
- r.y:= FrameY * SpritesData[Sprite].Height;
- r.h:= SpritesData[Sprite].Height;
- DrawFromRect(X, Y, @r, SpritesData[Sprite].Texture)
-end;
-
-procedure DrawCentered(X, Top: LongInt; Source: PTexture);
-var scale: GLfloat;
-begin
- if (Source^.w + 20) > cScreenWidth then
- scale:= cScreenWidth / (Source^.w + 20)
- else
- scale:= 1.0;
- DrawTexture(X - round(Source^.w * scale) div 2, Top, Source, scale)
-end;
-
-procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
-const VertexBuffer: array [0..3] of TVertex2f = (
- (x: -16; y: -16),
- (x: 16; y: -16),
- (x: 16; y: 16),
- (x: -16; y: 16));
-var l, r, t, b: real;
- TextureBuffer: array [0..3] of TVertex2f;
-begin
-// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
-if (abs(X) > 32) and ((abs(X) - 16) * cScaleFactor > cScreenWidth) then
- exit;
-if (abs(Y) > 32) and ((abs(Y - 0.5 * cScreenHeight) - 16) * cScaleFactor > cScreenHeight) then
- exit;
-
-t:= Pos * 32 / HHTexture^.h;
-b:= (Pos + 1) * 32 / HHTexture^.h;
-
-if Dir = -1 then
- begin
- l:= (Step + 1) * 32 / HHTexture^.w;
- r:= Step * 32 / HHTexture^.w
- end else
- begin
- l:= Step * 32 / HHTexture^.w;
- r:= (Step + 1) * 32 / HHTexture^.w
- end;
-
-
-glPushMatrix();
-glTranslatef(X, Y, 0);
-glRotatef(Angle, 0, 0, 1);
-
-glBindTexture(GL_TEXTURE_2D, HHTexture^.id);
-
-TextureBuffer[0].X:= l;
-TextureBuffer[0].Y:= t;
-TextureBuffer[1].X:= r;
-TextureBuffer[1].Y:= t;
-TextureBuffer[2].X:= r;
-TextureBuffer[2].Y:= b;
-TextureBuffer[3].X:= l;
-TextureBuffer[3].Y:= b;
-
-glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
-glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
-glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
-
-glPopMatrix
-end;
-
-procedure DrawLine(X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte);
-var VertexBuffer: array [0..3] of TVertex2f;
-begin
- glDisable(GL_TEXTURE_2D);
- glEnable(GL_LINE_SMOOTH);
-
- glPushMatrix;
- glTranslatef(WorldDx, WorldDy, 0);
- glLineWidth(Width);
-
- Tint(r, g, b, a);
- VertexBuffer[0].X:= X0;
- VertexBuffer[0].Y:= Y0;
- VertexBuffer[1].X:= X1;
- VertexBuffer[1].Y:= Y1;
-
- glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
- glDrawArrays(GL_LINES, 0, Length(VertexBuffer));
- Tint($FF, $FF, $FF, $FF);
-
- glPopMatrix;
-
- glEnable(GL_TEXTURE_2D);
- glDisable(GL_LINE_SMOOTH);
-end;
-
-procedure DrawFillRect(r: TSDL_Rect);
-var VertexBuffer: array [0..3] of TVertex2f;
-begin
-// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
-if (abs(r.x) > r.w) and ((abs(r.x + r.w / 2) - r.w / 2) * cScaleFactor > cScreenWidth) then
- exit;
-if (abs(r.y) > r.h) and ((abs(r.y + r.h / 2 - (0.5 * cScreenHeight)) - r.h / 2) * cScaleFactor > cScreenHeight) then
- exit;
-
-glDisable(GL_TEXTURE_2D);
-
-Tint($00, $00, $00, $80);
-
-VertexBuffer[0].X:= r.x;
-VertexBuffer[0].Y:= r.y;
-VertexBuffer[1].X:= r.x + r.w;
-VertexBuffer[1].Y:= r.y;
-VertexBuffer[2].X:= r.x + r.w;
-VertexBuffer[2].Y:= r.y + r.h;
-VertexBuffer[3].X:= r.x;
-VertexBuffer[3].Y:= r.y + r.h;
-
-glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
-glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
-
-Tint($FF, $FF, $FF, $FF);
-glEnable(GL_TEXTURE_2D)
-end;
-
-procedure DrawCircle(X, Y, Radius: LongInt; Width: Single; r, g, b, a: Byte);
-var
- i: LongInt;
- CircleVertex: array [0..359] of TVertex2f;
-begin
- for i := 0 to 359 do begin
- CircleVertex[i].X := X + Radius*cos(i*pi/180);
- CircleVertex[i].Y := Y + Radius*sin(i*pi/180);
- end;
- glDisable(GL_TEXTURE_2D);
- glEnable(GL_LINE_SMOOTH);
- glPushMatrix;
- glLineWidth(Width);
- Tint(r, g, b, a);
- glVertexPointer(2, GL_FLOAT, 0, @CircleVertex[0]);
- glDrawArrays(GL_LINE_LOOP, 0, 360);
- Tint($FF, $FF, $FF, $FF);
- glPopMatrix;
- glEnable(GL_TEXTURE_2D);
- glDisable(GL_LINE_SMOOTH);
-end;
-
procedure StoreRelease;
var ii: TSprite;
begin
@@ -886,247 +378,6 @@
end;
-function CheckCJKFont(s: ansistring; font: THWFont): THWFont;
-var l, i : LongInt;
- u: WideChar;
- tmpstr: array[0..256] of WideChar;
-begin
-
-{$IFNDEF IPHONEOS}
-// remove chinese fonts for now
-if (font >= CJKfnt16) or (length(s) = 0) then
-{$ENDIF}
- exit(font);
-
-l:= Utf8ToUnicode(@tmpstr, Str2PChar(s), length(s))-1;
-i:= 0;
-while i < l do
- begin
- u:= tmpstr[i];
- if (#$2E80 <= u) and (
- (u <= #$2FDF ) or // CJK Radicals Supplement / Kangxi Radicals
- ((#$2FF0 <= u) and (u <= #$303F)) or // Ideographic Description Characters / CJK Radicals Supplement
- ((#$31C0 <= u) and (u <= #$31EF)) or // CJK Strokes
- ((#$3200 <= u) and (u <= #$4DBF)) or // Enclosed CJK Letters and Months / CJK Compatibility / CJK Unified Ideographs Extension A
- ((#$4E00 <= u) and (u <= #$9FFF)) or // CJK Unified Ideographs
- ((#$F900 <= u) and (u <= #$FAFF)) or // CJK Compatibility Ideographs
- ((#$FE30 <= u) and (u <= #$FE4F))) // CJK Compatibility Forms
- then exit(THWFont( ord(font) + ((ord(High(THWFont))+1) div 2) ));
- inc(i)
- end;
-exit(font);
-(* two more to check. pascal WideChar is only 16 bit though
- ((#$20000 <= u) and (u >= #$2A6DF)) or // CJK Unified Ideographs Extension B
- ((#$2F800 <= u) and (u >= #$2FA1F))) // CJK Compatibility Ideographs Supplement *)
-end;
-
-function RenderStringTex(s: ansistring; Color: Longword; font: THWFont): PTexture;
-var w, h: LongInt;
- finalSurface: PSDL_Surface;
-begin
-if length(s) = 0 then s:= ' ';
-font:= CheckCJKFont(s, font);
-w:= 0; h:= 0; // avoid compiler hints
-TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(s), w, h);
-
-finalSurface:= SDL_CreateRGBSurface(SDL_SWSURFACE, w + FontBorder * 2 + 4, h + FontBorder * 2,
- 32, RMask, GMask, BMask, AMask);
-
-TryDo(finalSurface <> nil, 'RenderString: fail to create surface', true);
-
-WriteInRoundRect(finalSurface, 0, 0, Color, font, s);
-
-TryDo(SDL_SetColorKey(finalSurface, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true);
-
-RenderStringTex:= Surface2Tex(finalSurface, false);
-
-SDL_FreeSurface(finalSurface);
-end;
-
-function RenderSpeechBubbleTex(s: ansistring; SpeechType: Longword; font: THWFont): PTexture;
-var textWidth, textHeight, x, y, w, h, i, j, pos, prevpos, line, numLines, edgeWidth, edgeHeight, cornerWidth, cornerHeight: LongInt;
- finalSurface, tmpsurf, rotatedEdge: PSDL_Surface;
- rect: TSDL_Rect;
- chars: TSysCharSet = [#9,' ','.',';',':','?','!',','];
- substr: shortstring;
- edge, corner, tail: TSPrite;
-begin
-
-case SpeechType of
- 1: begin;
- edge:= sprSpeechEdge;
- corner:= sprSpeechCorner;
- tail:= sprSpeechTail;
- end;
- 2: begin;
- edge:= sprThoughtEdge;
- corner:= sprThoughtCorner;
- tail:= sprThoughtTail;
- end;
- 3: begin;
- edge:= sprShoutEdge;
- corner:= sprShoutCorner;
- tail:= sprShoutTail;
- end;
- end;
-edgeHeight:= SpritesData[edge].Height;
-edgeWidth:= SpritesData[edge].Width;
-cornerWidth:= SpritesData[corner].Width;
-cornerHeight:= SpritesData[corner].Height;
-// This one screws up WrapText
-//s:= 'This is the song that never ends. ''cause it goes on and on my friends. Some people, started singing it not knowing what it was. And they''ll just go on singing it forever just because... This is the song that never ends...';
-// This one does not
-//s:= 'This is the song that never ends. cause it goes on and on my friends. Some people, started singing it not knowing what it was. And they will go on singing it forever just because... This is the song that never ends... ';
-
-numLines:= 0;
-
-if length(s) = 0 then s:= '...';
-font:= CheckCJKFont(s, font);
-w:= 0; h:= 0; // avoid compiler hints
-TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(s), w, h);
-if w<8 then w:= 8;
-j:= 0;
-if (length(s) > 20) then
- begin
- w:= 0;
- i:= round(Sqrt(length(s)) * 2);
- s:= WrapText(s, #1, chars, i);
- pos:= 1; prevpos:= 0; line:= 0;
-// Find the longest line for the purposes of centring the text. Font dependant.
- while pos <= length(s) do
- begin
- if (s[pos] = #1) or (pos = length(s)) then
- begin
- inc(numlines);
- if s[pos] <> #1 then inc(pos);
- while s[prevpos+1] = ' ' do inc(prevpos);
- substr:= copy(s, prevpos+1, pos-prevpos-1);
- i:= 0; j:= 0;
- TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(substr), i, j);
- if i > w then w:= i;
- prevpos:= pos;
- end;
- inc(pos);
- end;
- end
-else numLines := 1;
-
-textWidth:=((w-(cornerWidth-edgeWidth)*2) div edgeWidth)*edgeWidth+edgeWidth;
-textHeight:=(((numlines * h + 2)-((cornerHeight-edgeWidth)*2)) div edgeWidth)*edgeWidth;
-
-textHeight:=max(textHeight,edgeWidth);
-//textWidth:=max(textWidth,SpritesData[tail].Width);
-rect.x:= 0;
-rect.y:= 0;
-rect.w:= textWidth + (cornerWidth * 2);
-rect.h:= textHeight + cornerHeight*2 - edgeHeight + SpritesData[tail].Height;
-//s:= inttostr(w) + ' ' + inttostr(numlines) + ' ' + inttostr(rect.x) + ' '+inttostr(rect.y) + ' ' + inttostr(rect.w) + ' ' + inttostr(rect.h);
-
-finalSurface:= SDL_CreateRGBSurface(SDL_SWSURFACE, rect.w, rect.h, 32, RMask, GMask, BMask, AMask);
-
-TryDo(finalSurface <> nil, 'RenderString: fail to create surface', true);
-
-//////////////////////////////// CORNERS ///////////////////////////////
-copyToXY(SpritesData[corner].Surface, finalSurface, 0, 0); /////////////////// NW
-
-flipSurface(SpritesData[corner].Surface, true); // store all 4 versions in memory to avoid repeated flips?
-x:= 0;
-y:= textHeight + cornerHeight -1;
-copyToXY(SpritesData[corner].Surface, finalSurface, x, y); /////////////////// SW
-
-flipSurface(SpritesData[corner].Surface, false);
-x:= rect.w-cornerWidth-1;
-y:= textHeight + cornerHeight -1;
-copyToXY(SpritesData[corner].Surface, finalSurface, x, y); /////////////////// SE
-
-flipSurface(SpritesData[corner].Surface, true);
-x:= rect.w-cornerWidth-1;
-y:= 0;
-copyToXY(SpritesData[corner].Surface, finalSurface, x, y); /////////////////// NE
-flipSurface(SpritesData[corner].Surface, false); // restore original position
-//////////////////////////////// END CORNERS ///////////////////////////////
-
-//////////////////////////////// EDGES //////////////////////////////////////
-x:= cornerWidth;
-y:= 0;
-while x < rect.w-cornerWidth-1 do
- begin
- copyToXY(SpritesData[edge].Surface, finalSurface, x, y); ///////////////// top edge
- inc(x,edgeWidth);
- end;
-flipSurface(SpritesData[edge].Surface, true);
-x:= cornerWidth;
-y:= textHeight + cornerHeight*2 - edgeHeight-1;
-while x < rect.w-cornerWidth-1 do
- begin
- copyToXY(SpritesData[edge].Surface, finalSurface, x, y); ///////////////// bottom edge
- inc(x,edgeWidth);
- end;
-flipSurface(SpritesData[edge].Surface, true); // restore original position
-
-rotatedEdge:= SDL_CreateRGBSurface(SDL_SWSURFACE, edgeHeight, edgeWidth, 32, RMask, GMask, BMask, AMask);
-x:= rect.w - edgeHeight - 1;
-y:= cornerHeight;
-//// initially was going to rotate in place, but the SDL spec claims width/height are read only
-copyRotatedSurface(SpritesData[edge].Surface,rotatedEdge);
-while y < textHeight + cornerHeight do
- begin
- copyToXY(rotatedEdge, finalSurface, x, y);
- inc(y,edgeWidth);
- end;
-flipSurface(rotatedEdge, false); // restore original position
-x:= 0;
-y:= cornerHeight;
-while y < textHeight + cornerHeight do
- begin
- copyToXY(rotatedEdge, finalSurface, x, y);
- inc(y,edgeWidth);
- end;
-//////////////////////////////// END EDGES //////////////////////////////////////
-
-x:= cornerWidth;
-y:= textHeight + cornerHeight * 2 - edgeHeight - 1;
-copyToXY(SpritesData[tail].Surface, finalSurface, x, y);
-
-rect.x:= edgeHeight;
-rect.y:= edgeHeight;
-rect.w:= rect.w - edgeHeight * 2;
-rect.h:= textHeight + cornerHeight * 2 - edgeHeight * 2;
-i:= rect.w;
-j:= rect.h;
-SDL_FillRect(finalSurface, @rect, cWhiteColor);
-
-pos:= 1; prevpos:= 0; line:= 0;
-while pos <= length(s) do
- begin
- if (s[pos] = #1) or (pos = length(s)) then
- begin
- if s[pos] <> #1 then inc(pos);
- while s[prevpos+1] = ' 'do inc(prevpos);
- substr:= copy(s, prevpos+1, pos-prevpos-1);
- if Length(substr) <> 0 then
- begin
- tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, Str2PChar(substr), cNearBlackColorChannels);
- rect.x:= edgeHeight + 1 + ((i - w) div 2);
- // trying to more evenly position the text, vertically
- rect.y:= edgeHeight + ((j-(numLines*h)) div 2) + line * h;
- SDLTry(tmpsurf <> nil, true);
- SDL_UpperBlit(tmpsurf, nil, finalSurface, @rect);
- SDL_FreeSurface(tmpsurf);
- inc(line);
- prevpos:= pos;
- end;
- end;
- inc(pos);
- end;
-
-//TryDo(SDL_SetColorKey(finalSurface, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true);
-RenderSpeechBubbleTex:= Surface2Tex(finalSurface, true);
-
-SDL_FreeSurface(rotatedEdge);
-SDL_FreeSurface(finalSurface);
-end;
-
procedure RenderHealth(var Hedgehog: THedgehog);
var s: shortstring;
begin
@@ -1352,82 +603,6 @@
perfExt_FinishProgress();
end;
-procedure flipSurface(Surface: PSDL_Surface; Vertical: Boolean);
-var y, x, i, j: LongInt;
- tmpPixel: Longword;
- pixels: PLongWordArray;
-begin
-TryDo(Surface^.format^.BytesPerPixel = 4, 'flipSurface failed, expecting 32 bit surface', true);
-pixels:= Surface^.pixels;
-if Vertical then
- for y := 0 to (Surface^.h div 2) - 1 do
- for x := 0 to Surface^.w - 1 do
- begin
- i:= y * Surface^.w + x;
- j:= (Surface^.h - y - 1) * Surface^.w + x;
- tmpPixel:= pixels^[i];
- pixels^[i]:= pixels^[j];
- pixels^[j]:= tmpPixel;
- end
-else
- for x := 0 to (Surface^.w div 2) - 1 do
- for y := 0 to Surface^.h -1 do
- begin
- i:= y*Surface^.w + x;
- j:= y*Surface^.w + (Surface^.w - x - 1);
- tmpPixel:= pixels^[i];
- pixels^[i]:= pixels^[j];
- pixels^[j]:= tmpPixel;
- end;
-end;
-
-procedure copyToXY(src, dest: PSDL_Surface; destX, destY: LongInt);
-var srcX, srcY, i, j, maxDest: LongInt;
- srcPixels, destPixels: PLongWordArray;
- r0, g0, b0, a0, r1, g1, b1, a1: Byte;
-begin
-maxDest:= (dest^.pitch div 4) * dest^.h;
-srcPixels:= src^.pixels;
-destPixels:= dest^.pixels;
-
-for srcX:= 0 to src^.w - 1 do
- for srcY:= 0 to src^.h - 1 do
- begin
- i:= (destY + srcY) * (dest^.pitch div 4) + destX + srcX;
- j:= srcY * (src^.pitch div 4) + srcX;
- if (i < maxDest) and (srcPixels^[j] and AMask <> 0) then
- begin
- SDL_GetRGBA(destPixels^[i], dest^.format, @r0, @g0, @b0, @a0);
- SDL_GetRGBA(srcPixels^[j], src^.format, @r1, @g1, @b1, @a1);
- r0:= (r0 * (255 - LongInt(a1)) + r1 * LongInt(a1)) div 255;
- g0:= (g0 * (255 - LongInt(a1)) + g1 * LongInt(a1)) div 255;
- b0:= (b0 * (255 - LongInt(a1)) + b1 * LongInt(a1)) div 255;
- a0:= (a0 * (255 - LongInt(a1)) + a1 * LongInt(a1)) div 255;
- destPixels^[i]:= SDL_MapRGBA(dest^.format, r0, g0, b0, a0);
- end;
- end;
-end;
-
-procedure copyRotatedSurface(src, dest: PSDL_Surface); // this is necessary since width/height are read only in SDL, apparently
-var y, x, i, j: LongInt;
- srcPixels, destPixels: PLongWordArray;
-begin
-TryDo(src^.format^.BytesPerPixel = 4, 'rotateSurface failed, expecting 32 bit surface', true);
-TryDo(dest^.format^.BytesPerPixel = 4, 'rotateSurface failed, expecting 32 bit surface', true);
-
-srcPixels:= src^.pixels;
-destPixels:= dest^.pixels;
-
-j:= 0;
-for x := 0 to src^.w - 1 do
- for y := 0 to src^.h - 1 do
- begin
- i:= (src^.h - 1 - y) * (src^.pitch div 4) + x;
- destPixels^[j]:= srcPixels^[i];
- inc(j)
- end;
-end;
-
function RenderHelpWindow(caption, subcaption, description, extra: ansistring; extracolor: LongInt; iconsurf: PSDL_Surface; iconrect: PSDL_Rect): PTexture;
var tmpsurf: PSDL_SURFACE;
w, h, i, j: LongInt;
@@ -1603,8 +778,85 @@
WeaponTooltipTex:= nil
end;
+procedure chFullScr(var s: shortstring);
+var flags: Longword = 0;
+ ico: PSDL_Surface;
+{$IFDEF DEBUGFILE}
+ buf: array[byte] of char;
+{$ENDIF}
+begin
+ s:= s; // avoid compiler hint
+ if Length(s) = 0 then cFullScreen:= not cFullScreen
+ else cFullScreen:= s = '1';
+
+{$IFDEF DEBUGFILE}
+ buf[0]:= char(0); // avoid compiler hint
+ AddFileLog('Prepare to change video parameters...');
+{$ENDIF}
+
+ flags:= SDL_OPENGL;// or SDL_RESIZABLE;
+
+ if cFullScreen then
+ flags:= flags or SDL_FULLSCREEN;
+
+{$IFDEF SDL_IMAGE_NEWER}
+ WriteToConsole('Init SDL_image... ');
+ SDLTry(IMG_Init(IMG_INIT_PNG) <> 0, true);
+ WriteLnToConsole(msgOK);
+{$ENDIF}
+ // load engine icon
+{$IFDEF DARWIN}
+ ico:= LoadImage(Pathz[ptGraphics] + '/hwengine_mac', ifIgnoreCaps);
+{$ELSE}
+ ico:= LoadImage(Pathz[ptGraphics] + '/hwengine', ifIgnoreCaps);
+{$ENDIF}
+ if ico <> nil then
+ begin
+ SDL_WM_SetIcon(ico, 0);
+ SDL_FreeSurface(ico)
+ end;
+
+ // set window caption
+ SDL_WM_SetCaption('Hedgewars', nil);
+
+ if SDLPrimSurface <> nil then
+ begin
+{$IFDEF DEBUGFILE}
+ AddFileLog('Freeing old primary surface...');
+{$ENDIF}
+ SDL_FreeSurface(SDLPrimSurface);
+ SDLPrimSurface:= nil;
+ end;
+
+{$IFDEF SDL13}
+ if SDLwindow = nil then
+ begin
+ SDLwindow:= SDL_CreateWindow('Hedgewars', 0, 0, cScreenWidth, cScreenHeight,
+ SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN
+ {$IFDEF IPHONEOS} or SDL_WINDOW_BORDERLESS{$ENDIF});
+ SDL_CreateRenderer(SDLwindow, -1, 0);
+ end;
+
+ SDL_SetRenderDrawColor(0, 0, 0, 255);
+ SDL_RenderFill(nil);
+ SDL_RenderPresent();
+{$ELSE}
+ SDLPrimSurface:= SDL_SetVideoMode(cScreenWidth, cScreenHeight, cBits, flags);
+ SDLTry(SDLPrimSurface <> nil, true);
+ PixelFormat:= SDLPrimSurface^.format;
+{$ENDIF}
+
+{$IFDEF DEBUGFILE}
+ AddFileLog('Setting up OpenGL...');
+ AddFileLog('SDL video driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))));
+{$ENDIF}
+ SetupOpenGL();
+end;
+
procedure initModule;
begin
+ RegisterVariable('fullscr', vtCommand, @chFullScr, true);
+
PixelFormat:= nil;
SDLPrimSurface:= nil;
--- a/hedgewars/uTeams.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uTeams.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,92 +20,11 @@
unit uTeams;
interface
-uses uConsts, uKeys, uGears, uRandom, uFloat, uStats, uVisualGears, uCollisions, GLunit, uSound;
-
-type
- PHHAmmo = ^THHAmmo;
- THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo;
-
- PHedgehog = ^THedgehog;
- PTeam = ^TTeam;
- PClan = ^TClan;
-
- THedgehog = record
- Name: string[MAXNAMELEN];
- Gear: PGear;
- SpeechGear: PVisualGear;
- NameTagTex,
- HealthTagTex,
- HatTex: PTexture;
- Ammo: PHHAmmo;
- CurAmmoType: TAmmoType;
- AmmoStore: Longword;
- Team: PTeam;
- MultiShootAttacks: Longword;
- visStepPos: LongWord;
- BotLevel : Byte; // 0 - Human player
- HatVisibility: GLfloat;
- stats: TStatistics;
- Hat: shortstring;
- InitialHealth: LongInt; // used for gfResetHealth
- King: boolean; // Flag for a bunch of hedgehog attributes
- Unplaced: boolean; // Flag for hog placing mode
- Timer: Longword;
- Effects: Array[THogEffect] of boolean;
- end;
-
- TTeam = record
- Clan: PClan;
- TeamName: string[MAXNAMELEN];
- ExtDriven: boolean;
- Binds: TBinds;
- Hedgehogs: array[0..cMaxHHIndex] of THedgehog;
- CurrHedgehog: LongWord;
- NameTagTex: PTexture;
- CrosshairTex,
- GraveTex,
- HealthTex,
- AIKillsTex,
- FlagTex: PTexture;
- Flag: shortstring;
- GraveName: shortstring;
- FortName: shortstring;
- TeamHealth: LongInt;
- TeamHealthBarWidth,
- NewTeamHealthBarWidth: LongInt;
- DrawHealthY: LongInt;
- AttackBar: LongWord;
- HedgehogsNumber: Longword;
- hasGone: boolean;
- voicepack: PVoicepack;
- PlayerHash: shortstring; // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players
- stats: TTeamStats;
- end;
-
- TClan = record
- Color: Longword;
- Teams: array[0..Pred(cMaxTeams)] of PTeam;
- TeamsNumber: Longword;
- CurrTeam: LongWord;
- ClanHealth: LongInt;
- ClanIndex: LongInt;
- TurnNumber: LongWord;
- end;
-
-var CurrentTeam: PTeam;
- PreviousTeam: PTeam;
- CurrentHedgehog: PHedgehog;
- TeamsArray: array[0..Pred(cMaxTeams)] of PTeam;
- TeamsCount: Longword;
- ClansArray: array[0..Pred(cMaxTeams)] of PClan;
- ClansCount: Longword;
- LocalClan: LongInt; // last non-bot, non-extdriven clan
- LocalAmmo: LongInt; // last non-bot, non-extdriven clan's first team's ammo index
- CurMinAngle, CurMaxAngle: Longword;
- GameOver: boolean;
+uses uConsts, uKeys, uGears, uRandom, uFloat, uStats, uVisualGears, uCollisions, GLunit, uSound, uTypes;
procedure initModule;
procedure freeModule;
+
function AddTeam(TeamColor: Longword): PTeam;
procedure SwitchHedgehog;
procedure AfterSwitchHedgehog;
@@ -114,12 +33,11 @@
procedure RecountTeamHealth(team: PTeam);
procedure RestoreTeamsFromSave;
function CheckForWin: boolean;
-procedure TeamGone(s: shortstring);
procedure TeamGoneEffect(var Team: TTeam);
-function GetTeamStatString(p: PTeam): shortstring;
implementation
-uses uMisc, uWorld, uLocale, uAmmos, uChat, uMobile;
+uses uLocale, uAmmos, uChat, uMobile, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug;
+
const MaxTeamHealth: LongInt = 0;
function CheckForWin: boolean;
@@ -203,6 +121,19 @@
InsertGearToList(Gear)
end
end;
+// Try to make the ammo menu viewed when not your turn be a bit more useful for per-hog-ammo mode
+with CurrentTeam^ do
+ if ((GameFlags and gfPerHogAmmo) <> 0) and (not ExtDriven) and (CurrentHedgehog^.BotLevel = 0) then
+ begin
+ c:= CurrHedgehog;
+ repeat
+ begin
+ inc(c);
+ if c > cMaxHHIndex then c:= 0
+ end
+ until (c = CurrHedgehog) or (Hedgehogs[c].Gear <> nil);
+ LocalAmmo:= Hedgehogs[c].AmmoStore
+ end;
c:= CurrentTeam^.Clan^.ClanIndex;
repeat
@@ -461,7 +392,103 @@
TeamsArray[t]^.ExtDriven:= false
end;
-procedure TeamGone(s: shortstring);
+procedure TeamGoneEffect(var Team: TTeam);
+var i: LongInt;
+begin
+with Team do
+ for i:= 0 to cMaxHHIndex do
+ with Hedgehogs[i] do
+ if Gear <> nil then
+ begin
+ Gear^.Invulnerable:= false;
+ Gear^.Damage:= Gear^.Health
+ end
+end;
+
+procedure chAddHH(var id: shortstring);
+var s: shortstring;
+ Gear: PGear;
+begin
+ s:= '';
+ if (not isDeveloperMode) or (CurrentTeam = nil) then exit;
+ with CurrentTeam^ do
+ begin
+ SplitBySpace(id, s);
+ CurrentHedgehog:= @Hedgehogs[HedgehogsNumber];
+ val(id, CurrentHedgehog^.BotLevel);
+ Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0);
+ SplitBySpace(s, id);
+ val(s, Gear^.Health);
+ TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true);
+ Gear^.Hedgehog^.Team:= CurrentTeam;
+ if (GameFlags and gfSharedAmmo) <> 0 then CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex
+ else if (GameFlags and gfPerHogAmmo) <> 0 then
+ begin
+ AddAmmoStore;
+ CurrentHedgehog^.AmmoStore:= StoreCnt - 1
+ end
+ else CurrentHedgehog^.AmmoStore:= TeamsCount - 1;
+ CurrentHedgehog^.Gear:= Gear;
+ CurrentHedgehog^.Name:= id;
+ CurrentHedgehog^.InitialHealth:= Gear^.Health;
+ CurrHedgehog:= HedgehogsNumber;
+ inc(HedgehogsNumber)
+ end
+end;
+
+procedure chAddTeam(var s: shortstring);
+var Color: Longword;
+ ts, cs: shortstring;
+begin
+ cs:= '';
+ ts:= '';
+ if isDeveloperMode then
+ begin
+ SplitBySpace(s, cs);
+ SplitBySpace(cs, ts);
+ val(cs, Color);
+ TryDo(Color <> 0, 'Error: black team color', true);
+
+ // color is always little endian so the mask must be constant also in big endian archs
+ Color:= Color or $FF000000;
+
+ AddTeam(Color);
+ CurrentTeam^.TeamName:= ts;
+ CurrentTeam^.PlayerHash:= s;
+ if GameType in [gmtDemo, gmtSave] then CurrentTeam^.ExtDriven:= true;
+
+ CurrentTeam^.voicepack:= AskForVoicepack('Default')
+ end
+end;
+
+procedure chSetHHCoords(var x: shortstring);
+var y: shortstring;
+ t: Longint;
+begin
+y:= '';
+if (not isDeveloperMode) or (CurrentHedgehog = nil) or (CurrentHedgehog^.Gear = nil) then exit;
+SplitBySpace(x, y);
+val(x, t);
+CurrentHedgehog^.Gear^.X:= int2hwFloat(t);
+val(y, t);
+CurrentHedgehog^.Gear^.Y:= int2hwFloat(t)
+end;
+
+procedure chBind(var id: shortstring);
+var s: shortstring;
+ b: LongInt;
+begin
+s:= '';
+if CurrentTeam = nil then exit;
+SplitBySpace(id, s);
+if s[1]='"' then Delete(s, 1, 1);
+if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
+b:= KeyNameToCode(id);
+if b = 0 then OutError(errmsgUnknownVariable + ' "' + id + '"', false)
+ else CurrentTeam^.Binds[b]:= s
+end;
+
+procedure chTeamGone(var s:shortstring);
var t: LongInt;
begin
t:= 0;
@@ -479,28 +506,15 @@
RecountTeamHealth(TeamsArray[t])
end;
-procedure TeamGoneEffect(var Team: TTeam);
-var i: LongInt;
-begin
-with Team do
- for i:= 0 to cMaxHHIndex do
- with Hedgehogs[i] do
- if Gear <> nil then
- begin
- Gear^.Invulnerable:= false;
- Gear^.Damage:= Gear^.Health
- end
-end;
-
-function GetTeamStatString(p: PTeam): shortstring;
-var s: ansistring;
-begin
- s:= p^.TeamName + ':' + inttostr(p^.TeamHealth) + ':';
- GetTeamStatString:= s;
-end;
procedure initModule;
begin
+ RegisterVariable('addhh', vtCommand, @chAddHH, false);
+ RegisterVariable('addteam', vtCommand, @chAddTeam, false);
+ RegisterVariable('hhcoords', vtCommand, @chSetHHCoords, false);
+ RegisterVariable('bind', vtCommand, @chBind, true );
+ RegisterVariable('teamgone', vtCommand, @chTeamGone, true );
+
CurrentTeam:= nil;
PreviousTeam:= nil;
CurrentHedgehog:= nil;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uTextures.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,187 @@
+{$INCLUDE "options.inc"}
+
+unit uTextures;
+interface
+uses SDLh, uTypes;
+
+function NewTexture(width, height: Longword; buf: Pointer): PTexture;
+function Surface2Tex(surf: PSDL_Surface; enableClamp: boolean): PTexture;
+procedure FreeTexture(tex: PTexture);
+
+procedure initModule;
+procedure freeModule;
+
+implementation
+uses GLunit, uUtils, uVariables, uConsts, uDebug;
+
+var TextureList: PTexture;
+
+
+procedure SetTextureParameters(enableClamp: Boolean);
+begin
+ if enableClamp and ((cReducedQuality and rqClampLess) = 0) then
+ begin
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)
+ end;
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
+end;
+
+procedure ResetVertexArrays(texture: PTexture);
+begin
+with texture^ do
+ begin
+ vb[0].X:= 0;
+ vb[0].Y:= 0;
+ vb[1].X:= w;
+ vb[1].Y:= 0;
+ vb[2].X:= w;
+ vb[2].Y:= h;
+ vb[3].X:= 0;
+ vb[3].Y:= h;
+
+ tb[0].X:= 0;
+ tb[0].Y:= 0;
+ tb[1].X:= rx;
+ tb[1].Y:= 0;
+ tb[2].X:= rx;
+ tb[2].Y:= ry;
+ tb[3].X:= 0;
+ tb[3].Y:= ry
+ end;
+end;
+
+function NewTexture(width, height: Longword; buf: Pointer): PTexture;
+begin
+new(NewTexture);
+NewTexture^.PrevTexture:= nil;
+NewTexture^.NextTexture:= nil;
+NewTexture^.Scale:= 1;
+if TextureList <> nil then
+ begin
+ TextureList^.PrevTexture:= NewTexture;
+ NewTexture^.NextTexture:= TextureList
+ end;
+TextureList:= NewTexture;
+
+NewTexture^.w:= width;
+NewTexture^.h:= height;
+NewTexture^.rx:= 1.0;
+NewTexture^.ry:= 1.0;
+
+ResetVertexArrays(NewTexture);
+
+glGenTextures(1, @NewTexture^.id);
+
+glBindTexture(GL_TEXTURE_2D, NewTexture^.id);
+glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, buf);
+
+SetTextureParameters(true);
+end;
+
+function Surface2Tex(surf: PSDL_Surface; enableClamp: boolean): PTexture;
+var tw, th, x, y: Longword;
+ tmpp: pointer;
+ fromP4, toP4: PLongWordArray;
+begin
+new(Surface2Tex);
+Surface2Tex^.PrevTexture:= nil;
+Surface2Tex^.NextTexture:= nil;
+if TextureList <> nil then
+ begin
+ TextureList^.PrevTexture:= Surface2Tex;
+ Surface2Tex^.NextTexture:= TextureList
+ end;
+TextureList:= Surface2Tex;
+
+Surface2Tex^.w:= surf^.w;
+Surface2Tex^.h:= surf^.h;
+
+if (surf^.format^.BytesPerPixel <> 4) then
+ begin
+ TryDo(false, 'Surface2Tex failed, expecting 32 bit surface', true);
+ Surface2Tex^.id:= 0;
+ exit
+ end;
+
+
+glGenTextures(1, @Surface2Tex^.id);
+
+glBindTexture(GL_TEXTURE_2D, Surface2Tex^.id);
+
+if SDL_MustLock(surf) then
+ SDLTry(SDL_LockSurface(surf) >= 0, true);
+
+if (not SupportNPOTT) and (not (isPowerOf2(Surf^.w) and isPowerOf2(Surf^.h))) then
+ begin
+ tw:= toPowerOf2(Surf^.w);
+ th:= toPowerOf2(Surf^.h);
+
+ Surface2Tex^.rx:= Surf^.w / tw;
+ Surface2Tex^.ry:= Surf^.h / th;
+
+ GetMem(tmpp, tw * th * surf^.format^.BytesPerPixel);
+
+ fromP4:= Surf^.pixels;
+ toP4:= tmpp;
+
+ for y:= 0 to Pred(Surf^.h) do
+ begin
+ for x:= 0 to Pred(Surf^.w) do toP4^[x]:= fromP4^[x];
+ for x:= Surf^.w to Pred(tw) do toP4^[x]:= 0;
+ toP4:= @(toP4^[tw]);
+ fromP4:= @(fromP4^[Surf^.pitch div 4])
+ end;
+
+ for y:= Surf^.h to Pred(th) do
+ begin
+ for x:= 0 to Pred(tw) do toP4^[x]:= 0;
+ toP4:= @(toP4^[tw])
+ end;
+
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tw, th, 0, GL_RGBA, GL_UNSIGNED_BYTE, tmpp);
+
+ FreeMem(tmpp, tw * th * surf^.format^.BytesPerPixel)
+ end
+else
+ begin
+ Surface2Tex^.rx:= 1.0;
+ Surface2Tex^.ry:= 1.0;
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, surf^.w, surf^.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, surf^.pixels);
+ end;
+
+ResetVertexArrays(Surface2Tex);
+
+if SDL_MustLock(surf) then
+ SDL_UnlockSurface(surf);
+
+SetTextureParameters(enableClamp);
+end;
+
+procedure FreeTexture(tex: PTexture);
+begin
+ if tex <> nil then
+ begin
+ if tex^.NextTexture <> nil then
+ tex^.NextTexture^.PrevTexture:= tex^.PrevTexture;
+ if tex^.PrevTexture <> nil then
+ tex^.PrevTexture^.NextTexture:= tex^.NextTexture
+ else
+ TextureList:= tex^.NextTexture;
+ glDeleteTextures(1, @tex^.id);
+ Dispose(tex);
+ end
+end;
+
+procedure initModule;
+begin
+TextureList:= nil;
+end;
+
+procedure freeModule;
+begin
+ while TextureList <> nil do FreeTexture(TextureList);
+end;
+
+end.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uTypes.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,368 @@
+{$INCLUDE "options.inc"}
+
+unit uTypes;
+interface
+
+uses SDLh, uFloat, GLunit, uConsts, Math;
+
+type
+ HwColor4f = record
+ r, g, b, a: byte
+ end;
+
+ TGameState = (gsLandGen, gsStart, gsGame, gsChat, gsConfirm, gsExit);
+
+ TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview, gmtSyntax);
+
+ TPathType = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptTeams, ptMaps,
+ ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts,
+ ptLocale, ptAmmoMenu, ptHedgehog, ptVoices, ptHats, ptFlags, ptMissionMaps);
+
+ TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame,
+ sprLag, sprArrow, sprBazookaShell, sprTargetP, sprBee,
+ sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff,
+ sprMineOn, sprMineDead, sprCase, sprFAid, sprDynamite, sprPower,
+ sprClusterBomb, sprClusterParticle, sprFlame, sprHorizont,
+ sprHorizontL, sprHorizontR, sprSky, sprSkyL,
+ sprSkyR, sprAMBorderHorizontal, sprAMBorderVertical, sprAMSlot, sprAMAmmos,
+ sprAMSlotKeys, sprAMCorners, sprFinger, sprAirBomb,
+ sprAirplane, sprAmAirplane, sprAmGirder, sprHHTelepMask,
+ sprSwitch, sprParachute, sprTarget, sprRopeNode,
+ sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR,
+ sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun,
+ sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
+ sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
+ sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
+ sprKamikaze, sprWhip, sprKowtow, sprSad, sprWave,
+ sprHurrah, sprLemonade, sprShrug, sprJuggle, sprExplPart, sprExplPart2,
+ sprCakeWalk, sprCakeDown, sprAMAmmosBW, sprWatermelon,
+ sprEvilTrace, sprHellishBomb, sprSeduction, sprDress,
+ sprCensored, sprDrill, sprHandDrill, sprHandBallgun, sprBalls,
+ sprPlane, sprHandPlane, sprUtility, sprInvulnerable, sprVampiric, sprGirder,
+ sprSpeechCorner, sprSpeechEdge, sprSpeechTail,
+ sprThoughtCorner, sprThoughtEdge, sprThoughtTail,
+ sprShoutCorner, sprShoutEdge, sprShoutTail,
+ sprSniperRifle, sprBubbles, sprJetpack, sprHealth, sprHandMolotov, sprMolotov,
+ sprSmoke, sprSmokeWhite, sprShell, sprDust, sprExplosives, sprExplosivesRoll,
+ sprAmTeleport, sprSplash, sprDroplet, sprBirdy, sprHandCake, sprHandConstruction,
+ sprHandGrenade, sprHandMelon, sprHandMortar, sprHandSkip, sprHandCluster,
+ sprHandDynamite, sprHandHellish, sprHandMine, sprHandSeduction, sprHandVamp,
+ sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee,
+ sprFeather, sprPiano, sprHandSineGun, sprPortalGun, sprPortal,
+ sprCheese, sprHandCheese, sprHandFlamethrower, sprChunk, sprNote,
+ sprSMineOff, sprSMineOn, sprHandSMine, sprHammer,
+ sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb,
+ sprBulletHit
+ );
+
+ // Gears that interact with other Gears and/or Land
+ TGearType = (gtBomb, gtHedgehog, gtShell, gtGrave, gtBee, // 4
+ gtShotgunShot, gtPickHammer, gtRope, gtMine, gtCase, // 9
+ gtDEagleShot, gtDynamite, gtClusterBomb, gtCluster, gtShover, // 14
+ gtFlame, gtFirePunch, gtATStartGame, gtATSmoothWindCh, // 18
+ gtATFinishGame, gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, // 23
+ gtGirder, gtTeleport, gtSwitcher, gtTarget, gtMortar, // 28
+ gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 34
+ gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 40
+ gtSniperRifleShot, gtJetpack, gtMolotov, gtExplosives, gtBirdy, // 45
+ gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51
+ gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56
+ gtNapalmBomb); // 57
+
+ // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
+ TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
+ vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
+ vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtHealth, vgtShell,
+ vgtDust, vgtSplash, vgtDroplet, vgtSmokeRing, vgtBeeTrace, vgtEgg,
+ vgtFeather, vgtHealthTag, vgtSmokeTrace, vgtEvilTrace, vgtExplosion,
+ vgtBigExplosion, vgtChunk, vgtNote, vgtLineTrail, vgtBulletHit, vgtCircle);
+
+ TGearsType = set of TGearType;
+
+ TDamageSource = (dsUnknown, dsFall, dsBullet, dsExplosion, dsShove, dsPoison);
+
+ TSound = (sndNone,
+ sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease,
+ sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact,
+ sndMineTick, sndPickhammer, sndGun, sndBee, sndJump1, sndJump2,
+ sndJump3, sndYesSir, sndLaugh, sndIllGetYou, sndIncoming,
+ sndMissed, sndStupid, sndFirstBlood, sndBoring, sndByeBye,
+ sndSameTeam, sndNutter, sndReinforce, sndTraitor, sndRegret,
+ sndEnemyDown, sndCoward, sndHurry, sndWatchIt, sndKamikaze,
+ sndCake, sndOw1, sndOw2, sndOw3, sndOw4, sndFirePunch1, sndFirePunch2,
+ sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6,
+ sndMelon, sndHellish, sndYoohoo, sndRCPlane, sndWhipCrack,
+ sndRideOfTheValkyries, sndDenied, sndPlaced, sndBaseballBat,
+ sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter,
+ sndHomerun, sndMolotov, sndCover, sndUhOh, sndOops,
+ sndNooo, sndHello, sndRopeShot, sndRopeAttach, sndRopeRelease,
+ sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity,
+ sndHellishImpact1, sndHellishImpact2, sndHellishImpact3, sndHellishImpact4,
+ sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak, sndDrillRocket,
+ sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater,
+ sndPiano0, sndPiano1, sndPiano2, sndPiano3, sndPiano4, sndPiano5, sndPiano6, sndPiano7, sndPiano8,
+ sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack,
+ sndComeonthen, sndParachute, sndBump, sndResurrector);
+
+ TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6
+ amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13
+ amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18
+ amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, // 24
+ amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30
+ amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
+ amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
+ amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
+ amResurrector, amDrillStrike);
+
+ TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
+
+ THWFont = (fnt16, fntBig, fntSmall {$IFNDEF IPHONEOS}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF});
+
+ TCapGroup = (capgrpGameState, capgrpAmmoinfo, capgrpVolume,
+ capgrpMessage, capgrpAmmostate);
+
+ TStatInfoType = (siGameResult, siMaxStepDamage, siMaxStepKills, siKilledHHs,
+ siClanHealth, siTeamStats, siPlayerKills, siMaxTeamDamage,
+ siMaxTeamKills, siMaxTurnSkips );
+
+ TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle);
+
+ THHFont = record
+ Handle: PTTF_Font;
+ Height: LongInt;
+ style: LongInt;
+ Name: string[21];
+ end;
+
+ PAmmo = ^TAmmo;
+ TAmmo = record
+ Propz: LongWord;
+ Count: LongWord;
+(* Using for place hedgehogs mode, but for any other situation where the initial count would be needed I guess.
+For example, say, a mode where the weaponset is reset each turn, or on sudden death *)
+ NumPerTurn: LongWord;
+ Timer: LongWord;
+ Pos: LongWord;
+ AmmoType: TAmmoType;
+ AttackVoice: TSound;
+ end;
+
+ TVertex2f = record
+ X, Y: GLfloat;
+ end;
+
+ TVertex2i = record
+ X, Y: GLint;
+ end;
+
+ PTexture = ^TTexture;
+ TTexture = record
+ id: GLuint;
+ w, h, scale: LongInt;
+ rx, ry: GLfloat;
+ priority: GLfloat;
+ vb, tb: array [0..3] of TVertex2f;
+ PrevTexture, NextTexture: PTexture;
+ end;
+
+ THogEffect = (heInvulnerable, heResurrectable, hePoisoned, heResurrected);
+
+ TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite);
+
+ PGear = ^TGear;
+ PHedgehog = ^THedgehog;
+ PTeam = ^TTeam;
+ PClan = ^TClan;
+
+ TGearStepProcedure = procedure (Gear: PGear);
+ TGear = record
+ NextGear, PrevGear: PGear;
+ Active: Boolean;
+ AdvBounce: Longword;
+ Invulnerable: Boolean;
+ RenderTimer: Boolean;
+ AmmoType : TAmmoType;
+ State : Longword;
+ X : hwFloat;
+ Y : hwFloat;
+ dX: hwFloat;
+ dY: hwFloat;
+ Kind: TGearType;
+ Pos: Longword;
+ doStep: TGearStepProcedure;
+ Radius: LongInt;
+ Angle, Power : Longword;
+ DirAngle: real;
+ Timer : LongWord;
+ Elasticity: hwFloat;
+ Friction : hwFloat;
+ Message, MsgParam : Longword;
+ Hedgehog: PHedgehog;
+ Health, Damage, Karma: LongInt;
+ CollisionIndex: LongInt;
+ Tag: LongInt;
+ Tex: PTexture;
+ Z: Longword;
+ IntersectGear: PGear;
+ FlightTime: Longword;
+ uid: Longword;
+ ImpactSound: TSound; // first sound, others have to be after it in the sounds def.
+ nImpactSounds: Word; // count of ImpactSounds
+ SoundChannel: LongInt;
+ PortalCounter: LongWord // Hopefully temporary, but avoids infinite portal loops in a guaranteed fashion.
+ end;
+ TPGearArray = Array of PGear;
+
+ PVisualGear = ^TVisualGear;
+ TVGearStepProcedure = procedure (Gear: PVisualGear; Steps: Longword);
+ TVisualGear = record
+ NextGear, PrevGear: PVisualGear;
+ Frame,
+ FrameTicks: Longword;
+ X : real;
+ Y : real;
+ dX: real;
+ dY: real;
+ tdX: real;
+ tdY: real;
+ State : Longword;
+ Timer: Longword;
+ Angle, dAngle: real;
+ Kind: TVisualGearType;
+ doStep: TVGearStepProcedure;
+ Tex: PTexture;
+ alpha, scale: GLfloat;
+ Hedgehog: PHedgehog;
+ Text: shortstring;
+ Tint: Longword;
+ uid: Longword;
+ end;
+
+ TStatistics = record
+ DamageRecv,
+ DamageGiven: Longword;
+ StepDamageRecv,
+ StepDamageGiven,
+ StepKills: Longword;
+ MaxStepDamageRecv,
+ MaxStepDamageGiven,
+ MaxStepKills: Longword;
+ FinishedTurns: Longword;
+ end;
+
+ TTeamStats = record
+ Kills : Longword;
+ AIKills : Longword;
+ TeamKills : Longword;
+ TurnSkips : Longword;
+ TeamDamage : Longword;
+ end;
+
+ TBinds = array[0..cKeyMaxIndex] of shortstring;
+ TKeyboardState = array[0..cKeyMaxIndex] of Byte;
+
+ PVoicepack = ^TVoicepack;
+ TVoicepack = record
+ name: shortstring;
+ chunks: array [TSound] of PMixChunk;
+ end;
+
+ PHHAmmo = ^THHAmmo;
+ THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo;
+
+ THedgehog = record
+ Name: string[MAXNAMELEN];
+ Gear: PGear;
+ SpeechGear: PVisualGear;
+ NameTagTex,
+ HealthTagTex,
+ HatTex: PTexture;
+ Ammo: PHHAmmo;
+ CurAmmoType: TAmmoType;
+ AmmoStore: Longword;
+ Team: PTeam;
+ MultiShootAttacks: Longword;
+ visStepPos: LongWord;
+ BotLevel : Byte; // 0 - Human player
+ HatVisibility: GLfloat;
+ stats: TStatistics;
+ Hat: shortstring;
+ InitialHealth: LongInt; // used for gfResetHealth
+ King: boolean; // Flag for a bunch of hedgehog attributes
+ Unplaced: boolean; // Flag for hog placing mode
+ Timer: Longword;
+ Effects: Array[THogEffect] of boolean;
+ end;
+
+ TTeam = record
+ Clan: PClan;
+ TeamName: string[MAXNAMELEN];
+ ExtDriven: boolean;
+ Binds: TBinds;
+ Hedgehogs: array[0..cMaxHHIndex] of THedgehog;
+ CurrHedgehog: LongWord;
+ NameTagTex: PTexture;
+ CrosshairTex,
+ GraveTex,
+ HealthTex,
+ AIKillsTex,
+ FlagTex: PTexture;
+ Flag: shortstring;
+ GraveName: shortstring;
+ FortName: shortstring;
+ TeamHealth: LongInt;
+ TeamHealthBarWidth,
+ NewTeamHealthBarWidth: LongInt;
+ DrawHealthY: LongInt;
+ AttackBar: LongWord;
+ HedgehogsNumber: Longword;
+ hasGone: boolean;
+ voicepack: PVoicepack;
+ PlayerHash: shortstring; // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players
+ stats: TTeamStats;
+ end;
+
+ TClan = record
+ Color: Longword;
+ Teams: array[0..Pred(cMaxTeams)] of PTeam;
+ TeamsNumber: Longword;
+ CurrTeam: LongWord;
+ ClanHealth: LongInt;
+ ClanIndex: LongInt;
+ TurnNumber: LongWord;
+ end;
+
+ TAmmoStrId = (sidNothing, sidGrenade, sidClusterBomb, sidBazooka, sidBee, sidShotgun,
+ sidPickHammer, sidSkip, sidRope, sidMine, sidDEagle,
+ sidDynamite, sidBaseballBat, sidFirePunch, sidSeconds,
+ sidParachute, sidAirAttack, sidMineStrike, sidBlowTorch,
+ sidGirder, sidTeleport, sidSwitch, sidMortar, sidWhip,
+ sidKamikaze, sidCake, sidSeduction, sidWatermelon,
+ sidHellishBomb, sidDrill, sidBallgun, sidNapalm, sidRCPlane,
+ sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
+ sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
+ sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower,
+ sidSMine, sidHammer, sidResurrector, sidDrillStrike);
+
+ TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
+ sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
+ sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady);
+
+ TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
+ eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, eidHurtSelf,
+ eidHomerun, eidGone);
+
+ TGoalStrId = (gidCaption, gidSubCaption, gidForts, gidLowGravity, gidInvulnerable,
+ gidVampiric, gidKarma, gidKing, gidPlaceHog, gidArtillery,
+ gidSolidLand, gidSharedAmmo, gidMineTimer, gidNoMineTimer, gidRandomMineTimer,
+ gidDamageModifier, gidResetHealth, gidAISurvival, gidInfAttack, gidResetWeps, gidPerHogAmmo);
+
+ TLandArray = packed array of array of LongWord;
+ TCollisionArray = packed array of array of Word;
+ TPreview = packed array[0..127, 0..31] of byte;
+ TDirtyTag = packed array of array of byte;
+
+
+implementation
+
+end.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uUtils.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,344 @@
+{$INCLUDE "options.inc"}
+unit uUtils;
+
+interface
+uses uTypes, uFloat, GLunit;
+
+procedure SplitBySpace(var a, b: shortstring);
+procedure SplitByChar(var a, b: ansistring; c: char);
+
+function EnumToStr(const en : TGearType) : shortstring; overload;
+function EnumToStr(const en : TSound) : shortstring; overload;
+function EnumToStr(const en : TAmmoType) : shortstring; overload;
+function EnumToStr(const en : THogEffect) : shortstring; overload;
+
+function Min(a, b: LongInt): LongInt; inline;
+function Max(a, b: LongInt): LongInt; inline;
+
+function IntToStr(n: LongInt): shortstring;
+function FloatToStr(n: hwFloat): shortstring;
+
+function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat;
+function DxDy2Angle32(const _dY, _dX: hwFloat): LongInt;
+function DxDy2AttackAngle(const _dY, _dX: hwFloat): LongInt;
+
+procedure SetLittle(var r: hwFloat);
+
+function Str2PChar(const s: shortstring): PChar;
+function DecodeBase64(s: shortstring): shortstring;
+
+function isPowerOf2(i: Longword): boolean;
+function toPowerOf2(i: Longword): Longword; inline;
+
+function endian(independent: LongWord): LongWord; inline;
+
+function CheckCJKFont(s: ansistring; font: THWFont): THWFont;
+
+{$IFDEF DEBUGFILE}
+procedure AddFileLog(s: shortstring);
+{$ENDIF}
+
+function CheckNoTeamOrHH: boolean; inline;
+
+function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
+function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
+
+procedure initModule;
+procedure freeModule;
+
+
+implementation
+uses typinfo, Math, uConsts, uVariables, SysUtils;
+
+var
+{$IFDEF DEBUGFILE}
+ f: textfile;
+{$ENDIF}
+
+// should this include "strtolower()" for the split string?
+procedure SplitBySpace(var a, b: shortstring);
+var i, t: LongInt;
+begin
+i:= Pos(' ', a);
+if i > 0 then
+ begin
+ for t:= 1 to Pred(i) do
+ if (a[t] >= 'A')and(a[t] <= 'Z') then Inc(a[t], 32);
+ b:= copy(a, i + 1, Length(a) - i);
+ byte(a[0]):= Pred(i)
+ end else b:= '';
+end;
+
+procedure SplitByChar(var a, b: ansistring; c: char);
+var i: LongInt;
+begin
+i:= Pos(c, a);
+if i > 0 then
+ begin
+ b:= copy(a, i + 1, Length(a) - i);
+ setlength(a, Pred(i));
+ end else b:= '';
+end;
+
+function EnumToStr(const en : TGearType) : shortstring; overload;
+begin
+EnumToStr:= GetEnumName(TypeInfo(TGearType), ord(en))
+end;
+
+function EnumToStr(const en : TSound) : shortstring; overload;
+begin
+EnumToStr:= GetEnumName(TypeInfo(TSound), ord(en))
+end;
+
+function EnumToStr(const en : TAmmoType) : shortstring; overload;
+begin
+EnumToStr:= GetEnumName(TypeInfo(TAmmoType), ord(en))
+end;
+
+function EnumToStr(const en: THogEffect) : shortstring; overload;
+begin
+ EnumToStr := GetEnumName(TypeInfo(THogEffect), ord(en))
+end;
+
+
+function Min(a, b: LongInt): LongInt;
+begin
+if a < b then Min:= a else Min:= b
+end;
+
+function Max(a, b: LongInt): LongInt;
+begin
+if a > b then Max:= a else Max:= b
+end;
+
+
+function IntToStr(n: LongInt): shortstring;
+begin
+str(n, IntToStr)
+end;
+
+function FloatToStr(n: hwFloat): shortstring;
+begin
+FloatToStr:= cstr(n) + '_' + inttostr(Lo(n.QWordValue))
+end;
+
+
+function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat;
+var dY, dX: Extended;
+begin
+dY:= _dY.QWordValue / $100000000;
+if _dY.isNegative then dY:= - dY;
+dX:= _dX.QWordValue / $100000000;
+if _dX.isNegative then dX:= - dX;
+DxDy2Angle:= arctan2(dY, dX) * 180 / pi
+end;
+
+function DxDy2Angle32(const _dY, _dX: hwFloat): LongInt;
+const _16divPI: Extended = 16/pi;
+var dY, dX: Extended;
+begin
+dY:= _dY.QWordValue / $100000000;
+if _dY.isNegative then dY:= - dY;
+dX:= _dX.QWordValue / $100000000;
+if _dX.isNegative then dX:= - dX;
+DxDy2Angle32:= trunc(arctan2(dY, dX) * _16divPI) and $1f
+end;
+
+function DxDy2AttackAngle(const _dY, _dX: hwFloat): LongInt;
+const MaxAngleDivPI: Extended = cMaxAngle/pi;
+var dY, dX: Extended;
+begin
+dY:= _dY.QWordValue / $100000000;
+if _dY.isNegative then dY:= - dY;
+dX:= _dX.QWordValue / $100000000;
+if _dX.isNegative then dX:= - dX;
+DxDy2AttackAngle:= trunc(arctan2(dY, dX) * MaxAngleDivPI)
+end;
+
+
+procedure SetLittle(var r: hwFloat);
+begin
+r:= SignAs(cLittle, r)
+end;
+
+
+function isPowerOf2(i: Longword): boolean;
+begin
+if i = 0 then exit(true);
+while not odd(i) do i:= i shr 1;
+isPowerOf2:= (i = 1)
+end;
+
+function toPowerOf2(i: Longword): Longword;
+begin
+toPowerOf2:= 1;
+while (toPowerOf2 < i) do toPowerOf2:= toPowerOf2 shl 1
+end;
+
+
+function DecodeBase64(s: shortstring): shortstring;
+const table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+var i, t, c: Longword;
+begin
+c:= 0;
+for i:= 1 to Length(s) do
+ begin
+ t:= Pos(s[i], table);
+ if s[i] = '=' then inc(c);
+ if t > 0 then byte(s[i]):= t - 1 else byte(s[i]):= 0
+ end;
+
+i:= 1;
+t:= 1;
+while i <= length(s) do
+ begin
+ DecodeBase64[t ]:= char((byte(s[i ]) shl 2) or (byte(s[i + 1]) shr 4));
+ DecodeBase64[t + 1]:= char((byte(s[i + 1]) shl 4) or (byte(s[i + 2]) shr 2));
+ DecodeBase64[t + 2]:= char((byte(s[i + 2]) shl 6) or (byte(s[i + 3]) ));
+ inc(t, 3);
+ inc(i, 4)
+ end;
+
+if c < 3 then t:= t - c;
+
+byte(DecodeBase64[0]):= t - 1
+end;
+
+
+function Str2PChar(const s: shortstring): PChar;
+const CharArray: array[byte] of Char = '';
+begin
+CharArray:= s;
+CharArray[Length(s)]:= #0;
+Str2PChar:= @CharArray
+end;
+
+
+function endian(independent: LongWord): LongWord; inline;
+begin
+{$IFDEF ENDIAN_LITTLE}
+endian:= independent;
+{$ELSE}
+endian:= (((independent and $FF000000) shr 24) or
+ ((independent and $00FF0000) shr 8) or
+ ((independent and $0000FF00) shl 8) or
+ ((independent and $000000FF) shl 24))
+{$ENDIF}
+end;
+
+
+{$IFDEF DEBUGFILE}
+procedure AddFileLog(s: shortstring);
+begin
+writeln(f, GameTicks: 6, ': ', s);
+flush(f)
+end;
+{$ENDIF}
+
+
+function CheckCJKFont(s: ansistring; font: THWFont): THWFont;
+var l, i : LongInt;
+ u: WideChar;
+ tmpstr: array[0..256] of WideChar;
+begin
+
+{$IFNDEF IPHONEOS}
+// remove chinese fonts for now
+if (font >= CJKfnt16) or (length(s) = 0) then
+{$ENDIF}
+ exit(font);
+
+l:= Utf8ToUnicode(@tmpstr, Str2PChar(s), length(s))-1;
+i:= 0;
+while i < l do
+ begin
+ u:= tmpstr[i];
+ if (#$2E80 <= u) and (
+ (u <= #$2FDF ) or // CJK Radicals Supplement / Kangxi Radicals
+ ((#$2FF0 <= u) and (u <= #$303F)) or // Ideographic Description Characters / CJK Radicals Supplement
+ ((#$31C0 <= u) and (u <= #$31EF)) or // CJK Strokes
+ ((#$3200 <= u) and (u <= #$4DBF)) or // Enclosed CJK Letters and Months / CJK Compatibility / CJK Unified Ideographs Extension A
+ ((#$4E00 <= u) and (u <= #$9FFF)) or // CJK Unified Ideographs
+ ((#$F900 <= u) and (u <= #$FAFF)) or // CJK Compatibility Ideographs
+ ((#$FE30 <= u) and (u <= #$FE4F))) // CJK Compatibility Forms
+ then exit(THWFont( ord(font) + ((ord(High(THWFont))+1) div 2) ));
+ inc(i)
+ end;
+exit(font);
+(* two more to check. pascal WideChar is only 16 bit though
+ ((#$20000 <= u) and (u >= #$2A6DF)) or // CJK Unified Ideographs Extension B
+ ((#$2F800 <= u) and (u >= #$2FA1F))) // CJK Compatibility Ideographs Supplement *)
+end;
+
+
+function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
+begin
+ if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
+ GetLaunchX:= sign(dir) * (8 + hwRound(AngleSin(angle) * Ammoz[at].ejectX) + hwRound(AngleCos(angle) * Ammoz[at].ejectY))
+ else
+ GetLaunchX:= 0
+end;
+
+function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
+begin
+ if (Ammoz[at].ejectX <> 0) or (Ammoz[at].ejectY <> 0) then
+ GetLaunchY:= hwRound(AngleSin(angle) * Ammoz[at].ejectY) - hwRound(AngleCos(angle) * Ammoz[at].ejectX) - 2
+ else
+ GetLaunchY:= 0
+end;
+
+function CheckNoTeamOrHH: boolean;
+begin
+CheckNoTeamOrHH:= (CurrentTeam = nil) or (CurrentHedgehog^.Gear = nil);
+end;
+
+procedure initModule;
+{$IFDEF DEBUGFILE}{$IFNDEF IPHONEOS}var i: LongInt;{$ENDIF}{$ENDIF}
+begin
+{$IFDEF DEBUGFILE}
+{$I-}
+{$IFDEF IPHONEOS}
+ Assign(f,'../Documents/hw-' + cLogfileBase + '.log');
+ Rewrite(f);
+{$ELSE}
+ if (ParamStr(1) <> '') and (ParamStr(2) <> '') then
+ if (ParamCount <> 3) and (ParamCount <> cDefaultParamNum) then
+ begin
+ for i:= 0 to 7 do
+ begin
+ assign(f, ExtractFileDir(ParamStr(2)) + '/' + cLogfileBase + inttostr(i) + '.log');
+ rewrite(f);
+ if IOResult = 0 then break;
+ end;
+ if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr
+ end
+ else
+ begin
+ for i:= 0 to 7 do
+ begin
+ assign(f, ParamStr(1) + '/Logs/' + cLogfileBase + inttostr(i) + '.log');
+ rewrite(f);
+ if IOResult = 0 then break;
+ end;
+ if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr
+ end
+ else
+ f:= stderr;
+{$ENDIF}
+{$I+}
+{$ENDIF}
+
+end;
+
+procedure freeModule;
+begin
+ recordFileName:= '';
+
+{$IFDEF DEBUGFILE}
+ writeln(f, 'halt at ', GameTicks, ' ticks. TurnTimeLeft = ', TurnTimeLeft);
+ flush(f);
+ close(f);
+{$ENDIF}
+end;
+
+end.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uVariables.pas Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,2250 @@
+{$INCLUDE options.inc}
+
+unit uVariables;
+interface
+
+uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uMobile;
+
+var
+/////// init flags ///////
+ cScreenWidth : LongInt = 1024;
+ cScreenHeight : LongInt = 768;
+ cBits : LongInt = 32;
+ //ipcPort is in uIO
+ cFullScreen : boolean = false;
+ isSoundEnabled : boolean = true;
+ isMusicEnabled : boolean = false;
+ cLocaleFName : shortstring = 'en.txt';
+ cInitVolume : LongInt = 100;
+ cTimerInterval : LongInt = 8;
+ PathPrefix : shortstring = './';
+ cShowFPS : boolean = false;
+ cAltDamage : boolean = true;
+ cReducedQuality : LongWord = rqNone;
+ //userNick is in uChat
+ recordFileName : shortstring = '';
+ cReadyDelay : Longword = 0;
+ cLogfileBase : shortstring = 'debug';
+//////////////////////////
+
+ isCursorVisible : boolean;
+ isTerminated : boolean;
+ isInLag : boolean;
+ isPaused : boolean;
+
+ isSEBackup : boolean;
+ isInMultiShoot : boolean;
+ isSpeed : boolean;
+ isFirstFrame : boolean;
+
+ fastUntilLag : boolean;
+
+ GameState : TGameState;
+ GameType : TGameType;
+ GameFlags : Longword;
+ TrainingFlags : Longword;
+ TurnTimeLeft : Longword;
+ ReadyTimeLeft : Longword;
+ cSuddenDTurns : LongInt;
+ cDamagePercent : LongInt;
+ cMineDudPercent : LongWord;
+ cTemplateFilter : LongInt;
+ cMapGen : LongInt;
+ cMazeSize : LongInt;
+ cRopePercent : LongWord;
+
+ cHedgehogTurnTime: Longword;
+ cMinesTime : LongInt;
+ cMaxAIThinkTime : Longword;
+
+ cHealthCaseProb : LongInt;
+ cHealthCaseAmount: LongInt;
+ cWaterRise : LongInt;
+ cHealthDecrease : LongInt;
+
+ cCloudsNumber : LongInt;
+
+ cTagsMask : byte;
+ zoom : GLfloat;
+ ZoomValue : GLfloat;
+
+ cWaterLine : LongInt;
+ cGearScrEdgesDist: LongInt;
+
+ GameTicks : LongWord;
+ TrainingTimeInc : Longword;
+ TrainingTimeInD : Longword;
+ TrainingTimeInM : Longword;
+ TrainingTimeMax : Longword;
+
+ TimeTrialStartTime: Longword;
+ TimeTrialStopTime : Longword;
+
+ // originally from uConsts
+ Pathz: array[TPathType] of shortstring;
+ CountTexz: array[1..Pred(AMMO_INFINITE)] of PTexture;
+ LAND_WIDTH : LongInt;
+ LAND_HEIGHT : LongInt;
+ LAND_WIDTH_MASK : LongWord;
+ LAND_HEIGHT_MASK : LongWord;
+ cMaxCaptions : LongInt;
+
+ cLeftScreenBorder : LongInt;
+ cRightScreenBorder : LongInt;
+ cScreenSpace : LongInt;
+
+ cCaseFactor : Longword;
+ cLandMines : Longword;
+ cExplosives : Longword;
+
+ cSeed : shortstring;
+ cVolumeDelta : LongInt;
+ cHasFocus : boolean;
+ cInactDelay : Longword;
+
+ bBetweenTurns : boolean;
+ bWaterRising : boolean;
+
+ ShowCrosshair : boolean;
+ CursorMovementX : LongInt;
+ CursorMovementY : LongInt;
+ cDrownSpeed : hwFloat;
+ cDrownSpeedf : real;
+ cMaxWindSpeed : hwFloat;
+ cWindSpeed : hwFloat;
+ cWindSpeedf : real;
+ cGravity : hwFloat;
+ cGravityf : real;
+ cDamageModifier : hwFloat;
+ cLaserSighting : boolean;
+ cVampiric : boolean;
+ cArtillery : boolean;
+ WeaponTooltipTex : PTexture;
+
+ flagMakeCapture : boolean;
+
+ InitStepsFlags : Longword;
+ RealTicks : Longword;
+ AttackBar : LongInt;
+
+ WaterColorArray : array[0..3] of HwColor4f;
+
+ CursorPoint : TPoint;
+ TargetPoint : TPoint;
+
+ ScreenFade : TScreenFade;
+ ScreenFadeValue : LongInt;
+ ScreenFadeSpeed : LongInt;
+
+{$IFDEF SDL13}
+ SDLwindow : PSDL_Window;
+{$ENDIF}
+
+ WorldDx: LongInt;
+ WorldDy: LongInt;
+
+const
+ cHHFileName = 'Hedgehog';
+ cCHFileName = 'Crosshair';
+ cThemeCFGFilename = 'theme.cfg';
+
+ FontBorder = 2;
+ cPathz: array[TPathType] of shortstring = (
+ '', // ptNone
+ '', // ptData
+ 'Graphics', // ptGraphics
+ 'Themes', // ptThemes
+ 'Themes/avematan', // ptCurrTheme
+ 'Teams', // ptTeams
+ 'Maps', // ptMaps
+ '', // ptMapCurrent
+ 'Demos', // ptDemos
+ 'Sounds', // ptSounds
+ 'Graphics/Graves', // ptGraves
+ 'Fonts', // ptFonts
+ 'Forts', // ptForts
+ 'Locale', // ptLocale
+ 'Graphics/AmmoMenu', // ptAmmoMenu
+ 'Graphics/Hedgehog', // ptHedgehog
+ 'Sounds/voices', // ptVoices
+ 'Graphics/Hats', // ptHats
+ 'Graphics/Flags', // ptFlags
+ 'Missions/Maps' // ptMissionMaps
+ );
+
+ cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13);
+ cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0);
+
+ Fontz: array[THWFont] of THHFont = (
+ (Handle: nil;
+ Height: 12;
+ style: TTF_STYLE_NORMAL;
+ Name: 'DejaVuSans-Bold.ttf'),
+ (Handle: nil;
+ Height: 24;
+ style: TTF_STYLE_NORMAL;
+ Name: 'DejaVuSans-Bold.ttf'),
+ (Handle: nil;
+ Height: 10;
+ style: TTF_STYLE_NORMAL;
+ Name: 'DejaVuSans-Bold.ttf')
+ {$IFNDEF IPHONEOS}, // remove chinese fonts for now
+ (Handle: nil;
+ Height: 12;
+ style: TTF_STYLE_NORMAL;
+ Name: 'wqy-zenhei.ttc'),
+ (Handle: nil;
+ Height: 24;
+ style: TTF_STYLE_NORMAL;
+ Name: 'wqy-zenhei.ttc'),
+ (Handle: nil;
+ Height: 10;
+ style: TTF_STYLE_NORMAL;
+ Name: 'wqy-zenhei.ttc')
+ {$ENDIF}
+ );
+
+ SpritesData: array[TSprite] of record
+ FileName: String[16];
+ Path, AltPath: TPathType;
+ Texture: PTexture;
+ Surface: PSDL_Surface;
+ Width, Height, imageWidth, imageHeight: LongInt;
+ saveSurf: boolean;
+ priority: GLfloat;
+ getDimensions, getImageDimensions: boolean;
+ end = (
+ (FileName: 'BlueWater'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: true; getImageDimensions: true),// sprWater
+ (FileName: 'Clouds'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 256; Height:128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprCloud
+ (FileName: 'Bomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBomb
+ (FileName: 'BigDigits'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBigDigit
+ (FileName: 'Frame'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 4; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprFrame
+ (FileName: 'Lag'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 65; Height: 65; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprLag
+ (FileName: 'Arrow'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCursor
+ (FileName:'BazookaShell'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBazookaShell
+ (FileName: 'Targetp'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTargetP
+ (FileName: 'Bee'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBee
+ (FileName: 'SmokeTrace'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSmokeTrace
+ (FileName: 'RopeHook'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprRopeHook
+ (FileName: 'Expl50'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplosion50
+ (FileName: 'MineOff'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMineOff
+ (FileName: 'MineOn'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMineOn
+ (FileName: 'MineDead'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMineDead
+ (FileName: 'Case'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprCase
+ (FileName: 'FirstAid'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprFAid
+ (FileName: 'dynamite'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprDynamite
+ (FileName: 'Power'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprPower
+ (FileName: 'ClBomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprClusterBomb
+ (FileName: 'ClParticle'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprClusterParticle
+ (FileName: 'Flame'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFlame
+ (FileName: 'horizont'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprHorizont
+ (FileName: 'horizontL'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprHorizont
+ (FileName: 'horizontR'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprHorizont
+ (FileName: 'Sky'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprSky
+ (FileName: 'SkyL'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprSky
+ (FileName: 'SkyR'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprSky
+ (FileName: 'BorderHorizontal'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 33; Height: 2; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprAMBorderHorizontal
+ (FileName: 'BorderVertical'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 2; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprAMBorderVertical
+ (FileName: 'Slot'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 33; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMSlot
+ (FileName: 'Ammos'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMAmmos
+ (FileName: 'SlotKeys'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMSlotKeys
+ (FileName: 'Corners'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 2; Height: 2; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMCorners
+ (FileName: 'Finger'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprFinger
+ (FileName: 'AirBomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAirBomb
+ (FileName: 'Airplane'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 254; Height: 101; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAirplane
+ (FileName: 'amAirplane'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAmAirplane
+ (FileName: 'amGirder'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 160; Height:160; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAmGirder
+ (FileName: 'hhMask'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHHTelepMask
+ (FileName: 'Switch'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSwitch
+ (FileName: 'Parachute'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprParachute
+ (FileName: 'Target'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTarget
+ (FileName: 'RopeNode'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 6; Height: 6; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprRopeNode
+ (FileName: 'thinking'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprQuestion
+ (FileName: 'PowerBar'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 256; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPowerBar
+ (FileName: 'WindBar'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 151; Height: 17; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindBar
+ (FileName: 'WindL'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindL
+ (FileName: 'WindR'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 80; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWindR
+ (FileName: 'Flake'; Path:ptCurrTheme; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFlake
+ (FileName: 'amRope'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandRope
+ (FileName: 'amBazooka'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBazooka
+ (FileName: 'amShotgun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandShotgun
+ (FileName: 'amDEagle'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandDEagle
+ (FileName:'amAirAttack'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandAirAttack
+ (FileName: 'amBaseball'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBaseball
+ (FileName: 'Hammer'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPHammer
+ (FileName: 'amBTorch_i'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBlowTorch
+ (FileName: 'amBTorch_w'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBlowTorch
+ (FileName: 'Teleport'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTeleport
+ (FileName: 'HHDeath'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprHHDeath
+ (FileName:'amShotgun_w'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprShotgun
+ (FileName: 'amDEagle_w'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprDEagle
+ (FileName: 'Idle'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprHHIdle
+ (FileName: 'Mortar'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMortar
+ (FileName: 'TurnsLeft'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTurnsLeft
+ (FileName: 'amKamikaze'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 256; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprKamikaze
+ (FileName: 'amWhip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWhip
+ (FileName: 'Kowtow'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprKowtow
+ (FileName: 'Sad'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprSad
+ (FileName: 'Wave'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprWave
+ (FileName: 'Hurrah'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprHurrah
+ (FileName:'ILoveLemonade';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprLemonade
+ (FileName: 'Shrug'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprShrug
+ (FileName: 'Juggle'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprJuggle
+ (FileName: 'ExplPart'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplPart
+ (FileName: 'ExplPart2'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplPart2
+ (FileName: 'Cake_walk'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCakeWalk
+ (FileName: 'Cake_down'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCakeDown
+ (FileName: 'Ammos_bw'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprAMAmmosBW
+ (FileName: 'Watermelon'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWatermelon
+ (FileName: 'EvilTrace'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprEvilTrace
+ (FileName:'HellishBomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHellishBomb
+ (FileName: 'Seduction'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSeduction
+ (FileName: 'HHDress'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprDress
+ (FileName: 'Censored'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprCensored
+ (FileName: 'Drill'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprDrill
+ (FileName: 'amDrill'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandDrill
+ (FileName: 'amBallgun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBallgun
+ (FileName: 'Balls'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 20; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprBalls
+ (FileName: 'RCPlane'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPlane
+ (FileName: 'amRCPlane'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandPlane
+ (FileName: 'Utility'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprUtility
+ (FileName:'Invulnerable';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprInvulnerable
+ (FileName: 'Vampiric'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprVampiric
+ (FileName: 'amGirder'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 512; Height:512; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprGirder
+ (FileName:'SpeechCorner';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 12; Height: 9; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprSpeechCorner
+ (FileName: 'SpeechEdge'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 25; Height: 9; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprSpeechEdge
+ (FileName: 'SpeechTail'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 25; Height: 26; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprSpeechTail
+ (FileName:'ThoughtCorner';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 49; Height: 37; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprThoughtCorner
+ (FileName:'ThoughtEdge'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 23; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprThoughtEdge
+ (FileName:'ThoughtTail'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 45; Height: 65; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprThoughtTail
+ (FileName:'ShoutCorner'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 34; Height: 23; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprShoutCorner
+ (FileName: 'ShoutEdge'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 30; Height: 20; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprShoutEdge
+ (FileName: 'ShoutTail'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 30; Height: 37; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLowest; getDimensions: false; getImageDimensions: true),// sprShoutTail
+ (FileName:'amSniperRifle';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSniperRifle
+ (FileName: 'Bubbles'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprBubbles
+ (FileName: 'amJetpack'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprJetpack
+ (FileName: 'Health'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprHealth
+ (FileName: 'amMolotov'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),//sprHandMolotov
+ (FileName: 'Molotov'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMolotov
+ (FileName: 'Smoke'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 22; Height: 22; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSmoke
+ (FileName: 'SmokeWhite'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 22; Height: 22; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSmokeWhite
+ (FileName: 'Shells'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprShell
+ (FileName: 'Dust'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 22; Height: 22; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprDust
+ (FileName: 'Explosives'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplosives
+ (FileName: 'ExplosivesRoll'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprExplosivesRoll
+ (FileName: 'amTeleport'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAmTeleport
+ (FileName: 'Splash'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 80; Height: 50; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSplash
+ (FileName: 'Droplet'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprDroplet
+ (FileName: 'Birdy'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 75; Height: 75; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBirdy
+ (FileName: 'amCake'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandCake
+ (FileName: 'amConstruction'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandConstruction
+ (FileName: 'amGrenade'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandGrenade
+ (FileName: 'amMelon'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandMelon
+ (FileName: 'amMortar'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandMortar
+ (FileName: 'amSkip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSkip
+ (FileName: 'amCluster'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandCluster
+ (FileName: 'amDynamite'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandDynamite
+ (FileName: 'amHellish'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandHellish
+ (FileName: 'amMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandMine
+ (FileName: 'amSeduction'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSeduction
+ (FileName: 'amVamp'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandVamp
+ (FileName: 'BigExplosion'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 385; Height: 385; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprBigExplosion
+ (FileName: 'SmokeRing'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 200; Height: 200; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSmokeRing
+ (FileName: 'BeeTrace'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprBeeTrace
+ (FileName: 'Egg'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprEgg
+ (FileName: 'TargetBee'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTargetBee
+ (FileName: 'amBee'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandBee
+ (FileName: 'Feather'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 15; Height: 25; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFeather
+ (FileName: 'Piano'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPiano
+ (FileName: 'amSineGun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSineGun
+ (FileName: 'amPortalGun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPortalGun
+ (FileName: 'Portal'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprPortal
+ (FileName: 'cheese'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCheese
+ (FileName: 'amCheese'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandCheese
+ (FileName: 'amFlamethrower'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandFlamethrower
+ (FileName: 'Chunk'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprChunk
+ (FileName: 'Note'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprNote
+ (FileName: 'SMineOff'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSMineOff
+ (FileName: 'SMineOn'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSMineOn
+ (FileName: 'amSMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSMine
+ (FileName: 'amHammer'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 128; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true), // sprWhip
+ (FileName: 'amResurrector'; Path: ptHedgehog; AltPath: ptNone;
+ Texture: nil; Surface: nil; Width: 32; Height: 32;
+ imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
+ tpMedium; getDimensions: false; getImageDimensions: true),
+ //sprHandResurrector
+ (FileName: 'Cross'; Path: ptGraphics; altPath: ptNone;
+ Texture: nil; Surface: nil; Width: 108; Height: 138;
+ imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
+ tpMedium; getDimensions: false; getImageDimensions: true),
+ //sprCross
+ (FileName: 'AirDrill'; Path: ptGraphics; AltPath: ptNone;
+ Texture: nil; Surface: nil; Width: 16; Height: 16;
+ imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
+ tpMedium; getDimensions: false; getImageDimensions: true),
+ // sprAirDrill
+ (FileName: 'NapalmBomb'; Path: ptGraphics; AltPath: ptNone;
+ Texture: nil; Surface: nil; Width: 16; Height: 16;
+ imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
+ tpMedium; getDimensions: false; getImageDimensions: true),
+ // sprNapalmBomb
+ (FileName: 'BulletHit'; Path: ptGraphics; AltPath: ptNone;
+ Texture: nil; Surface: nil; Width: 32; Height: 32;
+ imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
+ tpMedium; getDimensions: false; getImageDimensions: true)
+ // sprNapalmBomb
+ );
+
+
+ Wavez: array [TWave] of record
+ Sprite: TSprite;
+ FramesCount: Longword;
+ Interval: Longword;
+ cmd: String[20];
+ Voice: TSound;
+ VoiceDelay: LongWord;
+ end = (
+ (Sprite: sprKowtow; FramesCount: 12; Interval: 125; cmd: '/rollup'; Voice: sndNone; VoiceDelay: 0),
+ (Sprite: sprSad; FramesCount: 14; Interval: 125; cmd: '/sad'; Voice: sndNone; VoiceDelay: 0),
+ (Sprite: sprWave; FramesCount: 16; Interval: 125; cmd: '/wave'; Voice: sndHello; VoiceDelay: 5),
+ (Sprite: sprHurrah; FramesCount: 14; Interval: 125; cmd: '/hurrah'; Voice: sndNone; VoiceDelay: 0),
+ (Sprite: sprLemonade; FramesCount: 24; Interval: 125; cmd: '/ilovelotsoflemonade'; Voice: sndNone; VoiceDelay: 0),
+ (Sprite: sprShrug; FramesCount: 24; Interval: 125; cmd: '/shrug'; Voice: sndNone; VoiceDelay: 0),
+ (Sprite: sprJuggle; FramesCount: 49; Interval: 38; cmd: '/juggle'; Voice: sndNone; VoiceDelay: 0)
+ );
+
+ Soundz: array[TSound] of record
+ FileName: String[25];
+ Path : TPathType;
+ end = (
+ (FileName: ''; Path: ptNone ),// sndNone
+ (FileName: 'grenadeimpact.ogg'; Path: ptSounds),// sndGrenadeImpact
+ (FileName: 'explosion.ogg'; Path: ptSounds),// sndExplosion
+ (FileName: 'throwpowerup.ogg'; Path: ptSounds),// sndThrowPowerUp
+ (FileName: 'throwrelease.ogg'; Path: ptSounds),// sndThrowRelease
+ (FileName: 'splash.ogg'; Path: ptSounds),// sndSplash
+ (FileName: 'shotgunreload.ogg'; Path: ptSounds),// sndShotgunReload
+ (FileName: 'shotgunfire.ogg'; Path: ptSounds),// sndShotgunFire
+ (FileName: 'graveimpact.ogg'; Path: ptSounds),// sndGraveImpact
+ (FileName: 'minetick.ogg'; Path: ptSounds),// sndMineTicks
+ (FileName: 'pickhammer.ogg'; Path: ptSounds),// sndPickhammer
+ (FileName: 'gun.ogg'; Path: ptSounds),// sndGun
+ (FileName: 'bee.ogg'; Path: ptSounds),// sndBee
+ (FileName: 'Jump1.ogg'; Path: ptVoices),// sndJump1
+ (FileName: 'Jump2.ogg'; Path: ptVoices),// sndJump2
+ (FileName: 'Jump3.ogg'; Path: ptVoices),// sndJump3
+ (FileName: 'Yessir.ogg'; Path: ptVoices),// sndYesSir
+ (FileName: 'Laugh.ogg'; Path: ptVoices),// sndLaugh
+ (FileName: 'Illgetyou.ogg'; Path: ptVoices),// sndIllGetYou
+ (FileName: 'Incoming.ogg'; Path: ptVoices),// sndIncoming
+ (FileName: 'Missed.ogg'; Path: ptVoices),// sndMissed
+ (FileName: 'Stupid.ogg'; Path: ptVoices),// sndStupid
+ (FileName: 'Firstblood.ogg'; Path: ptVoices),// sndFirstBlood
+ (FileName: 'Boring.ogg'; Path: ptVoices),// sndBoring
+ (FileName: 'Byebye.ogg'; Path: ptVoices),// sndByeBye
+ (FileName: 'Sameteam.ogg'; Path: ptVoices),// sndSameTeam
+ (FileName: 'Nutter.ogg'; Path: ptVoices),// sndNutter
+ (FileName: 'Reinforcements.ogg'; Path: ptVoices),// sndReinforce
+ (FileName: 'Traitor.ogg'; Path: ptVoices),// sndTraitor
+ (FileName: 'Youllregretthat.ogg'; Path: ptVoices),// sndRegret
+ (FileName: 'Enemydown.ogg'; Path: ptVoices),// sndEnemyDown
+ (FileName: 'Coward.ogg'; Path: ptVoices),// sndCoward
+ (FileName: 'Hurry.ogg'; Path: ptVoices),// sndHurry
+ (FileName: 'Watchit.ogg'; Path: ptVoices),// sndWatchIt
+ (FileName: 'Kamikaze.ogg'; Path: ptVoices),// sndKamikaze
+ (FileName: 'cake2.ogg'; Path: ptSounds),// sndCake
+ (FileName: 'Ow1.ogg'; Path: ptVoices),// sndOw1
+ (FileName: 'Ow2.ogg'; Path: ptVoices),// sndOw2
+ (FileName: 'Ow3.ogg'; Path: ptVoices),// sndOw3
+ (FileName: 'Ow4.ogg'; Path: ptVoices),// sndOw4
+ (FileName: 'Firepunch1.ogg'; Path: ptVoices),// sndFirepunch1
+ (FileName: 'Firepunch2.ogg'; Path: ptVoices),// sndFirepunch2
+ (FileName: 'Firepunch3.ogg'; Path: ptVoices),// sndFirepunch3
+ (FileName: 'Firepunch4.ogg'; Path: ptVoices),// sndFirepunch4
+ (FileName: 'Firepunch5.ogg'; Path: ptVoices),// sndFirepunch5
+ (FileName: 'Firepunch6.ogg'; Path: ptVoices),// sndFirepunch6
+ (FileName: 'Melon.ogg'; Path: ptVoices),// sndMelon
+ (FileName: 'Hellish.ogg'; Path: ptSounds),// sndHellish
+ (FileName: 'Yoohoo.ogg'; Path: ptSounds),// sndYoohoo
+ (FileName: 'rcplane.ogg'; Path: ptSounds),// sndRCPlane
+ (FileName: 'whipcrack.ogg'; Path: ptSounds),// sndWhipCrack
+ (FileName:'ride_of_the_valkyries.ogg'; Path: ptSounds),// sndRideOfTheValkyries
+ (FileName: 'denied.ogg'; Path: ptSounds),// sndDenied
+ (FileName: 'placed.ogg'; Path: ptSounds),// sndPlaced
+ (FileName: 'baseballbat.ogg'; Path: ptSounds),// sndBaseballBat
+ (FileName: 'steam.ogg'; Path: ptSounds),// sndVaporize
+ (FileName: 'warp.ogg'; Path: ptSounds),// sndWarp
+ (FileName: 'suddendeath.ogg'; Path: ptSounds),// sndSuddenDeath
+ (FileName: 'mortar.ogg'; Path: ptSounds),// sndMortar
+ (FileName: 'shutterclick.ogg'; Path: ptSounds),// sndShutter
+ (FileName: 'homerun.ogg'; Path: ptSounds),// sndHomerun
+ (FileName: 'molotov.ogg'; Path: ptSounds),// sndMolotov
+ (FileName: 'Takecover.ogg'; Path: ptVoices),// sndCover
+ (FileName: 'Uh-oh.ogg'; Path: ptVoices),// sndUhOh
+ (FileName: 'Oops.ogg'; Path: ptVoices),// sndOops
+ (FileName: 'Nooo.ogg'; Path: ptVoices),// sndNooo
+ (FileName: 'Hello.ogg'; Path: ptVoices),// sndHello
+ (FileName: 'ropeshot.ogg'; Path: ptSounds),// sndRopeShot
+ (FileName: 'ropeattach.ogg'; Path: ptSounds),// sndRopeAttach
+ (FileName: 'roperelease.ogg'; Path: ptSounds),// sndRopeRelease
+ (FileName: 'switchhog.ogg'; Path: ptSounds),// sndSwitchHog
+ (FileName: 'victory.ogg'; Path: ptVoices),// sndVictory
+ (FileName: 'sniperreload.ogg'; Path: ptSounds),// sndSniperReload
+ (FileName: 'steps.ogg'; Path: ptSounds),// sndSteps
+ (FileName: 'lowgravity.ogg'; Path: ptSounds),// sndLowGravity
+ (FileName: 'hell_growl.ogg'; Path: ptSounds),// sndHellishImpact1
+ (FileName: 'hell_ooff.ogg'; Path: ptSounds),// sndHellishImpact2
+ (FileName: 'hell_ow.ogg'; Path: ptSounds),// sndHellishImpact3
+ (FileName: 'hell_ugh.ogg'; Path: ptSounds),// sndHellishImpact4
+ (FileName: 'melonimpact.ogg'; Path: ptSounds),// sndMelonImpact
+ (FileName: 'Droplet1.ogg'; Path: ptSounds),// sndDroplet1
+ (FileName: 'Droplet2.ogg'; Path: ptSounds),// sndDroplet2
+ (FileName: 'Droplet3.ogg'; Path: ptSounds),// sndDroplet3
+ (FileName: 'egg.ogg'; Path: ptSounds),// sndEggBreak
+ (FileName: 'drillgun.ogg'; Path: ptSounds),// sndDrillRocket
+ (FileName: 'PoisonCough.ogg'; Path: ptVoices),// sndPoisonCough
+ (FileName: 'PoisonMoan.ogg'; Path: ptVoices),// sndPoisonMoan
+ (FileName: 'BirdyLay.ogg'; Path: ptSounds),// sndBirdyLay
+ (FileName: 'Whistle.ogg'; Path: ptSounds),// sndWhistle
+ (FileName: 'beewater.ogg'; Path: ptSounds),// sndBeeWater
+ (FileName: '1C.ogg'; Path: ptSounds),// sndPiano0
+ (FileName: '2D.ogg'; Path: ptSounds),// sndPiano1
+ (FileName: '3E.ogg'; Path: ptSounds),// sndPiano2
+ (FileName: '4F.ogg'; Path: ptSounds),// sndPiano3
+ (FileName: '5G.ogg'; Path: ptSounds),// sndPiano4
+ (FileName: '6A.ogg'; Path: ptSounds),// sndPiano5
+ (FileName: '7B.ogg'; Path: ptSounds),// sndPiano6
+ (FileName: '8C.ogg'; Path: ptSounds),// sndPiano7
+ (FileName: '9D.ogg'; Path: ptSounds),// sndPiano8
+ (FileName: 'skip.ogg'; Path: ptSounds),// sndSkip
+ (FileName: 'shotgunfire.ogg'; Path: ptSounds),// sndSineGun
+ (FileName: 'Ooff1.ogg'; Path: ptVoices),// sndOoff1
+ (FileName: 'Ooff2.ogg'; Path: ptVoices),// sndOoff2
+ (FileName: 'Ooff3.ogg'; Path: ptVoices),// sndOoff3
+ (FileName: 'whipcrack.ogg'; Path: ptSounds),// sndWhack
+ (FileName: 'Comeonthen.ogg'; Path: ptVoices),// sndComeonthen
+ (FileName: 'parachute.ogg'; Path: ptSounds),// sndParachute
+ (FileName: 'bump.ogg'; Path: ptSounds),// sndBump
+ (FileName: 'hogchant3.ogg'; Path: ptSounds) // sndResurrector
+ );
+
+ Ammoz: array [TAmmoType] of record
+ NameId: TAmmoStrId;
+ NameTex: PTexture;
+ Probability, NumberInCase: Longword;
+ Ammo: TAmmo;
+ Slot: 0..cMaxSlotIndex;
+ TimeAfterTurn: Longword;
+ minAngle, maxAngle: Longword;
+ isDamaging: boolean;
+ SkipTurns: Longword;
+ PosCount: Longword;
+ PosSprite: TSprite;
+ ejectX, ejectY: Longint;
+ end = (
+ (NameId: sidNothing;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 0;
+ Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_DontHold or ammoprop_Effect;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amNothing;
+ AttackVoice: sndNone);
+ Slot: 0;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 9999;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Grenade
+ (NameId: sidGrenade;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 3000;
+ Pos: 0;
+ AmmoType: amGrenade;
+ AttackVoice: sndCover);
+ Slot: 1;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// ClusterBomb
+ (NameId: sidClusterBomb;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 3;
+ Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse;
+ Count: 5;
+ NumPerTurn: 0;
+ Timer: 3000;
+ Pos: 0;
+ AmmoType: amClusterBomb;
+ AttackVoice: sndCover);
+ Slot: 1;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Bazooka
+ (NameId: sidBazooka;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_Power or ammoprop_AltUse;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amBazooka;
+ AttackVoice: sndNone);
+ Slot: 0;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0; //20;
+ ejectY: -6),
+
+// Bee
+ (NameId: sidBee;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_Power or ammoprop_NeedTarget or ammoprop_DontHold;
+ Count: 2;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amBee;
+ AttackVoice: sndNone);
+ Slot: 0;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0; //16;
+ ejectY: 0),
+
+// Shotgun
+ (NameId: sidShotgun;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 1;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amShotgun;
+ AttackVoice: sndNone);
+ Slot: 2;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0; //26;
+ ejectY: -6),
+
+// PickHammer
+ (NameId: sidPickHammer;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_AttackInMove or ammoprop_NoCrosshair or ammoprop_DontHold;
+ Count: 2;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amPickHammer;
+ AttackVoice: sndNone);
+ Slot: 6;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Skip
+ (NameId: sidSkip;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_DontHold;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amSkip;
+ AttackVoice: sndNone);
+ Slot: 9;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Rope
+ (NameId: sidRope;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 3;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_ForwMsgs or
+ ammoprop_AttackInMove or
+ ammoprop_Utility or
+ ammoprop_AltAttack;
+ Count: 5;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amRope;
+ AttackVoice: sndNone);
+ Slot: 7;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: cMaxAngle div 2;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Mine
+ (NameId: sidMine;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_AttackInMove or ammoprop_DontHold or ammoprop_AltUse;
+ Count: 2;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amMine;
+ AttackVoice: sndLaugh);
+ Slot: 4;
+ TimeAfterTurn: 5000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// DEagle
+ (NameId: sidDEagle;
+ NameTex: nil;
+ Probability: 20;
+ NumberInCase: 2;
+ Ammo: (Propz: 0;
+ Count: 3;
+ NumPerTurn: 3;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amDEagle;
+ AttackVoice: sndNone);
+ Slot: 2;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0; //23;
+ ejectY: -6),
+
+// Dynamite
+ (NameId: sidDynamite;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_AttackInMove or ammoprop_DontHold or ammoprop_AltUse;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amDynamite;
+ AttackVoice: sndLaugh);
+ Slot: 4;
+ TimeAfterTurn: 5000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// FirePunch
+ (NameId: sidFirePunch;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_ForwMsgs or ammoprop_AttackInMove;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amFirePunch;
+ AttackVoice: sndNone);
+ Slot: 3;
+ TimeAfterTurn: 3000;
+ MinAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Whip
+ (NameId: sidWhip;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amWhip;
+ AttackVoice: sndNone);
+ Slot: 3;
+ TimeAfterTurn: 3000;
+ MinAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// BaseballBat
+ (NameId: sidBaseballBat;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_DontHold;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amBaseballBat;
+ AttackVoice: sndNone);
+ Slot: 3;
+ TimeAfterTurn: 5000;
+ minAngle: 0;
+ maxAngle: cMaxAngle div 2;
+ isDamaging: true;
+ SkipTurns: 2;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Parachute
+ (NameId: sidParachute;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_ForwMsgs or
+ ammoprop_AttackInMove or
+ ammoprop_NoCrosshair or
+ ammoprop_DontHold or
+ ammoprop_Utility or
+ ammoprop_AltAttack;
+ Count: 2;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amParachute;
+ AttackVoice: sndNone);
+ Slot: 7;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// AirAttack
+ (NameId: sidAirAttack;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or
+ ammoprop_NeedTarget or
+ ammoprop_AttackingPut or
+ ammoprop_DontHold or
+ ammoprop_NotBorder;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amAirAttack;
+ AttackVoice: sndIncoming);
+ Slot: 5;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 5;
+ PosCount: 2;
+ PosSprite: sprAmAirplane;
+ ejectX: 0;
+ ejectY: 0),
+
+// MineStrike
+ (NameId: sidMineStrike;
+ NameTex: nil;
+ Probability: 200;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or
+ ammoprop_NeedTarget or
+ ammoprop_AttackingPut or
+ ammoprop_DontHold or
+ ammoprop_NotBorder;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amMineStrike;
+ AttackVoice: sndIncoming);
+ Slot: 5;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 5;
+ PosCount: 2;
+ PosSprite: sprAmAirplane;
+ ejectX: 0;
+ ejectY: 0),
+
+// BlowTorch
+ (NameId: sidBlowTorch;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 2;
+ Ammo: (Propz: ammoprop_ForwMsgs;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amBlowTorch;
+ AttackVoice: sndNone);
+ Slot: 6;
+ TimeAfterTurn: 3000;
+ minAngle: 768;
+ maxAngle: 1280;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Girder
+ (NameId: sidGirder;
+ NameTex: nil;
+ Probability: 150;
+ NumberInCase: 3;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_NoCrosshair or
+ ammoprop_NeedTarget or
+ ammoprop_Utility or
+ ammoprop_AttackingPut;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amGirder;
+ AttackVoice: sndNone);
+ Slot: 6;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 8;
+ PosSprite: sprAmGirder;
+ ejectX: 0;
+ ejectY: 0),
+
+// Teleport
+ (NameId: sidTeleport;
+ NameTex: nil;
+ Probability: 200;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs or
+ ammoprop_NoCrosshair or
+ ammoprop_NeedTarget or
+ ammoprop_AttackingPut or
+ ammoprop_Utility or
+ ammoprop_DontHold;
+ Count: 2;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amTeleport;
+ AttackVoice: sndNone);
+ Slot: 7;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 2;
+ PosSprite: sprAmTeleport;
+ ejectX: 0;
+ ejectY: 0),
+
+// Switch
+ (NameId: sidSwitch;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_ForwMsgs or
+ ammoprop_NoCrosshair or
+ ammoprop_Utility or
+ ammoprop_DontHold;
+ Count: 3;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amSwitch;
+ AttackVoice: sndNone);
+ Slot: 9;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Mortar
+ (NameId: sidMortar;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 4;
+ Ammo: (Propz: 0;
+ Count: 4;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amMortar;
+ AttackVoice: sndNone);
+ Slot: 0;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0; //20;
+ ejectY: -6),
+
+// Kamikaze
+ (NameId: sidKamikaze;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold or ammoprop_AttackInMove;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amKamikaze;
+ AttackVoice: sndNone);
+ Slot: 3;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Cake
+ (NameId: sidCake;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_NoCrosshair or ammoprop_DontHold;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amCake;
+ AttackVoice: sndLaugh);
+ Slot: 4;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 4;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Seduction
+ (NameId: sidSeduction;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amSeduction;
+ AttackVoice: sndNone);
+ Slot: 3;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Watermelon
+ (NameId: sidWatermelon;
+ NameTex: nil;
+ Probability: 400;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse;
+ Count: 0;
+ NumPerTurn: 0;
+ Timer: 3000;
+ Pos: 0;
+ AmmoType: amWatermelon;
+ AttackVoice: sndMelon);
+ Slot: 1;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// HellishBomb ("Hellish Hand-Grenade")
+ (NameId: sidHellishBomb;
+ NameTex: nil;
+ Probability: 400;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_Power or ammoprop_AltUse;
+ Count: 0;
+ NumPerTurn: 0;
+ Timer: 5000;
+ Pos: 0;
+ AmmoType: amHellishBomb;
+ AttackVoice: sndNone);
+ Slot: 1;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Napalm
+ (NameId: sidNapalm;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or
+ ammoprop_NeedTarget or
+ ammoprop_AttackingPut or
+ ammoprop_DontHold or
+ ammoprop_NotBorder;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amNapalm;
+ AttackVoice: sndIncoming);
+ Slot: 5;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 7;
+ PosCount: 2;
+ PosSprite: sprAmAirplane;
+ ejectX: 0;
+ ejectY: 0),
+
+// Drill ("Drill Rocket")
+ (NameId: sidDrill;
+ NameTex: nil;
+ Probability: 300;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_Power or ammoprop_AltUse;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amDrill;
+ AttackVoice: sndNone);
+ Slot: 0;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprDrill;
+ ejectX: 0; //20;
+ ejectY: -6),
+
+// Ballgun
+ (NameId: sidBallgun;
+ NameTex: nil;
+ Probability: 400;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 5001;
+ Pos: 0;
+ AmmoType: amBallgun;
+ AttackVoice: sndNone);
+ Slot: 4;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0; //20;
+ ejectY: -3),
+
+// RC-Plane
+ (NameId: sidRCPlane;
+ NameTex: nil;
+ Probability: 200;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs{ or
+ ammoprop_DontHold or
+ ammoprop_AltAttack};
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amRCPlane;
+ AttackVoice: sndNone);
+ Slot: 4;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 4;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// LowGravity
+ (NameId: sidLowGravity;
+ NameTex: nil;
+ Probability: 20;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_NoCrosshair or
+ ammoprop_DontHold or
+ ammoprop_AltUse or
+ ammoprop_Utility or
+ ammoprop_Effect;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amLowGravity;
+ AttackVoice: sndNone);
+ Slot: 9;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// ExtraDamage
+ (NameId: sidExtraDamage;
+ NameTex: nil;
+ Probability: 15;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_NoCrosshair or
+ ammoprop_DontHold or
+ ammoprop_AltUse or
+ ammoprop_Utility or
+ ammoprop_Effect;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amExtraDamage;
+ AttackVoice: sndNone);
+ Slot: 9;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Invulnerable
+ (NameId: sidInvulnerable;
+ NameTex: nil;
+ Probability: 20;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_NoCrosshair or
+ ammoprop_DontHold or
+ ammoprop_AltUse or
+ ammoprop_Utility or
+ ammoprop_Effect;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amInvulnerable;
+ AttackVoice: sndNone);
+ Slot: 8;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// ExtraTime
+ (NameId: sidExtraTime;
+ NameTex: nil;
+ Probability: 30;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_NoCrosshair or
+ ammoprop_DontHold or
+ ammoprop_AltUse or
+ ammoprop_Utility or
+ ammoprop_Effect;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amExtraTime;
+ AttackVoice: sndNone);
+ Slot: 9;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// LaserSight
+ (NameId: sidLaserSight;
+ NameTex: nil;
+ Probability: 15;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_NoCrosshair or
+ ammoprop_DontHold or
+ ammoprop_AltUse or
+ ammoprop_Utility or
+ ammoprop_Effect;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amLaserSight;
+ AttackVoice: sndNone);
+ Slot: 8;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Vampiric
+ (NameId: sidVampiric;
+ NameTex: nil;
+ Probability: 15;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_NoCrosshair or
+ ammoprop_DontHold or
+ ammoprop_AltUse or
+ ammoprop_Utility or
+ ammoprop_Effect;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amVampiric;
+ AttackVoice: sndNone);
+ Slot: 8;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// SniperRifle
+ (NameId: sidSniperRifle;
+ NameTex: nil;
+ Probability: 20;
+ NumberInCase: 2;
+ Ammo: (Propz: 0;
+ Count: 2;
+ NumPerTurn: 1;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amSniperRifle;
+ AttackVoice: sndNone);
+ Slot: 2;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0; //40;
+ ejectY: -5),
+
+// Jetpack ("Flying Saucer")
+ (NameId: sidJetpack;
+ NameTex: nil;
+ Probability: 20;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_ForwMsgs or
+ ammoprop_AttackInMove or
+ ammoprop_NoCrosshair or
+ ammoprop_DontHold or
+ ammoprop_Utility or
+ ammoprop_AltAttack;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amJetpack;
+ AttackVoice: sndNone);
+ Slot: 7;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Molotov
+ (NameId: sidMolotov;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_Power or ammoprop_AltUse;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 3000;
+ Pos: 0;
+ AmmoType: amMolotov;
+ AttackVoice: sndNone);
+ Slot: 1;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Birdy
+ (NameId: sidBirdy;
+ NameTex: nil;
+ Probability: 20;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs or
+ ammoprop_NoCrosshair or
+ ammoprop_DontHold;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amBirdy;
+ AttackVoice: sndNone);
+ Slot: 7;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// PortalGun
+ (NameId: sidPortalGun;
+ NameTex: nil;
+ Probability: 20;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoRoundEnd or
+ ammoprop_AttackInMove or
+ ammoprop_DontHold or
+ ammoprop_Utility;
+ Count: 1;
+ NumPerTurn: 3;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amPortalGun;
+ AttackVoice: sndNone);
+ Slot: 6;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: false;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: -5; //29;
+ ejectY: -7),
+
+// Piano
+ (NameId: sidPiano;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or
+ ammoprop_NeedTarget or
+ ammoprop_AttackingPut or
+ ammoprop_DontHold or
+ ammoprop_NotBorder;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amPiano;
+ AttackVoice: sndIncoming);
+ Slot: 5;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 7;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// GasBomb
+ (NameId: sidGasBomb;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse;
+ Count: AMMO_INFINITE;
+ NumPerTurn: 0;
+ Timer: 3000;
+ Pos: 0;
+ AmmoType: amGasBomb;
+ AttackVoice: sndCover);
+ Slot: 1;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// SineGun
+ (NameId: sidSineGun;
+ NameTex: nil;
+ Probability: 20;
+ NumberInCase: 2;
+ Ammo: (Propz: ammoprop_AttackInMove;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amSineGun;
+ AttackVoice: sndNone);
+ Slot: 2;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Flamethrower
+ (NameId: sidFlamethrower;
+ NameTex: nil;
+ Probability: 20;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 5001;
+ Pos: 0;
+ AmmoType: amFlamethrower;
+ AttackVoice: sndNone);
+ Slot: 2;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0; //20;
+ ejectY: -3),
+
+// Sticky Mine
+ (NameId: sidSMine;
+ NameTex: nil;
+ Probability: 100;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_Power; //FIXME: enable multishoot at altuse, until then removed ammoprop_AltUse
+ Count: 1;
+ NumPerTurn: 1;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amSMine;
+ AttackVoice: sndLaugh);
+ Slot: 4;
+ TimeAfterTurn: 5000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Hammer
+ (NameId: sidHammer;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amHammer;
+ AttackVoice: sndNone);
+ Slot: 3;
+ TimeAfterTurn: 1000;
+ MinAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// Ressurrector
+ (NameId: sidResurrector;
+ NameTex: nil;
+ Probability: 0;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or
+ ammoprop_Utility or
+ ammoprop_NoRoundEnd;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amResurrector;
+ AttackVoice: sndNone);
+ Slot: 8;
+ TimeAfterTurn: 3000;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 0;
+ PosCount: 1;
+ PosSprite: sprWater;
+ ejectX: 0;
+ ejectY: 0),
+
+// DrillStrike
+ (NameId: sidDrillStrike;
+ NameTex: nil;
+ Probability: 200;
+ NumberInCase: 1;
+ Ammo: (Propz: ammoprop_NoCrosshair or
+ ammoprop_NeedTarget or
+ ammoprop_AttackingPut or
+ ammoprop_DontHold or
+ ammoprop_NotBorder;
+ Count: 1;
+ NumPerTurn: 0;
+ Timer: 0;
+ Pos: 0;
+ AmmoType: amDrillStrike;
+ AttackVoice: sndIncoming);
+ Slot: 5;
+ TimeAfterTurn: 0;
+ minAngle: 0;
+ maxAngle: 0;
+ isDamaging: true;
+ SkipTurns: 6;
+ PosCount: 2;
+ PosSprite: sprAmAirplane;
+ ejectX: 0;
+ ejectY: 0)
+ );
+
+
+
+ conversionFormat: TSDL_PixelFormat = (
+ palette: nil;
+ BitsPerPixel : 32;
+ BytesPerPixel: 4;
+ Rloss : 0;
+ Gloss : 0;
+ Bloss : 0;
+ Aloss : 0;
+{$IFDEF ENDIAN_LITTLE}
+ Rshift: 0;
+ Gshift: 8;
+ Bshift: 16;
+ Ashift: 24;
+{$ELSE}
+ Rshift: 24;
+ Gshift: 16;
+ Bshift: 8;
+ Ashift: 0;
+{$ENDIF}
+ RMask : RMask;
+ GMask : GMask;
+ BMask : BMask;
+ AMask : AMask;
+ colorkey: 0;
+ alpha : 255
+ );
+
+
+var
+ Land: TCollisionArray;
+ LandPixels: TLandArray;
+ LandDirty: TDirtyTag;
+ hasBorder: boolean;
+ hasGirders: boolean;
+ isMap: boolean;
+ playHeight, playWidth, leftX, rightX, topY, MaxHedgehogs: Longword; // idea is that a template can specify height/width. Or, a map, a height/width by the dimensions of the image. If the map has pixels near top of image, it triggers border.
+ LandBackSurface: PSDL_Surface;
+ digest: shortstring;
+ CurAmmoGear: PGear;
+ GearsList: PGear;
+ AllInactive: boolean;
+ PrvInactive: boolean;
+ KilledHHs: Longword;
+ SuddenDeathDmg: Boolean;
+ SpeechType: Longword;
+ SpeechText: shortstring;
+ TrainingTargetGear: PGear;
+ skipFlag: boolean;
+ PlacingHogs: boolean; // a convenience flag to indicate placement of hogs is still in progress
+ StepSoundTimer: LongInt;
+ StepSoundChannel: LongInt;
+
+ CurrentTeam: PTeam;
+ PreviousTeam: PTeam;
+ CurrentHedgehog: PHedgehog;
+ TeamsArray: array[0..Pred(cMaxTeams)] of PTeam;
+ TeamsCount: Longword;
+ ClansArray: array[0..Pred(cMaxTeams)] of PClan;
+ ClansCount: Longword;
+ LocalClan: LongInt; // last non-bot, non-extdriven clan
+ LocalAmmo: LongInt; // last non-bot, non-extdriven clan's first team's ammo index
+ CurMinAngle, CurMaxAngle: Longword;
+ GameOver: boolean;
+
+ FollowGear: PGear;
+ WindBarWidth: LongInt;
+ bShowAmmoMenu: boolean;
+ bSelected: boolean;
+ bShowFinger: boolean;
+ Frames: Longword;
+ WaterColor, DeepWaterColor: TSDL_Color;
+ SkyOffset: LongInt;
+ HorizontOffset: LongInt;
+{$IFDEF COUNTTICKS}
+ cntTicks: LongWord;
+{$ENDIF}
+ cOffsetY: LongInt;
+
+ PixelFormat: PSDL_PixelFormat;
+ SDLPrimSurface: PSDL_Surface;
+ PauseTexture,
+ SyncTexture,
+ ConfirmTexture: PTexture;
+ cScaleFactor: GLfloat;
+ SupportNPOTT: Boolean;
+ Step: LongInt;
+ squaresize : LongInt;
+ numsquares : LongInt;
+ ProgrTex: PTexture;
+ MissionIcons: PSDL_Surface;
+ ropeIconTex: PTexture;
+ rotationQt: GLfloat;
+
+
+ VisualGearsList: PVisualGear;
+ vobFrameTicks, vobFramesCount, vobCount: Longword;
+ vobVelocity, vobFallSpeed: LongInt;
+
+
+ hideAmmoMenu: boolean;
+ wheelUp: boolean;
+ wheelDown: boolean;
+
+ ControllerNumControllers: Integer;
+ ControllerEnabled: Integer;
+ ControllerNumAxes: array[0..5] of Integer;
+ //ControllerNumBalls: array[0..5] of Integer;
+ ControllerNumHats: array[0..5] of Integer;
+ ControllerNumButtons: array[0..5] of Integer;
+ ControllerAxes: array[0..5] of array[0..19] of Integer;
+ //ControllerBalls: array[0..5] of array[0..19] of array[0..1] of Integer;
+ ControllerHats: array[0..5] of array[0..19] of Byte;
+ ControllerButtons: array[0..5] of array[0..19] of Byte;
+
+ DefaultBinds, CurrentBinds: TBinds;
+
+ coeff: LongInt;
+{$IFDEF HWLIBRARY}
+ leftClick: boolean;
+ middleClick: boolean;
+ rightClick: boolean;
+
+ upKey: boolean;
+ downKey: boolean;
+ rightKey: boolean;
+ leftKey: boolean;
+ preciseKey: boolean;
+
+ backspaceKey: boolean;
+ spaceKey: boolean;
+ enterKey: boolean;
+ tabKey: boolean;
+
+ chatAction: boolean;
+ pauseAction: boolean;
+{$ENDIF}
+
+var trammo: array[TAmmoStrId] of ansistring; // name of the weapon
+ trammoc: array[TAmmoStrId] of ansistring; // caption of the weapon
+ trammod: array[TAmmoStrId] of ansistring; // description of the weapon
+ trmsg: array[TMsgStrId] of ansistring; // message of the event
+ trgoal: array[TGoalStrId] of ansistring; // message of the goal
+
+
+procedure initModule;
+procedure freeModule;
+
+implementation
+
+
+procedure initModule;
+begin
+ Pathz:= cPathz;
+ {* REFERENCE
+ 4096 -> $FFFFF000
+ 2048 -> $FFFFF800
+ 1024 -> $FFFFFC00
+ 512 -> $FFFFFE00 *}
+ if (cReducedQuality and rqLowRes) <> 0 then
+ begin
+ LAND_WIDTH:= 2048;
+ LAND_HEIGHT:= 1024;
+ LAND_WIDTH_MASK:= $FFFFF800;
+ LAND_HEIGHT_MASK:= $FFFFFC00;
+ end
+ else
+ begin
+ LAND_WIDTH:= 4096;
+ LAND_HEIGHT:= 2048;
+ LAND_WIDTH_MASK:= $FFFFF000;
+ LAND_HEIGHT_MASK:= $FFFFF800
+ end;
+
+ cDrownSpeed.QWordValue := 257698038; // 0.06
+ cDrownSpeedf := 0.06;
+ cMaxWindSpeed.QWordValue:= 1073742; // 0.00025
+ cWindSpeed.QWordValue := 429496; // 0.0001
+ cWindSpeedf := 0.0001;
+ cGravity := cMaxWindSpeed * 2;
+ cGravityf := 0.00025 * 2;
+ cDamageModifier := _1;
+ TargetPoint := cTargetPointRef;
+
+ // int, longint longword and byte
+ CursorMovementX := 0;
+ CursorMovementY := 0;
+ GameTicks := 0;
+ TrainingTimeInc := 10000;
+ TrainingTimeInD := 500;
+ TrainingTimeInM := 5000;
+ TrainingTimeMax := 60000;
+ TimeTrialStartTime := 0;
+ TimeTrialStopTime := 0;
+ cWaterLine := LAND_HEIGHT;
+ cGearScrEdgesDist := 240;
+
+ GameFlags := 0;
+ TrainingFlags := 0;
+ TurnTimeLeft := 0;
+ cSuddenDTurns := 15;
+ cDamagePercent := 100;
+ cRopePercent := 100;
+ cMineDudPercent := 0;
+ cTemplateFilter := 0;
+ cMapGen := 0; // MAPGEN_REGULAR
+ cMazeSize := 0;
+ cHedgehogTurnTime := 45000;
+ cMinesTime := 3;
+ cMaxAIThinkTime := 9000;
+ cCloudsNumber := 9;
+ cHealthCaseProb := 35;
+ cHealthCaseAmount := 25;
+ cWaterRise := 47;
+ cHealthDecrease := 5;
+
+ cTagsMask := 0;
+ InitStepsFlags := 0;
+ RealTicks := 0;
+ AttackBar := 0; // 0 - none, 1 - just bar at the right-down corner, 2 - from weapon
+ cCaseFactor := 5; {0..9}
+ cLandMines := 4;
+ cExplosives := 2;
+
+ GameState := Low(TGameState);
+ GameType := gmtLocal;
+ zoom := cDefaultZoomLevel;
+ ZoomValue := cDefaultZoomLevel;
+ WeaponTooltipTex:= nil;
+ cLaserSighting := false;
+ cVampiric := false;
+ cArtillery := false;
+ flagMakeCapture := false;
+ bBetweenTurns := false;
+ bWaterRising := false;
+ isCursorVisible := false;
+ isTerminated := false;
+ isInLag := false;
+ isPaused := false;
+ isInMultiShoot := false;
+ isSpeed := false;
+ fastUntilLag := false;
+ isFirstFrame := true;
+ isSEBackup := true;
+ cSeed := '';
+ cVolumeDelta := 0;
+ cHasFocus := true;
+ cInactDelay := 1250;
+ ReadyTimeLeft := 0;
+
+ ScreenFade := sfNone;
+
+{$IFDEF SDL13}
+ SDLwindow := nil;
+{$ENDIF}
+
+ // those values still aren't perfect
+ cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth);
+ cRightScreenBorder:= round(cMinZoomLevel * cScreenWidth + LAND_WIDTH);
+ cScreenSpace:= cRightScreenBorder - cLeftScreenBorder;
+
+ if isPhone() then
+ cMaxCaptions:= 3
+ else
+ cMaxCaptions:= 4;
+end;
+
+procedure freeModule;
+begin
+ // re-init flags so they will always contain safe values
+ cScreenWidth := 1024;
+ cScreenHeight := 768;
+ cBits := 32;
+ //ipcPort is in uIO
+ cFullScreen := false;
+ isSoundEnabled := true;
+ isMusicEnabled := false;
+ cLocaleFName := 'en.txt';
+ cInitVolume := 100;
+ cTimerInterval := 8;
+ PathPrefix := './';
+ cShowFPS := false;
+ cAltDamage := true;
+ cReducedQuality := rqNone;
+ //userNick is in uChat
+ recordFileName := '';
+ cReadyDelay := 0;
+end;
+
+end.
--- a/hedgewars/uVisualGears.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uVisualGears.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,36 +20,12 @@
unit uVisualGears;
interface
-uses uConsts, uFloat, Math, GLunit;
-
-type PVisualGear = ^TVisualGear;
- TVGearStepProcedure = procedure (Gear: PVisualGear; Steps: Longword);
- TVisualGear = record
- NextGear, PrevGear: PVisualGear;
- Frame,
- FrameTicks: Longword;
- X : float;
- Y : float;
- dX: float;
- dY: float;
- tdX: float;
- tdY: float;
- State : Longword;
- Timer: Longword;
- Angle, dAngle: real;
- Kind: TVisualGearType;
- doStep: TVGearStepProcedure;
- Tex: PTexture;
- alpha, scale: GLfloat;
- Hedgehog: pointer;
- Text: shortstring;
- Tint: Longword;
- end;
+uses uConsts, uFloat, GLunit, uTypes;
procedure initModule;
procedure freeModule;
-function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0): PVisualGear;
+function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0; Critical: Boolean = false): PVisualGear;
procedure ProcessVisualGears(Steps: Longword);
procedure KickFlakes(Radius, X, Y: LongInt);
procedure DrawVisualGears(Layer: LongWord);
@@ -57,12 +33,9 @@
procedure AddClouds;
procedure AddDamageTag(X, Y, Damage, Color: LongWord);
-var VisualGearsList: PVisualGear;
- vobFrameTicks, vobFramesCount, vobCount: Longword;
- vobVelocity, vobFallSpeed: LongInt;
+implementation
+uses uSound, uMobile, uVariables, uTextures, uRender, Math, uRenderUtils;
-implementation
-uses uWorld, uMisc, uStore, uTeams, uSound, uMobile;
const cExplFrameTicks = 110;
{$INCLUDE "VGSHandlers.inc"}
@@ -119,22 +92,25 @@
@doStepChunk,
@doStepNote,
@doStepLineTrail,
- @doStepBulletHit
+ @doStepBulletHit,
+ @doStepCircle
);
-function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0): PVisualGear;
+function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0; Critical: Boolean = false): PVisualGear;
+const VGCounter: Longword = 0;
var gear: PVisualGear;
t: Longword;
- sp: float;
+ sp: real;
begin
if (GameType = gmtSave) or (fastUntilLag and (GameType = gmtNet)) then // we are scrolling now
- if Kind <> vgtCloud then
+ if (Kind <> vgtCloud) and not Critical then
begin
AddVisualGear:= nil;
exit
end;
if ((cReducedQuality and rqFancyBoom) <> 0) and
+ not Critical and
not (Kind in
[vgtTeamHealthSorter,
vgtSmallDamageTag,
@@ -149,14 +125,16 @@
exit
end;
+inc(VGCounter);
New(gear);
FillChar(gear^, sizeof(TVisualGear), 0);
-gear^.X:= float(X);
-gear^.Y:= float(Y);
+gear^.X:= real(X);
+gear^.Y:= real(Y);
gear^.Kind := Kind;
gear^.doStep:= doStepHandlers[Kind];
gear^.State:= 0;
gear^.Tint:= $FFFFFFFF;
+gear^.uid:= VGCounter;
with gear^ do
case Kind of
@@ -378,7 +356,7 @@
if Gear^.Kind = vgtFlake then
begin
// Damage calc from doMakeExplosion
- dmg:= min(101, Radius + cHHRadius div 2 - LongInt(abs(round(Gear^.X) - X) + abs(round(Gear^.Y) - Y)) div 5);
+ dmg:= Min(101, Radius + cHHRadius div 2 - LongInt(abs(round(Gear^.X) - X) + abs(round(Gear^.Y) - Y)) div 5);
if dmg > 1 then
begin
Gear^.tdX:= 0.02 * dmg + 0.01;
@@ -436,7 +414,7 @@
case Gear^.Kind of
vgtExplosion: DrawSprite(sprExplosion50, round(Gear^.X) - 32 + WorldDx, round(Gear^.Y) - 32 + WorldDy, Gear^.State);
vgtBigExplosion: begin
- Tint($FF, $FF, $FF, floor($FF * (1 - power(Gear^.Timer / 250, 4))));
+ Tint($FF, $FF, $FF, round($FF * (1 - power(Gear^.Timer / 250, 4))));
DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -10 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
end;
end;
@@ -451,14 +429,14 @@
vgtBubble: DrawSprite(sprBubbles, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);//(RealTicks div 64 + Gear^.Frame) mod 8);
vgtSteam: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
vgtAmmo: begin
- Tint($FF, $FF, $FF, floor(Gear^.alpha * $FF));
+ Tint($FF, $FF, $FF, round(Gear^.alpha * $FF));
DrawTextureF(ropeIconTex, Gear^.scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 32, 32);
DrawTextureF(SpritesData[sprAMAmmos].Texture, Gear^.scale * 0.90, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame - 1, 1, 32, 32);
end;
vgtHealth: begin
case Gear^.Frame div 10 of
- 0:Tint(0, $FF, 0, floor(Gear^.FrameTicks * $FF / 1000));
- 1:Tint($FF, 0, 0, floor(Gear^.FrameTicks * $FF / 1000));
+ 0:Tint(0, $FF, 0, round(Gear^.FrameTicks * $FF / 1000));
+ 1:Tint($FF, 0, 0, round(Gear^.FrameTicks * $FF / 1000));
end;
DrawSprite(sprHealth, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, 0);
end;
@@ -482,7 +460,7 @@
DrawRotatedF(sprBeeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, (RealTicks shr 4) mod cMaxAngle);
end;
vgtSmokeRing: begin
- Tint($FF, $FF, $FF, floor(Gear^.alpha * $FF));
+ Tint($FF, $FF, $FF, round(Gear^.alpha * $FF));
DrawRotatedTextureF(SpritesData[sprSmokeRing].Texture, Gear^.scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 200, 200, Gear^.Angle);
end;
vgtChunk: DrawRotatedF(sprChunk, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
@@ -493,6 +471,9 @@
vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
vgtSpeechBubble: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
vgtHealthTag: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
+ vgtCircle: DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer,
+ ((Gear^.Tint shr 24) and $FF), ((Gear^.Tint shr 16) and $FF), ((Gear^.Tint shr 8) and $FF), Gear^.Tint and $FF);
+// Consider adding a version of DrawCircle that does not set Tint internally, and just call it here...
end;
Gear:= Gear^.NextGear
end
--- a/hedgewars/uWorld.pas Mon Nov 29 09:11:31 2010 +0100
+++ b/hedgewars/uWorld.pas Tue Nov 30 22:46:47 2010 +0100
@@ -20,46 +20,38 @@
unit uWorld;
interface
-uses SDLh, uGears, uConsts, uFloat, uRandom;
-
-
-var FollowGear: PGear;
- WindBarWidth: LongInt;
- bShowAmmoMenu: boolean;
- bSelected: boolean;
- bShowFinger: boolean;
- Frames: Longword;
- WaterColor, DeepWaterColor: TSDL_Color;
- WorldDx: LongInt;
- WorldDy: LongInt;
- SkyOffset: LongInt;
- HorizontOffset: LongInt;
-{$IFDEF COUNTTICKS}
- cntTicks: LongWord;
-{$ENDIF}
- cOffsetY: LongInt;
+uses SDLh, uGears, uConsts, uFloat, uRandom, uTypes;
procedure initModule;
procedure freeModule;
procedure InitWorld;
procedure DrawWorld(Lag: LongInt);
-procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
procedure ShowMission(caption, subcaption, text: ansistring; icon, time : LongInt);
procedure HideMission;
procedure ShakeCamera(amount: LongWord);
procedure MoveCamera;
implementation
-uses uStore, uMisc, uTeams, uIO, uKeys, uLocale, uSound, uAmmos, uVisualGears, uChat, uLandTexture, uLand, GLunit;
-
-type TCaptionStr = record
- Tex: PTexture;
- EndTime: LongWord;
- end;
+uses
+ uStore,
+ uMisc,
+ uIO,
+ uLocale,
+ uSound,
+ uAmmos,
+ uVisualGears,
+ uChat,
+ uLandTexture,
+ GLunit,
+ uVariables,
+ uUtils,
+ uTextures,
+ uRender,
+ uCaptions
+ ;
var cWaveWidth, cWaveHeight: LongInt;
- Captions: array[TCapGroup] of TCaptionStr;
AMSlotSize, AMxOffset, AMyOffset, AMWidth, AMxShift, SlotsNum: LongInt;
tmpSurface: PSDL_Surface;
fpsTexture: PTexture;
@@ -390,7 +382,7 @@
{$IFDEF IPHONEOS}
ShowWeaponTooltip(x - WeaponTooltipTex^.w - 3, AMyOffset - 1);
{$ELSE}
- ShowWeaponTooltip(x - WeaponTooltipTex^.w - 3, min(y + 1, cScreenHeight - WeaponTooltipTex^.h - 40));
+ ShowWeaponTooltip(x - WeaponTooltipTex^.w - 3, Min(y + 1, cScreenHeight - WeaponTooltipTex^.h - 40));
{$ENDIF}
bSelected:= false;
@@ -538,10 +530,9 @@
var i, t: LongInt;
r: TSDL_Rect;
tdx, tdy: Double;
- grp: TCapGroup;
s: string[15];
highlight: Boolean;
- offset, offsetX, offsetY, ScreenBottom: LongInt;
+ offsetX, offsetY, ScreenBottom: LongInt;
VertexBuffer: array [0..3] of TVertex2f;
begin
if not isPaused then
@@ -575,7 +566,7 @@
begin
// Offsets relative to camera - spare them to wimpier cpus, no bg or flakes for them anyway
ScreenBottom:= (WorldDy - trunc(cScreenHeight/cScaleFactor) - (cScreenHeight div 2) + cWaterLine);
- offsetY:= 10 * min(0, -145 - ScreenBottom);
+ offsetY:= 10 * Min(0, -145 - ScreenBottom);
SkyOffset:= offsetY div 35 + cWaveHeight;
HorizontOffset:= SkyOffset;
if ScreenBottom > SkyOffset then
@@ -742,26 +733,7 @@
{$ENDIF}
// Captions
-{$IFDEF IPHONEOS}
-offset:= 40;
-{$ELSE}
-if ((TrainingFlags and tfTimeTrial) <> 0) and (TimeTrialStartTime > 0) then offset:= 48
-else offset:= 8;
-{$ENDIF}
-
- for grp:= Low(TCapGroup) to High(TCapGroup) do
- with Captions[grp] do
- if Tex <> nil then
- begin
- DrawCentered(0, offset, Tex);
- inc(offset, Tex^.h + 2);
- if EndTime <= RealTicks then
- begin
- FreeTexture(Tex);
- Tex:= nil;
- EndTime:= 0
- end;
- end;
+DrawCaptions;
// Teams Healths
for t:= 0 to Pred(TeamsCount) do
@@ -869,7 +841,7 @@
if (ReadyTimeLeft = 0) and (missionTimer > 0) then dec(missionTimer, Lag);
if missionTimer < 0 then missionTimer:= 0; // avoid subtracting below 0
if missionTex <> nil then
- DrawCentered(0, min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex);
+ DrawCentered(0, Min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex);
end;
// fps
@@ -1005,22 +977,6 @@
isFirstFrame:= false
end;
-procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
-begin
-//if Group in [capgrpGameState] then WriteLnToConsole(s);
- if Captions[Group].Tex <> nil then
- FreeTexture(Captions[Group].Tex);
- Captions[Group].Tex:= nil;
-
- Captions[Group].Tex:= RenderStringTex(s, Color, fntBig);
-
- case Group of
- capgrpGameState: Captions[Group].EndTime:= RealTicks + 2200
- else
- Captions[Group].EndTime:= RealTicks + 1400 + LongWord(Captions[Group].Tex^.w) * 3;
- end;
-end;
-
procedure MoveCamera;
var EdgesDist, wdy: LongInt;
PrevSentPointTime: LongWord = 0;
@@ -1160,7 +1116,7 @@
procedure ShakeCamera(amount: LongWord);
begin
- amount:= max(1, amount);
+ amount:= Max(1, amount);
WorldDx:= WorldDx - amount + LongInt(getRandom(1 + amount * 2));
WorldDy:= WorldDy - amount + LongInt(getRandom(1 + amount * 2));
end;
@@ -1185,8 +1141,6 @@
missionTimer:= 0;
missionTex:= nil;
cOffsetY:= 0;
-
- FillChar(Captions, sizeof(Captions), 0)
end;
procedure freeModule;
--- a/project_files/hedgewars.pro Mon Nov 29 09:11:31 2010 +0100
+++ b/project_files/hedgewars.pro Tue Nov 30 22:46:47 2010 +0100
@@ -73,6 +73,7 @@
TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_hu.ts
TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_it.ts
TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_ja.ts
+TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_nl.ts
TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_pl.ts
TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_pt_BR.ts
TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_pt_PT.ts
--- a/share/hedgewars/Data/Locale/hedgewars_ar.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_ar.ts Tue Nov 30 22:46:47 2010 +0100
@@ -42,7 +42,7 @@
<translation>Edit schemes</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -69,7 +69,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>جديد</translation>
+ <translation type="obsolete">جديد</translation>
</message>
<message>
<source>Error</source>
@@ -706,20 +706,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>طريقة اسلحة جديدة</translation>
+ <translation type="obsolete">طريقة اسلحة جديدة</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>تغيير طريقة الاسلحة</translation>
+ <translation type="obsolete">تغيير طريقة الاسلحة</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>حذف طريقة الاسلحة</translation>
+ <translation type="obsolete">حذف طريقة الاسلحة</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -979,6 +1003,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -990,6 +1022,10 @@
<source>Delete</source>
<translation>حذف</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">جديد</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1187,7 +1223,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>اسلحة</translation>
+ <translation type="obsolete">اسلحة</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1217,6 +1253,10 @@
<source>Misc</source>
<translation>متنوعة</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1385,7 +1425,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1435,7 +1475,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Can not delete default weapon set</translation>
+ <translation type="obsolete">Can not delete default weapon set</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1453,6 +1493,30 @@
<source>Can not overwrite default weapon set '%1'!</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">فرق</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1597,6 +1661,10 @@
<source>Delays</source>
<translation>التأخير</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">جديد</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1703,6 +1771,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_bg.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts Tue Nov 30 22:46:47 2010 +0100
@@ -41,7 +41,7 @@
<translation>Невалидна оръжейна схема</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -84,7 +84,7 @@
</message>
<message>
<source>new</source>
- <translation>Нов отбор</translation>
+ <translation type="obsolete">Нов отбор</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -676,19 +676,31 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>New weapon scheme</source>
+ <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Edit weapon scheme</source>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Delete weapon scheme</source>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -941,6 +953,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -952,6 +972,10 @@
<source>Delete</source>
<translation>Изтриване</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1165,7 +1189,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Оръжия</translation>
+ <translation type="obsolete">Оръжия</translation>
</message>
<message>
<source>Team Settings</source>
@@ -1175,6 +1199,10 @@
<source>Misc</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1343,7 +1371,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1389,7 +1417,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Не могат да се изтрият оръжията по подразбиране</translation>
+ <translation type="obsolete">Не могат да се изтрият оръжията по подразбиране</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1411,6 +1439,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Отбори</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1555,6 +1607,10 @@
<source>Delays</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">Нов отбор</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1657,6 +1713,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_cs.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts Tue Nov 30 22:46:47 2010 +0100
@@ -42,7 +42,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -69,7 +69,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>nový</translation>
+ <translation type="obsolete">nový</translation>
</message>
<message>
<source>Error</source>
@@ -683,19 +683,31 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>New weapon scheme</source>
+ <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Edit weapon scheme</source>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Delete weapon scheme</source>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -950,6 +962,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -961,6 +981,10 @@
<source>Delete</source>
<translation>Smazat</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1154,7 +1178,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Zbraně</translation>
+ <translation type="obsolete">Zbraně</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1184,6 +1208,10 @@
<source>Misc</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1352,7 +1380,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1402,7 +1430,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Nemohu smazat základní nastavení zbraní</translation>
+ <translation type="obsolete">Nemohu smazat základní nastavení zbraní</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1420,6 +1448,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Týmy</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1564,6 +1616,10 @@
<source>Delays</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">nový</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1666,6 +1722,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_de.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Tue Nov 30 22:46:47 2010 +0100
@@ -41,7 +41,7 @@
<translation>Spielprofile bearbeiten</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -84,7 +84,7 @@
</message>
<message>
<source>new</source>
- <translation>Neu</translation>
+ <translation type="obsolete">Neu</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -732,20 +732,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Neue Waffenzusammenstellung</translation>
+ <translation type="obsolete">Neue Waffenzusammenstellung</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Waffenzusammenstellung bearbeiten</translation>
+ <translation type="obsolete">Waffenzusammenstellung bearbeiten</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Waffenzusammenstellung löschen</translation>
+ <translation type="obsolete">Waffenzusammenstellung löschen</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>Du kannst keine Teams bei der Team-Auswahl ändern. Gehe zum Hauptmenü zurück um Teams hinzuzufügen, zu editieren oder zu löschen.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -1003,6 +1027,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation>Jeder igel hat sein eigenes Waffenarsenal. Es wird nicht mit dem Team geteilt.</translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1014,6 +1046,10 @@
<source>Delete</source>
<translation>Löschen</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Neu</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1215,7 +1251,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Waffen</translation>
+ <translation type="obsolete">Waffen</translation>
</message>
<message>
<source>Net game</source>
@@ -1241,6 +1277,10 @@
<source>Misc</source>
<translation>Verschiedenes</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1415,7 +1455,7 @@
<translation>Schaden bei Sudden Death</translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1465,7 +1505,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Das Standard-Waffen-Set kann nicht gelöscht werden</translation>
+ <translation type="obsolete">Das Standard-Waffen-Set kann nicht gelöscht werden</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1483,6 +1523,30 @@
<source>File association failed.</source>
<translation>Dateizuordnung fehlgeschlagen.</translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Teams</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1627,6 +1691,10 @@
<source>Delays</source>
<translation>Verzögerungen</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">Neu</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1733,6 +1801,14 @@
<source>Per Hedgehog Ammo</source>
<translation>Waffen pro Igel</translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_en.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Tue Nov 30 22:46:47 2010 +0100
@@ -42,7 +42,11 @@
</message>
<message>
<source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
- <translation>When this option is enabled selecting a game scheme will auto-select a weapon (and vice versa)</translation>
+ <translation type="obsolete">When this option is enabled selecting a game scheme will auto-select a weapon (and vice versa)</translation>
+ </message>
+ <message>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
@@ -68,7 +72,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>new</translation>
+ <translation type="obsolete">new</translation>
</message>
<message>
<source>Error</source>
@@ -386,12 +390,14 @@
<source><b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts.</source>
<translation type="unfinished">
<numerusform></numerusform>
+ <numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source><b>%1</b> killed <b>%2</b> of his own hedgehogs.</source>
<translation type="unfinished">
<numerusform></numerusform>
+ <numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
@@ -710,20 +716,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>New weapon scheme</translation>
+ <translation type="obsolete">New weapon scheme</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Edit weapon scheme</translation>
+ <translation type="obsolete">Edit weapon scheme</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Delete weapon scheme</translation>
+ <translation type="obsolete">Delete weapon scheme</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -981,6 +1011,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -992,6 +1030,10 @@
<source>Delete</source>
<translation>Delete</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">New</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1189,7 +1231,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Weapons</translation>
+ <translation type="obsolete">Weapons</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1219,6 +1261,10 @@
<source>Misc</source>
<translation>Misc</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1387,7 +1433,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1437,7 +1483,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Can not delete default weapon set</translation>
+ <translation type="obsolete">Can not delete default weapon set</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1455,6 +1501,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Teams</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1599,6 +1669,10 @@
<source>Delays</source>
<translation>Delays</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">new</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1705,6 +1779,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_es.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Tue Nov 30 22:46:47 2010 +0100
@@ -42,7 +42,11 @@
</message>
<message>
<source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
- <translation>Cuando esta opción esté activada escoger un modo de juego escogerá el set de armas correspondiente (y viceversa)</translation>
+ <translation type="obsolete">Cuando esta opción esté activada escoger un modo de juego escogerá el set de armas correspondiente (y viceversa)</translation>
+ </message>
+ <message>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
@@ -84,7 +88,7 @@
</message>
<message>
<source>new</source>
- <translation>Nuevo</translation>
+ <translation type="obsolete">Nuevo</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -730,20 +734,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Nuevo set de armas</translation>
+ <translation type="obsolete">Nuevo set de armas</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Editar set de armas</translation>
+ <translation type="obsolete">Editar set de armas</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Borrar set de armas</translation>
+ <translation type="obsolete">Borrar set de armas</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>No es posible editar equipos desde la pantalla de elección de equipo. Vuelve al menú principal para añadir, editar o borrar equipos.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -1001,6 +1029,14 @@
<source>All (living) hedgehogs are fully restored at the end of turn</source>
<translation>La salud de todos los erizos en pie es restaurada al final de cada turno</translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1012,6 +1048,10 @@
<source>Delete</source>
<translation>Borrar</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Nuevo</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1241,7 +1281,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Sets de armas</translation>
+ <translation type="obsolete">Sets de armas</translation>
</message>
<message>
<source>Net game</source>
@@ -1267,6 +1307,10 @@
<source>Misc</source>
<translation>Otras opciones</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1445,7 +1489,11 @@
</message>
<message>
<source>Bind schemes and weapons</source>
- <translation>Enlazar modos y sets</translation>
+ <translation type="obsolete">Enlazar modos y sets</translation>
+ </message>
+ <message>
+ <source>% Rope Length</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
@@ -1494,7 +1542,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>No se puede borrar el set de armas predefinido</translation>
+ <translation type="obsolete">No se puede borrar el set de armas predefinido</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1512,6 +1560,30 @@
<source>File association failed.</source>
<translation>No se pudieron asociar los tipos de fichero.</translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Equipos</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1656,6 +1728,10 @@
<source>Delays</source>
<translation>Retraso</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">Nuevo</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1762,6 +1838,14 @@
<source>Reset Health</source>
<translation>Restaurar salud</translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_fi.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts Tue Nov 30 22:46:47 2010 +0100
@@ -41,7 +41,7 @@
<translation>Muokkaa kaavaa</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -68,7 +68,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>uusi</translation>
+ <translation type="obsolete">uusi</translation>
</message>
<message>
<source>Error</source>
@@ -726,20 +726,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Uusi ase</translation>
+ <translation type="obsolete">Uusi ase</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Muokkaa asesuunnitelmaa</translation>
+ <translation type="obsolete">Muokkaa asesuunnitelmaa</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Poista asesuunnitelma</translation>
+ <translation type="obsolete">Poista asesuunnitelma</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>Et voi muokata joukkueita joukkuevalinnassa. Mene takaisin päävalikkoon lisätäksesi, muokataksesi tai poistaaksesi joukkueita.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -997,6 +1021,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1008,6 +1040,10 @@
<source>Delete</source>
<translation>Poista</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Uusi</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1233,7 +1269,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Aseet</translation>
+ <translation type="obsolete">Aseet</translation>
</message>
<message>
<source>Net game</source>
@@ -1263,6 +1299,10 @@
<source>Misc</source>
<translation>Muut</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1431,7 +1471,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1481,7 +1521,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Oletus-asesettiä ei voi poistaa</translation>
+ <translation type="obsolete">Oletus-asesettiä ei voi poistaa</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1499,6 +1539,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Joukkueet</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1643,6 +1707,10 @@
<source>Delays</source>
<translation>Viipeet</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">uusi</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1749,6 +1817,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_fr.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts Tue Nov 30 22:46:47 2010 +0100
@@ -41,7 +41,7 @@
<translation>Éditer les paramètres</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -84,7 +84,7 @@
</message>
<message>
<source>new</source>
- <translation>nouveau</translation>
+ <translation type="obsolete">nouveau</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -708,19 +708,31 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>New weapon scheme</source>
+ <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Edit weapon scheme</source>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Delete weapon scheme</source>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -979,6 +991,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -990,6 +1010,10 @@
<source>Delete</source>
<translation>Supprimer</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Nouveau</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1199,7 +1223,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Armes</translation>
+ <translation type="obsolete">Armes</translation>
</message>
<message>
<source>Game Modifiers</source>
@@ -1217,6 +1241,10 @@
<source>Misc</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1385,7 +1413,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1431,7 +1459,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Impossible de supprimer le set d'armes par défaut</translation>
+ <translation type="obsolete">Impossible de supprimer le set d'armes par défaut</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1453,6 +1481,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Équipes</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1597,6 +1649,10 @@
<source>Delays</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1703,6 +1759,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_hu.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts Tue Nov 30 22:46:47 2010 +0100
@@ -40,7 +40,7 @@
<translation>Sémák szerkesztése</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -67,7 +67,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>új</translation>
+ <translation type="obsolete">új</translation>
</message>
<message>
<source>Error</source>
@@ -700,20 +700,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Új fegyverséma</translation>
+ <translation type="obsolete">Új fegyverséma</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Fegyverséma szerkesztése</translation>
+ <translation type="obsolete">Fegyverséma szerkesztése</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Fegyverséma törlése</translation>
+ <translation type="obsolete">Fegyverséma törlése</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -968,6 +992,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -979,6 +1011,10 @@
<source>Delete</source>
<translation>Törlés</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Új</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1176,7 +1212,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Fegyverek</translation>
+ <translation type="obsolete">Fegyverek</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1206,6 +1242,10 @@
<source>Misc</source>
<translation>Egyéb</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1380,7 +1420,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1430,7 +1470,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Az alap fegyverkeszléet nem törölhető</translation>
+ <translation type="obsolete">Az alap fegyverkeszléet nem törölhető</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1448,6 +1488,30 @@
<source>Can not overwrite default weapon set '%1'!</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Csapatok</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1592,6 +1656,10 @@
<source>Delays</source>
<translation>Késleltetések</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">új</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1698,6 +1766,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_it.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_it.ts Tue Nov 30 22:46:47 2010 +0100
@@ -41,7 +41,7 @@
<translation>Modifica schemi</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -84,7 +84,7 @@
</message>
<message>
<source>new</source>
- <translation>nuovo</translation>
+ <translation type="obsolete">nuovo</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -713,20 +713,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Nuovo schema armi</translation>
+ <translation type="obsolete">Nuovo schema armi</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Modifica schema armi</translation>
+ <translation type="obsolete">Modifica schema armi</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Elimina schema armi</translation>
+ <translation type="obsolete">Elimina schema armi</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -983,6 +1007,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -994,6 +1026,10 @@
<source>Delete</source>
<translation>Elimina</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Nuovo</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1195,7 +1231,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Armi</translation>
+ <translation type="obsolete">Armi</translation>
</message>
<message>
<source>Net game</source>
@@ -1221,6 +1257,10 @@
<source>Misc</source>
<translation>Varie</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1395,7 +1435,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1445,7 +1485,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Non è possibile eliminare il set di armi predefinito</translation>
+ <translation type="obsolete">Non è possibile eliminare il set di armi predefinito</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1463,6 +1503,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Squadre</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1607,6 +1671,10 @@
<source>Delays</source>
<translation>Ritardi</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">nuovo</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1713,6 +1781,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_ja.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts Tue Nov 30 22:46:47 2010 +0100
@@ -40,7 +40,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -67,7 +67,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>作成</translation>
+ <translation type="obsolete">作成</translation>
</message>
<message>
<source>Error</source>
@@ -669,19 +669,31 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>New weapon scheme</source>
+ <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Edit weapon scheme</source>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Delete weapon scheme</source>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -932,6 +944,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -943,6 +963,10 @@
<source>Delete</source>
<translation>削除</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1136,7 +1160,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>兵器</translation>
+ <translation type="obsolete">兵器</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1166,6 +1190,10 @@
<source>Misc</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1334,7 +1362,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1384,7 +1412,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>デフォールトセットの削除は不可能</translation>
+ <translation type="obsolete">デフォールトセットの削除は不可能</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1402,6 +1430,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">チーム</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1546,6 +1598,10 @@
<source>Delays</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">作成</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1648,6 +1704,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_nl.ts Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,2278 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="nl">
+<context>
+ <name>AmmoSchemeModel</name>
+ <message>
+ <source>new</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>FreqSpinBox</name>
+ <message>
+ <source>Never</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <source>Every %1 turn</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ <numerusform></numerusform>
+ </translation>
+ </message>
+</context>
+<context>
+ <name>GameCFGWidget</name>
+ <message>
+ <source>Edit weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Illegal ammo scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HWChatWidget</name>
+ <message>
+ <source>%1 *** %2 has been removed from your ignore list</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>%1 *** %2 has been added to your ignore list</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>%1 *** %2 has been removed from your friends list</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>%1 *** %2 has been added to your friends list</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HWForm</name>
+ <message>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>OK</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Unable to start the server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Cannot save record to file %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Please select record from the list above</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>DefaultTeam</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hedgewars Demo File</source>
+ <comment>File Types</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hedgewars Save File</source>
+ <comment>File Types</comment>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HWGame</name>
+ <message>
+ <source>en.txt</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Cannot open demofile %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HWMapContainer</name>
+ <message>
+ <source>Map</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Themes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Filter</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>All</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Small</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Medium</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Large</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Cavern</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wacky</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Small tunnels</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Medium tunnels</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Large tunnels</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Small floating islands</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Medium floating islands</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Large floating islands</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HWNetServersModel</name>
+ <message>
+ <source>Title</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>IP</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Port</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>HWNewNet</name>
+ <message>
+ <source>The host was not found. Please check the host name and port settings.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Connection refused</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Room destroyed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Quit reason: </source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>You got kicked</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Password</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Your nickname %1 is
+registered on Hedgewars.org
+Please provide your password
+or pick another nickname:</source>
+ <translation type="obsolete">Your nickname %1 is
+registered on Hedgewars.org
+Please provide your password
+or pick another nickname:</translation>
+ </message>
+ <message>
+ <source>%1 *** %2 has joined the room</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>%1 *** %2 has joined</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>%1 *** %2 has left (%3)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>%1 *** %2 has left</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Your nickname %1 is
+registered on Hedgewars.org
+Please provide your password below
+or pick another nickname in game config:</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>KB</name>
+ <message>
+ <source>SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageAdmin</name>
+ <message>
+ <source>Clear Accounts Cache</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Fetch data</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Server message for latest version:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Server message for previous versions:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Latest version protocol number:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>MOTD preview:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Set data</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageConnecting</name>
+ <message>
+ <source>Connecting...</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageEditTeam</name>
+ <message>
+ <source>General</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Advanced</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageGameStats</name>
+ <message>
+ <source>Details</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Health graph</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ranking</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <source>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ <numerusform></numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source>A total of <b>%1</b> hedgehog(s) were killed during this round.</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ <numerusform></numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source>(%1 kill)</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ <numerusform></numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source><b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts.</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ <numerusform></numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source><b>%1</b> killed <b>%2</b> of his own hedgehogs.</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ <numerusform></numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source><b>%1</b> was scared and skipped turn <b>%2</b> times.</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ <numerusform></numerusform>
+ </translation>
+ </message>
+</context>
+<context>
+ <name>PageMain</name>
+ <message>
+ <source>Local Game (Play a game on a single computer)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Network Game (Play a game across a network)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>While playing you should give yourself a short break at least once an hour.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Especially while playing online be polite and always remember there might be some minors playing with or against you as well!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>No hedgehogs were harmed in making this game.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Connect one or more gamepads before starting the game to be able to assign their controls to your teams.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Create an account on %1 to keep others from using your most favourite nickname while playing on the official server.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The Flame Thrower is a weapon but it can be used for tunnel digging as well.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Like Hedgewars? Become a fan on %1 or follow us on %2!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Keep your video card drivers up to date to avoid issues playing the game.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo!</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand.</source>
+ <comment>Tips</comment>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageMultiplayer</name>
+ <message>
+ <source>Start</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageNet</name>
+ <message>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Please select server from the list above</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageNetGame</name>
+ <message>
+ <source>Control</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageNetType</name>
+ <message>
+ <source>LAN game</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Official server</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageOptions</name>
+ <message>
+ <source>New team</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit team</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete team</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PagePlayDemo</name>
+ <message>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>OK</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Rename dialog</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Enter new file name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Cannot rename to</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Cannot delete file</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Please select record from the list</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageRoomsList</name>
+ <message>
+ <source>Create</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Join</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Refresh</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>OK</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Admin features</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Room Name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>This game is in lobby.
+You may join and start playing once the game starts.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>This game is in progress.
+You may join and spectate now but you'll have to wait for the game to end to start playing.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>%1 is the host. He may adjust settings and start the game.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Random Map</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Games may be played on precreated or randomized maps.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The Weapon Scheme defines available weapons and their ammunition count.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <source>There are %1 clients connected to this room.</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ <numerusform></numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <source>There are %1 teams participating in this room.</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ <numerusform></numerusform>
+ </translation>
+ </message>
+ <message>
+ <source>Please enter room name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Please select room from the list</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Random Maze</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>State:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Rules:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Weapons:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Search:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Clear</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>The game you are trying to join has started.
+Do you still want to join the room?</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageScheme</name>
+ <message>
+ <source>Defend your fort and destroy the opponents, two team colours max!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Teams will start on opposite sides of the terrain, two team colours max!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Land can not be destroyed!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Add an indestructable border around the terrain</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Lower gravity</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Assisted aiming with laser sight</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>All hogs have a personal forcefield</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Gain 80% of the damage you do back in health</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Share your opponents pain, share their damage</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Your hogs are unable to move, put your artillery skills to the test</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Random</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Seconds</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Order of play is random instead of in room order.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Play with a King. If he dies, your side dies.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Take turns placing your hedgehogs before the start of play.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ammo is shared between all teams that share a colour.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Disable girders when generating random maps.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Disable land objects when generating random maps.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>AI respawns on death.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>All (living) hedgehogs are fully restored at the end of turn</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Attacking does not end your turn.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Weapons are reset to starting values each turn.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Each hedgehog has its own ammo. It does not share with the team.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageSelectWeapon</name>
+ <message>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>PageSinglePlayer</name>
+ <message>
+ <source>Simple Game (a quick game against the computer, settings are chosen for you)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Multiplayer (play a hotseat game against your friends, or AI teams)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Demos (Watch recorded demos)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Load (Load a previously saved game)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Campaign Mode (...). IN DEVELOPMENT</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QAction</name>
+ <message>
+ <source>Kick</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Info</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Start</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Restrict Joins</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Restrict Team Additions</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ban</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Follow</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ignore</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Add friend</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Unignore</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Remove friend</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QCheckBox</name>
+ <message>
+ <source>Check for updates at startup</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Fullscreen</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Frontend fullscreen</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Enable sound</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Enable music</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Show FPS</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Alternative damage show</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Append date and time to record file name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Show ammo menu tooltips</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Enable frontend sounds</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Enable frontend music</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Frontend effects</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QComboBox</name>
+ <message>
+ <source>generated map...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Human</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Level</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>(System default)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mission</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>generated maze...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Community</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Any</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>In lobby</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>In progress</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QGroupBox</name>
+ <message>
+ <source>Team Members</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Fort</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Key binds</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Audio/Graphic options</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Net game</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Playing teams</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Game Modifiers</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Basic Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Team Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Misc</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QLabel</name>
+ <message>
+ <source>Mines Time</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mines</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Version</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>This program is distributed under the GNU General Public License</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Developers:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Art:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Sounds:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Translations:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Special thanks:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Host:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Port:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Net nick</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Resolution</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>FPS limit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Server name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Server port:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Initial sound volume</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Damage Modifier</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Turn Time</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Initial Health</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Sudden Death Timeout</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Scheme Name:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Crate Drops</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Game scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>% Dud Mines</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Grave</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Flag</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Voice</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Locale</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Restart game to apply</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Explosives</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Tip: </source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Quality</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>% Health Crates</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Health in Crates</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Sudden Death Water Rise</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Sudden Death Health Decrease</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>% Rope Length</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QLineEdit</name>
+ <message>
+ <source>unnamed</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QMainWindow</name>
+ <message>
+ <source>Hedgewars %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QMessageBox</name>
+ <message>
+ <source>Network</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Connection to server is lost</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Failed to open data directory:
+%1
+Please check your installation</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this weapon set?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not overwrite default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>All file associations have been set.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>File association failed.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Cannot create directory %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>OK</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Nickname</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Please enter your nickname</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QPushButton</name>
+ <message>
+ <source>default</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>OK</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Cancel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Start server</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Connect</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Update</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Specify</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Start</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Go!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Play demo</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Rename</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Load</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Setup</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ready</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Random Team</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Associate file extensions</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QTableWidget</name>
+ <message>
+ <source>Room Name</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>C</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>T</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Owner</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Map</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Rules</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SelWeaponWidget</name>
+ <message>
+ <source>Weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Probabilities</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Ammo in boxes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delays</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>TCPBase</name>
+ <message>
+ <source>Error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Unable to start the server: %1.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Unable to run engine: %1 (</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>ToggleButtonWidget</name>
+ <message>
+ <source>Vampirism</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Karma</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Artillery</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Fort Mode</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Divide Teams</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Solid Land</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Add Border</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Low Gravity</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Laser Sight</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Invulnerable</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Random Order</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>King</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Place Hedgehogs</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Clan Shares Ammo</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Disable Girders</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Disable Land Objects</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>AI Survival Mode</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Reset Health</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Unlimited Attacks</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Reset Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Per Hedgehog Ammo</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>binds</name>
+ <message>
+ <source>up</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>left</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>right</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>down</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>attack</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>precise aim</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>put</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>switch</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>find hedgehog</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>ammo menu</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 3</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 4</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 5</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 6</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 7</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 8</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 9</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>timer 1 sec</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>timer 2 sec</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>timer 3 sec</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>timer 4 sec</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>timer 5 sec</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>chat</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>chat history</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>pause</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>confirmation</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>volume down</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>volume up</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>change mode</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>capture</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>hedgehogs
+info</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>quit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>zoom in</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>zoom out</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>reset zoom</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>long jump</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>high jump</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>slot 10</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>binds (categories)</name>
+ <message>
+ <source>Basic controls</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Weapon controls</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Camera and cursor controls</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>binds (descriptions)</name>
+ <message>
+ <source>Move your hogs and aim:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Traverse gaps and obstacles by jumping:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Fire your selected weapon or trigger an utility item:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Pick a weapon or a target location under the cursor:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Switch your currently active hog (if possible):</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Pick a weapon or utility item:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Set the timer on bombs and timed weapons:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Move the camera to the active hog:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Move the cursor or camera without using the mouse:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Modify the camera's zoom level:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Talk to your team or all participants:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Pause, continue or leave your game:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Modify the game's volume while playing:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Toggle fullscreen mode:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Take a screenshot:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Toggle labels above hedgehogs:</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>binds (keys)</name>
+ <message>
+ <source>Axis</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>(Up)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>(Down)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hat</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>(Left)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>(Right)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Keyboard</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mouse: Left button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mouse: Middle button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mouse: Right button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mouse: Wheel up</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mouse: Wheel down</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Backspace</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Tab</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Clear</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Return</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Pause</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Escape</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Space</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 0</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 3</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 4</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 5</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 6</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 7</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 8</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad 9</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad .</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad /</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad *</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad -</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Numpad +</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Enter</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Equals</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Up</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Down</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Insert</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Home</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>End</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Page up</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Page down</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Num lock</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Caps lock</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Scroll lock</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right shift</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left shift</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right ctrl</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left ctrl</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right alt</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left alt</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right meta</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left meta</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>A button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>B button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>X button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Y button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>LB button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>RB button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Back button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Start button</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left stick</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right stick</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left stick (Right)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left stick (Left)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left stick (Down)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left stick (Up)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Left trigger</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right trigger</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right stick (Down)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right stick (Up)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right stick (Right)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Right stick (Left)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>DPad</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
--- a/share/hedgewars/Data/Locale/hedgewars_pl.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Tue Nov 30 22:46:47 2010 +0100
@@ -43,7 +43,11 @@
</message>
<message>
<source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
- <translation>Kiedy ta opcja jest włączona, wybór ustawnień gry zmienia uzbrojenie na odpowiadające (i vice versa)</translation>
+ <translation type="obsolete">Kiedy ta opcja jest włączona, wybór ustawnień gry zmienia uzbrojenie na odpowiadające (i vice versa)</translation>
+ </message>
+ <message>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
@@ -85,7 +89,7 @@
</message>
<message>
<source>new</source>
- <translation>nowy</translation>
+ <translation type="obsolete">nowy</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -754,20 +758,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Nowy schemat uzbrojenia</translation>
+ <translation type="obsolete">Nowy schemat uzbrojenia</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Edytuj schemat uzbrojenia</translation>
+ <translation type="obsolete">Edytuj schemat uzbrojenia</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Usuń schemat uzbrojenia</translation>
+ <translation type="obsolete">Usuń schemat uzbrojenia</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>Nie możesz edytować drużyn z menu wyboru drużyn. Wróć do głównego menu by dodawać, edytować i usuwać drużyny.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -1027,6 +1055,14 @@
<source>All (living) hedgehogs are fully restored at the end of turn</source>
<translation>Wszystkie żyjące jeże mają pełne życie od następnej tury</translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1038,6 +1074,10 @@
<source>Delete</source>
<translation>Usuń</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Nowy</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1267,7 +1307,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Uzbrojenie</translation>
+ <translation type="obsolete">Uzbrojenie</translation>
</message>
<message>
<source>Net game</source>
@@ -1293,6 +1333,10 @@
<source>Misc</source>
<translation>Różne</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1474,7 +1518,11 @@
</message>
<message>
<source>Bind schemes and weapons</source>
- <translation>Połącz ustawienia gry z uzbrojeniem</translation>
+ <translation type="obsolete">Połącz ustawienia gry z uzbrojeniem</translation>
+ </message>
+ <message>
+ <source>% Rope Length</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
@@ -1523,7 +1571,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Nie można usunąć domyślnego zestawu uzbrojenia</translation>
+ <translation type="obsolete">Nie można usunąć domyślnego zestawu uzbrojenia</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1541,6 +1589,30 @@
<source>File association failed.</source>
<translation>Powiązanie plików nie powiodło się.</translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Drużyny</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1685,6 +1757,10 @@
<source>Delays</source>
<translation>Opóźnienie</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">nowy</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1791,6 +1867,14 @@
<source>Reset Health</source>
<translation>Odnów życie</translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Tue Nov 30 22:46:47 2010 +0100
@@ -41,7 +41,7 @@
<translation>Editar esquemas</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -84,7 +84,7 @@
</message>
<message>
<source>new</source>
- <translation>novo</translation>
+ <translation type="obsolete">novo</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -784,20 +784,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Novo esquema de armas</translation>
+ <translation type="obsolete">Novo esquema de armas</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Editar esquema de armas</translation>
+ <translation type="obsolete">Editar esquema de armas</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Apagar esquema de armas</translation>
+ <translation type="obsolete">Apagar esquema de armas</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>Você não pode editar as equipes a partir da seleção de equipes. Volte ao menu para adicionar, editar ou apagar equipes.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -1055,6 +1079,14 @@
<source>All (living) hedgehogs are fully restored at the end of turn</source>
<translation>Todos os ouriços vivos são completamente restaurados ao fim do turno</translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1066,6 +1098,10 @@
<source>Delete</source>
<translation>Excluir</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Novo</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1295,7 +1331,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Armas</translation>
+ <translation type="obsolete">Armas</translation>
</message>
<message>
<source>Net game</source>
@@ -1321,6 +1357,10 @@
<source>Misc</source>
<translation>Misc</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1499,7 +1539,7 @@
<translation type="unfinished">Morte Subita: redução de vida</translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1551,7 +1591,7 @@
<message>
<source>Can not delete default weapon set</source>
<translatorcomment>Duvida:Esquema ou disposição?</translatorcomment>
- <translation>Não foi possível excluir o esquema padrão de armas</translation>
+ <translation type="obsolete">Não foi possível excluir o esquema padrão de armas</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1569,6 +1609,30 @@
<source>File association failed.</source>
<translation>Associação de arquivos falhou.</translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Equipes</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1715,6 +1779,10 @@
<source>Delays</source>
<translation>Atrasos</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1821,6 +1889,14 @@
<source>Reset Health</source>
<translation>Restaurar Vida</translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Tue Nov 30 22:46:47 2010 +0100
@@ -41,7 +41,7 @@
<translation>Editar armas</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -68,7 +68,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>novo</translation>
+ <translation type="obsolete">novo</translation>
</message>
<message>
<source>Error</source>
@@ -726,20 +726,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Novo esquema de armas</translation>
+ <translation type="obsolete">Novo esquema de armas</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Editar esquema de armas</translation>
+ <translation type="obsolete">Editar esquema de armas</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Apagar esquema de armas</translation>
+ <translation type="obsolete">Apagar esquema de armas</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>Não é possível editar equipas do menu de selecção de equipa. Volte ao menu principal se pretender adicionar, editar ou apagar equipas.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -997,6 +1021,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation>Cada ouriço tem as suas próprias armas. Não são partilhadas com a equipa.</translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1008,6 +1040,10 @@
<source>Delete</source>
<translation>Eliminar</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Novo</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1205,7 +1241,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Armas</translation>
+ <translation type="obsolete">Armas</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1235,6 +1271,10 @@
<source>Misc</source>
<translation>Diversos</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1403,7 +1443,7 @@
<translation>Vida perdida durante Morte Súbita</translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1453,7 +1493,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Não é possível eliminar o esquema de armas predefinido</translation>
+ <translation type="obsolete">Não é possível eliminar o esquema de armas predefinido</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1471,6 +1511,30 @@
<source>File association failed.</source>
<translation>Não foi possivel associar os ficheiros.</translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Equipas</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1615,6 +1679,10 @@
<source>Delays</source>
<translation>Atrasos</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">novo</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1721,6 +1789,14 @@
<source>Per Hedgehog Ammo</source>
<translation>Armamento Por Ouriço</translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_ru.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Tue Nov 30 22:46:47 2010 +0100
@@ -43,7 +43,11 @@
</message>
<message>
<source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
- <translation>При включении этой опции выбор настроек игры автоматически выберет схему оружия (и наоборот)</translation>
+ <translation type="obsolete">При включении этой опции выбор настроек игры автоматически выберет схему оружия (и наоборот)</translation>
+ </message>
+ <message>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
@@ -85,7 +89,7 @@
</message>
<message>
<source>new</source>
- <translation>новый</translation>
+ <translation type="obsolete">новый</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -721,20 +725,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Новая схема оружия</translation>
+ <translation type="obsolete">Новая схема оружия</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Редактировать схему оружия</translation>
+ <translation type="obsolete">Редактировать схему оружия</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Удалить схему оружия</translation>
+ <translation type="obsolete">Удалить схему оружия</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>Невозможно редактировать команды со страницы выбора команд. Вернитесь в главное меню для добавления, редактирования или удаления команд.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -994,6 +1022,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation>У каждого ежа свой набор оружия, не являющийся общим для команды.</translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1005,6 +1041,10 @@
<source>Delete</source>
<translation>Удалить</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Новая</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1214,7 +1254,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Оружие</translation>
+ <translation type="obsolete">Оружие</translation>
</message>
<message>
<source>Game Modifiers</source>
@@ -1232,6 +1272,10 @@
<source>Misc</source>
<translation>Разное</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1407,7 +1451,11 @@
</message>
<message>
<source>Bind schemes and weapons</source>
- <translation>Объединить настройки игры и оружия</translation>
+ <translation type="obsolete">Объединить настройки игры и оружия</translation>
+ </message>
+ <message>
+ <source>% Rope Length</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
@@ -1452,7 +1500,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Невозможно удалить набор оружия по умолчанию</translation>
+ <translation type="obsolete">Невозможно удалить набор оружия по умолчанию</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1474,6 +1522,30 @@
<source>File association failed.</source>
<translation>Сопоставление не удалось.</translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Команды</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1618,6 +1690,10 @@
<source>Delays</source>
<translation>Задержки</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">новый</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1724,6 +1800,14 @@
<source>Per Hedgehog Ammo</source>
<translation>Индивидуальный набор оружия</translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_sk.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Tue Nov 30 22:46:47 2010 +0100
@@ -43,7 +43,11 @@
</message>
<message>
<source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
- <translation>Ak je táto voľba vybraná, zvolením hernej schémy budú automaticky vybrané aj zbrane (a naopak)</translation>
+ <translation type="obsolete">Ak je táto voľba vybraná, zvolením hernej schémy budú automaticky vybrané aj zbrane (a naopak)</translation>
+ </message>
+ <message>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
@@ -85,7 +89,7 @@
</message>
<message>
<source>new</source>
- <translation>nový</translation>
+ <translation type="obsolete">nový</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -742,20 +746,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Nová schéma pre zbrane</translation>
+ <translation type="obsolete">Nová schéma pre zbrane</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Upraviť schému pre zbrane</translation>
+ <translation type="obsolete">Upraviť schému pre zbrane</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Vymazať schému pre zbrane</translation>
+ <translation type="obsolete">Vymazať schému pre zbrane</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>Z výberu tímov nemôžete upravovať tímy. Vráťte sa do hlavného menu, odkiaľ môžete pridávať, upravovať alebo mazať tímy.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -1015,6 +1043,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation>Každý ježko má vlastnú výzbroj. Nie je zdieľaná so zvyškom tímu.</translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1026,6 +1062,10 @@
<source>Delete</source>
<translation>Vymazať</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Nová</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1255,7 +1295,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Zbrane</translation>
+ <translation type="obsolete">Zbrane</translation>
</message>
<message>
<source>Net game</source>
@@ -1281,6 +1321,10 @@
<source>Misc</source>
<translation>Rozličné</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1441,7 +1485,7 @@
</message>
<message>
<source>Bind schemes and weapons</source>
- <translation>Prepojiť schémy a zbrane</translation>
+ <translation type="obsolete">Prepojiť schémy a zbrane</translation>
</message>
<message>
<source>Sudden Death Water Rise</source>
@@ -1459,6 +1503,10 @@
<source>Health in Crates</source>
<translation>Zdravie v bedniach</translation>
</message>
+ <message>
+ <source>% Rope Length</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLineEdit</name>
@@ -1506,7 +1554,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Nie je možné vymazať východziu sadu zbraní</translation>
+ <translation type="obsolete">Nie je možné vymazať východziu sadu zbraní</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1524,6 +1572,30 @@
<source>File association failed.</source>
<translation>Nastavenie súborových asociácii zlyhalo.</translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Tímy</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1668,6 +1740,10 @@
<source>Delays</source>
<translation>Oneskorenie</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">nový</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1774,6 +1850,14 @@
<source>Per Hedgehog Ammo</source>
<translation>Individuálne zbrane</translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_sv.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts Tue Nov 30 22:46:47 2010 +0100
@@ -41,7 +41,7 @@
<translation>Redigera spelscheman</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -84,7 +84,7 @@
</message>
<message>
<source>new</source>
- <translation>ny</translation>
+ <translation type="obsolete">ny</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -726,20 +726,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Nytt vapenschema</translation>
+ <translation type="obsolete">Nytt vapenschema</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Redigera vapenschema</translation>
+ <translation type="obsolete">Redigera vapenschema</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Ta bort vapenschema</translation>
+ <translation type="obsolete">Ta bort vapenschema</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>Du kan inte redigera lag från ett spel. Gå tillbaka till huvudmenyn för att lägga till, redigera eller ta bort lag.</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -997,6 +1021,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation>Varje igelkott har sin egen ammunition. Laget delar inte med varandra.</translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1008,6 +1040,10 @@
<source>Delete</source>
<translation>Ta bort</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Ny</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1237,7 +1273,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Vapen</translation>
+ <translation type="obsolete">Vapen</translation>
</message>
<message>
<source>Net game</source>
@@ -1263,6 +1299,10 @@
<source>Misc</source>
<translation>Diverse</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1437,7 +1477,7 @@
<translation>Sudden Death livminskning</translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1487,7 +1527,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Kan inte ta bort ursprungliga vapenscheman</translation>
+ <translation type="obsolete">Kan inte ta bort ursprungliga vapenscheman</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1505,6 +1545,30 @@
<source>File association failed.</source>
<translation>Filassociationer har misslyckats.</translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Lag</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1649,6 +1713,10 @@
<source>Delays</source>
<translation>Fördröjning</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">ny</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1755,6 +1823,14 @@
<source>Per Hedgehog Ammo</source>
<translation>Ammunition per igelkott</translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Tue Nov 30 22:46:47 2010 +0100
@@ -40,7 +40,7 @@
<translation>Düzeni değiştir</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -67,7 +67,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>yeni</translation>
+ <translation type="obsolete">yeni</translation>
</message>
<message>
<source>Error</source>
@@ -677,19 +677,31 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>New weapon scheme</source>
+ <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Edit weapon scheme</source>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Delete weapon scheme</source>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -944,6 +956,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -955,6 +975,10 @@
<source>Delete</source>
<translation>Sil</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Yeni</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1148,7 +1172,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Silahlar</translation>
+ <translation type="obsolete">Silahlar</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1178,6 +1202,10 @@
<source>Misc</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1346,7 +1374,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1396,7 +1424,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Öntanımlı silah seti silinemez</translation>
+ <translation type="obsolete">Öntanımlı silah seti silinemez</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1414,6 +1442,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Takımlar</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1558,6 +1610,10 @@
<source>Delays</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">yeni</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1664,6 +1720,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_uk.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts Tue Nov 30 22:46:47 2010 +0100
@@ -42,7 +42,7 @@
<translation>Редагувати схеми</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -69,7 +69,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>нова</translation>
+ <translation type="obsolete">нова</translation>
</message>
<message>
<source>Error</source>
@@ -718,20 +718,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>Нова схема зброї</translation>
+ <translation type="obsolete">Нова схема зброї</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>Редагувати схему зброї</translation>
+ <translation type="obsolete">Редагувати схему зброї</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>Видалити схему зброї</translation>
+ <translation type="obsolete">Видалити схему зброї</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -990,6 +1014,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1001,6 +1033,10 @@
<source>Delete</source>
<translation>Видалити</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">Нова</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1198,7 +1234,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Зброя</translation>
+ <translation type="obsolete">Зброя</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1228,6 +1264,10 @@
<source>Misc</source>
<translation>Різне</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1402,7 +1442,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1452,7 +1492,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>Неможливо видалити набір зброї за замовчуванням</translation>
+ <translation type="obsolete">Неможливо видалити набір зброї за замовчуванням</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1470,6 +1510,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">Команди</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1614,6 +1678,10 @@
<source>Delays</source>
<translation>Затримки</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">нова</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1720,6 +1788,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Tue Nov 30 22:46:47 2010 +0100
@@ -40,7 +40,7 @@
<translation>修改武器</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -83,7 +83,7 @@
</message>
<message>
<source>new</source>
- <translation>新</translation>
+ <translation type="obsolete">新</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -727,20 +727,44 @@
</message>
<message>
<source>New weapon scheme</source>
- <translation>新武器配置</translation>
+ <translation type="obsolete">新武器配置</translation>
</message>
<message>
<source>Edit weapon scheme</source>
- <translation>修改武器配置</translation>
+ <translation type="obsolete">修改武器配置</translation>
</message>
<message>
<source>Delete weapon scheme</source>
- <translation>删除武器配置</translation>
+ <translation type="obsolete">删除武器配置</translation>
</message>
<message>
<source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation>您不能在队伍选择界面修改队伍,请返回主页面添加/修改/删除队伍。</translation>
</message>
+ <message>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PagePlayDemo</name>
@@ -996,6 +1020,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation>每个刺猬都有其自己的武器. 并在奔队中不共享.</translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -1007,6 +1039,10 @@
<source>Delete</source>
<translation>删除</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">新模式</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1244,7 +1280,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>武器</translation>
+ <translation type="obsolete">武器</translation>
</message>
<message>
<source>Game Modifiers</source>
@@ -1262,6 +1298,10 @@
<source>Misc</source>
<translation>杂项</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1430,7 +1470,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1476,7 +1516,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>不能删除默认武器设定</translation>
+ <translation type="obsolete">不能删除默认武器设定</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1498,6 +1538,30 @@
<source>File association failed.</source>
<translation>文件联合失败.</translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">队伍</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1642,6 +1706,10 @@
<source>Delays</source>
<translation>延迟</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">新</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1748,6 +1816,14 @@
<source>Per Hedgehog Ammo</source>
<translation>每个刺猬的武器</translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Tue Nov 30 22:46:47 2010 +0100
@@ -40,7 +40,7 @@
<translation type="unfinished">修改遊戲設置</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -83,7 +83,7 @@
</message>
<message>
<source>new</source>
- <translation>新</translation>
+ <translation type="obsolete">新</translation>
</message>
<message>
<source>Please select record from the list above</source>
@@ -699,19 +699,31 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>New weapon scheme</source>
+ <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Edit weapon scheme</source>
+ <source>New scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Delete weapon scheme</source>
+ <source>Delete scheme</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.</source>
+ <source>Edit weapon set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -968,6 +980,14 @@
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>PageSelectWeapon</name>
@@ -979,6 +999,10 @@
<source>Delete</source>
<translation>刪除</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation type="unfinished">新模式</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1188,7 +1212,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>武器</translation>
+ <translation type="obsolete">武器</translation>
</message>
<message>
<source>Game Modifiers</source>
@@ -1206,6 +1230,10 @@
<source>Misc</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1374,7 +1402,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Bind schemes and weapons</source>
+ <source>% Rope Length</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1412,7 +1440,7 @@
</message>
<message>
<source>Can not delete default weapon set</source>
- <translation>不能刪除默認武器設定</translation>
+ <translation type="obsolete">不能刪除默認武器設定</translation>
</message>
<message>
<source>Really delete this weapon set?</source>
@@ -1442,6 +1470,30 @@
<source>File association failed.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Teams</source>
+ <translation type="unfinished">隊伍</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1586,6 +1638,10 @@
<source>Delays</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>new</source>
+ <translation type="unfinished">新</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1692,6 +1748,14 @@
<source>Per Hedgehog Ammo</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Disable Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>binds</name>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Locale/nl.txt Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,510 @@
+; English locale
+
+00:00=Grenade
+00:01=ClusterBomb
+00:02=Bazooka
+00:03=Homing Bee
+00:04=Shotgun
+00:05=PickHammer
+00:06=Skip
+00:07=Rope
+00:08=Mine
+00:09=Desert Eagle
+00:10=Dynamite
+00:11=Baseball Bat
+00:12=Fire Punch
+00:13=sec
+00:14=Parachute
+00:15=Air Attack
+00:16=Mine Strike
+00:17=Blow Torch
+00:18=Construction
+00:19=Teleportation
+00:20=Switch Hedgehog
+00:21=Mortar
+00:22=Whip
+00:23=Kamikaze
+00:24=Cake
+00:25=Seduction
+00:26=Watermelon Bomb
+00:27=Hellish hand-grenade
+00:28=Drill Rocket
+00:29=Ballgun
+00:30=Napalm
+00:31=RC Plane
+00:32=Low Gravity
+00:33=Extra Damage
+00:34=Invulnerable
+00:35=Extra Time
+00:36=Laser Sight
+00:37=Vampirism
+00:38=Sniper Rifle
+00:39=Flying Saucer
+00:40=Molotov Cocktail
+00:41=Birdy
+00:42=Portable Portal Device
+00:43=Piano Strike
+00:44=Old Limburger
+00:45=Sine Gun (beta)
+00:46=Flamethrower
+00:47=Sticky Mine
+00:48=Hammer
+00:49=Resurrector
+00:50=Drill Strike
+
+01:00=Let's fight!
+01:01=Round draw
+01:02=%1 wins!
+01:03=Volume %1%
+01:04=Paused
+01:05=Really quit (Y/Esc)?
+01:06=Sudden Death!
+01:07=%1 remaining
+01:08=Fuel
+01:09=Synchronizing...
+01:10=Using this utility won't end your turn!
+01:11=This weapon or utility is not yet available!
+01:12=Last round till Sudden Death!
+01:13=%1 rounds till Sudden Death!
+01:14=Get ready, %1!
+
+; Event messages
+; Hog (%1) died
+02:00=%1 has kicked the bucket!
+02:00=%1 has seen the light!
+02:00=%1 never saw that coming!
+02:00=%1 waves goodbye!
+02:00=%1 has gone to a better place!
+02:00=%1 meets his maker!
+02:00=%1 can hang on no longer!
+02:00=%1 has done his duty!
+02:00=%1 makes the ultimate sacrifice!
+02:00=%1 departs this mortal coil!
+02:00=%1 makes like a tree and leaves!
+02:00=%1 has timed out!
+02:00=%1 says peace out!
+02:00=%1 will be fondly remembered!
+02:00=%1 has an aneurysm!
+02:00=%1 leaves behind a wife and child
+02:00=%1 has launched his last bazooka
+02:00=%1 has tossed his last grenade
+02:00=%1 has baked his last cake
+02:00=%1 has swung on his last rope
+02:00=%1 has called his last airstrike
+02:00=%1 has pumped his last shotgun
+02:00=%1 has thrown his last melon
+02:00=%1 has drawn his last deagle
+02:00=%1 took one shot too many
+02:00=%1 could really have used a health crate
+02:00=%1 has gone to play a better game
+02:00=%1 has ragequit life
+02:00=%1 fails
+02:00=Poor poor %1...
+02:00=%1 prefers wormux
+02:00=%1 has been blocking shots with his face
+02:00=%1 is a hero amongst me...err...hogs
+02:00=%1 finds his place in Valhalla
+02:00=%1 has left the building
+02:00=%1 goes the way of the dinosaurs
+02:00=%1 brings hedgehogs one step closer to extinction
+02:00=%1 brings a tear to my eye
+02:00=%1 is an ex-hog
+02:00=%1 is pushing up the daisies
+02:00=%1 has ceased to be
+02:00=Say goodbye to %1
+02:00=No hope left for %1
+02:00=%1 faces the final curtain
+02:00=Smoke 'em if you got 'em, %1
+02:00=%1 suffers a Spontaneous Massive Existence Failure
+02:00=%1 has passed on
+02:00=%1 is stone dead
+02:00=%1 is no more
+02:00=%1 has expired
+02:00=Bereft of life, %1 rests in peace
+02:00=%1 joins the choir invisible
+02:00=Farewell %1, we hardly knew ye!
+02:00=%1 had a low tolerance for being shot
+02:00=%1 could have used an extra life
+02:00=Is there a doctor in the house?
+
+; Hog (%1) drowned
+02:01=%1 plays submarine!
+02:01=%1 mimics the Titanic!
+02:01=%1 swims like a stone!
+02:01=%1 floats like a brick!
+02:01=%1 checks out the deep end
+02:01=%1 goes glug glug glug
+02:01=%1 goes splash
+02:01=%1 forgot his armbands
+02:01=%1 really should have taken swimming lessons
+02:01=%1 left his surfboard at home
+02:01=%1 is washed up
+02:01=%1 is one soggy hog
+02:01=%1 forgot to bring his life jacket
+02:01=%1 goes splish splash splish
+02:01=%1 is sleeping with the fishes
+02:01=%1 thinks the water physics suck in this game
+02:01=%1 looks thirsty
+02:01=The sea claims %1
+02:01=%1 is lost at sea
+02:01=%1 should have brought his scuba gear
+02:01=%1 gets a burial at sea
+02:01=%1 has that sinking feeling
+02:01=%1 is practicing his backstroke
+02:01=%1 goes in search of the Titanic
+02:01=%1 is not Jesus
+02:01=%1 is finding Nemo
+02:01=%1 springs a leak
+02:01=You've gotta wonder how many hogs are down there
+02:01=%1 makes the ocean slightly higher
+02:01=%1 didn't enlist in the Navy
+02:01=%1 is doing his impersonation of a dead fish
+02:01=At least you didn't go down the toilet, %1
+02:01=Sonic couldn't swim and neither can %1
+02:01=%1 wants to play Ecco the dolphin
+02:01=%1 has gone to visit Aquaria
+02:01=%1 has found the lost city of Atlantis
+02:01=%1 aims for the lead role in Bioshock 3
+02:01=Your doggy paddle could use a little work, %1
+02:01=%1 should have brought a jet ski
+02:01=%1 doesn't like watersports
+02:01=%1 is forever blowing bubbles
+02:01=%1 is short of a raft
+02:01=%1 thinks salt water is good for the skin
+02:01=%1 gets salt water in his wounds
+02:01=%1 has walked the plank
+02:01=%1 has a bath
+02:01=%1 is wet wet wet
+02:01=%1 gets his quills wet
+02:01=It's Davy Jones' locker for %1
+
+; Round starts
+02:02=Let's fight!
+02:02=Armed and ready!
+02:02=Let's get ready to rumble!
+02:02=Let's get it on!
+02:02=Let's get this party started
+02:02=Last hog standing wins
+02:02=Let's go!
+02:02=Let's rock!
+02:02=Let's jam!
+02:02=It's beginning...
+02:02=This is the start of something big
+02:02=Welcome to Hedgewars
+02:02=Welcome to the front lines
+02:02=Crush your enemies!
+02:02=May the best hog win
+02:02=Victory or death
+02:02=To the victor goes the spoils
+02:02=Losing is not an option
+02:02=Cry havoc! Let loose the hogs of war!
+02:02=Hedgewars, brought to you by Hedgewars.org
+02:02=GL HF
+02:02=Just count yourself lucky you're not up against Tiyuri
+02:02=Just count yourself lucky you're not up against unC0Rr
+02:02=Just count yourself lucky you're not up against Nemo
+02:02=Just count yourself lucky you're not up against Smaxx
+02:02=Just count yourself lucky you're not up against Jessor
+02:02=Give it your all!
+02:02=The losers do the cleaning up!
+02:02=Let the fight of the millenium begin
+02:02=Let the fight of the century begin
+02:02=Let the fight of the decade begin
+02:02=Let the fight of the year begin
+02:02=Let the fight of the month begin
+02:02=Let the fight of the week begin
+02:02=Let the fight of the day begin
+02:02=Let the fight of the hour begin
+02:02=Do your best!
+02:02=Destroy the enemy!
+02:02=Good luck
+02:02=Have fun
+02:02=Fight the good fight
+02:02=Fight dirty
+02:02=Fight with honour
+02:02=Don't give up
+02:02=Never surrender
+02:02=Rock 'em and sock 'em!
+02:02=Let the fragfest begin!
+02:02=I hope you're ready for a tussle!
+02:02=Go Go Go!
+02:02=Hedgehogs advance!
+02:02=Bring it to them!
+02:02=Have no fear!
+02:02=Be brave and conquer
+
+; Round ends (win; unused atm)
+02:03=...
+
+; Round ends (draw; unused atm)
+02:04=...
+
+; New health crate
+02:05=Incoming aid!
+02:05=Medic!
+02:05=First aid from the skies!
+02:05=A health pack for you
+02:05=Good health... in box form!
+02:05=The doctor calls
+02:05=Fresh band-aids!
+02:05=This will make you feel better
+02:05=A Hi-Potion! Whoops wrong game
+02:05=A pick-me-up!
+02:05=Grab it
+02:05=A healthy snack
+02:05=A remedy to pain
+02:05=Correct Dosage: as many as you can find!
+02:05=Urgent delivery
+02:05=Supplies!
+
+; New ammo crate
+02:06=More weapons!
+02:06=Reinforcements!
+02:06=Lock and load!
+02:06=I wonder what weapon is in there?
+02:06=Supplies!
+02:06=What could be inside?
+02:06=Christmas comes early in Hedgewars
+02:06=A present!
+02:06=Special delivery!
+02:06=It was a nightmare getting this through customs
+02:06=Destructive toys from the heavens
+02:06=Warning! Contents Volatile
+02:06=Pick it up or blow it up, choice is yours
+02:06=Goodies!
+02:06=Mmmmm Ammo
+02:06=A box of destructive power
+02:06=Airmail!
+02:06=Whatever's in that box, it ain't pizza
+02:06=Get it!
+02:06=Weapon drop incoming
+02:06=Don't let the enemy grab that!
+02:06=Shiny new toys!
+02:06=A mysterious box!
+
+; New utility crate
+02:07=Tooltime!
+02:07=This could come in handy...
+02:07=Utilities!
+02:07=Utilise this box
+02:07=Watch out below
+02:07=More utilities!
+02:07=Tools for you!
+02:07=This should be good!
+02:07=Use this wisely
+02:07=Ooo this box is heavy
+02:07=You might need this
+
+; Hog (%1) skips his turn
+02:08=%1 is sooo boring...
+02:08=%1 couldn't be bothered
+02:08=%1 is one lazy hog
+02:08=%1 is thoughtless
+02:08=%1 gave up
+02:08=You snooze you lose, %1
+02:08=%1 shamelessly skips
+02:08=%1 is really lazy
+02:08=%1 needs a little more motivation
+02:08=%1 is a pacifist
+02:08=%1 has a breather
+02:08=%1 has a rest
+02:08=%1 chills out
+02:08=%1 has no faith in his own abilities
+02:08=%1 decides to do nothing at all
+02:08=%1 lets the enemy destroy itself
+02:08=%1 would be terrible at parties
+02:08=%1 hides out
+02:08=%1 has decided to pass on this opportunity
+02:08=%1 decides the best thing he can do is...nothing
+02:08=%1 is a big wuss
+02:08=Buck Buck Buck, %1 is a chicken
+02:08=%1 is looking a little yellow
+02:08=%1 is a coward!
+02:08=%1 is waiting for sudden death
+02:08=%1 is not the fighting type
+02:08=%1 is reconsidering his purpose in life
+02:08=%1 was never much of a good shot anyway
+02:08=%1 didn't want to join the army in the first place
+02:08=Stop wasting our time, %1
+02:08=I'm dissapointed in you, %1
+02:08=Come on, you can do better than that %1
+02:08=%1's will has broken
+02:08=%1 apparently has better things to do
+02:08=%1 is scared stiff
+02:08=%1 has fallen asleep
+
+; Hog (%1) hurts himself only
+02:09=%1 should practice aiming!
+02:09=%1 seems to hate himself
+02:09=%1 is standing on the wrong side!
+02:09=%1 makes like an emo
+02:09=%1 was holding his weapon the wrong way around
+02:09=%1 is a little sadistic
+02:09=%1 is a masochist
+02:09=%1 has no instinct of self-preservation
+02:09=%1 messed up
+02:09=%1 screwed up
+02:09=That was a poor shot, %1
+02:09=%1 is a little too careless with dangerous weapons
+02:09=%1 should consider a change of career
+02:09=Worst. Shot. Ever!
+02:09=No no no %1, you shoot at the ENEMY!
+02:09=%1 should only be destroying the enemy
+02:09=%1 moves one step closer to suicide
+02:09=%1 aids the enemy
+02:09=That was stupid %1
+02:09=%1 lives by the mantra of "no pain, no gain"
+02:09=%1 is confused
+02:09=%1 hurt itself in its confusion
+02:09=%1 has a knack for embarrassing himself
+02:09=%1 is a klutz!
+02:09=%1 is clumsy
+02:09=%1 shows the enemy what he's capable of
+02:09=%1 can't be expected to be perfect all the time
+02:09=Don't worry %1, pobody's nerfect
+02:09=%1 totally did that on purpose
+02:09=I won't tell anyone if you don't, %1
+02:09=How embarrassing!
+02:09=I'm sure nobody saw that %1
+02:09=%1 needs to review his field manual
+02:09=%1's weapon clearly malfunctioned
+
+; Hog shot an home run (using the bat and another hog)
+02:10=Home Run!
+02:10=A bird, a plane, ...
+02:10=That one is out!
+
+; Hog (%1) has to leave (team is gone)
+02:11=%1 has to go to bed!
+02:11=%1 seems too busy to play
+02:11=Beam him up, Scotty!
+02:11=%1 has to go
+
+; Weapon Categories
+03:00=Timed Grenade
+03:01=Timed Grenade
+03:02=Ballistic Weapon
+03:03=Guided Weapon
+03:04=Gun (multiple shots)
+03:05=Digging Tool
+03:06=Action
+03:07=Transport Utility
+03:08=Proximity Bomb
+03:09=Gun (multiple shots)
+03:10=BOOM!
+03:11=Bonk!
+03:12=Martial Arts
+03:13=UNUSED
+03:14=Transport Utility
+03:15=Airborne Attack
+03:16=Airborne Attack
+03:17=Digging Tool
+03:18=Utility
+03:19=Transport Utility
+03:20=Action
+03:21=Ballistic Weapon
+03:22=Call me Indiana!
+03:23=(Really) Martial Arts
+03:24=The cake is NOT a lie!
+03:25=Costume Kit
+03:26=Juicy Grenade
+03:27=Fiery Grenade
+03:28=Ballistic Weapon
+03:29=Ballistic Weapon
+03:30=Airborne Attack
+03:31=Remote Controlled Bomb
+03:32=Temporary Effect
+03:33=Temporary Effect
+03:34=Temporary Effect
+03:35=Temporary Effect
+03:36=Temporary Effect
+03:37=Temporary Effect
+03:38=Gun (multiple shots)
+03:39=Transport Utility
+03:40=Incinerating Grenade
+03:41=Huge fan of Squawks
+03:42=I'm making a note here...
+; the misspelled "Beethoven" is intentional (-> to beat)
+03:43=Performing Beathoven's deadly sonata
+03:44=Best before: 1923
+03:45=The power of science
+03:46=Hot Hot Hot!
+03:47=Stick these somewhere useful!
+03:48=It's Hammer time!
+03:49=Does what you guess
+03:50=Moles fan
+
+; Weapon Descriptions (use | as line breaks)
+04:00=Attack your enemies using a simple grenade.|It will explode once its timer reaches zero.|1-5: Set grenade's timer|Attack: Hold to throw with more power
+04:01=Attack your enemies using a cluster bomb.|It will split into smaller bombs once its timer|reaches zero.|1-5: Set grenade's timer|Attack: Hold to throw with more power
+04:02=Attack your enemies using a ballistic projectile|that might be influenced by wind.|Attack: Hold to shoot with more power
+04:03=Launch an explosive bee that will lock on|the selected target. Don't shoot with full power|to improve its precision.|Cursor: Pick target|Attack: Hold to shoot with more power
+04:04=Attack your enemy using a shotgun with two shots.|Thanks to its spread you don't need direct hits|to harm your opponents.|Attack: Shoot (multiple times)
+04:05=Move underground! Use the pickhammer to drill|a hole into the ground and reach other areas.|Attack: Start or stop digging
+04:06=Bored? No way to attack? Save your ammo?|No problem! Just skip your turn, coward!|Attack: Skip your turn without fighting
+04:07=Bridge huge distances using timed shots with the|rope. Use your momentum to slide into other hogs|or drop grenades and other weapons on them.|Attack: Shoot or release the rope|Long Jump: Drop grenades or similar weapons
+04:08=Keep your enemies away by dropping a mine in|narrow passages or right below their feet. Be|sure to retreat before you trigger it yourself!|Attack: Drop mine next to your feet
+04:09=Not sure about your aiming? Use the Desert|Eagle to attack using up to four shots.|Attack: Shoot (multiple times)
+04:10=Brute force is always an option. Drop this classic|explosive next to your enemies and retreat.|Attack: Drop dynamite next to your feet
+04:11=Get rid of enemy hogs by batting them over|the map borders or into water. Or how about|knocking some mines to your friends?|Attack: Bat everything in front of you
+04:12=Get close and personal to unleash the power of|this almost deadly martial arts technique.|Attack: Perform the Fire Punch
+04:13=UNUSED
+04:14=Fear of heights? Better grab a parachute.|It will unfold once|you fall too far and|save your hog from taking fall damage.|Attack: Unfold the parachute|Long Jump: Drop grenades or similar weapons
+04:15=Call in an airplane to attack your enemies|using a bombing run.|Left/Right: Determine attack direction|Cursor: Select target region
+04:16=Call in an airplane to drop several mines|in the target area.|Left/Right: Determine attack direction|Cursor: Select target region
+04:17=Need shelter? Use the blow torch to dig|a tunnel into solid ground granting you|cover.|Attack: Start or stop digging
+04:18=Need additional protection or want to pass|unpassable ground? Place some girders as you|like.|Left/Right: Select girder to place|Cursor: Place girder in a valid position
+04:19=Used at the right moment teleportation can|be more powerful than almost all weapons as|it allows you to save hogs from dangerous|situations within seconds.|Cursor: Select target region
+04:20=Allows you to play the current turn with|a different hog.|Attack: Enable switching hogs
+04:21=Shoot a grenade-like projectile that will|release multiple bombs upon impact.|Attack: Shoot at full power
+04:22=Not just for Indiana Jones! The whip is a|useful weapon in many situations. Especially|when you'd like to shove someone off a cliff.|Attack: Strike everything in front of you
+04:23=If you have nothing to lose, this might be|quite handy. Sacrifice your hog by launching|him into a specific direction hurting everything|on his way and exploding at the end.|Attack: Launch the devastating and deadly attack
+04:24=Happy Birthday! Launch this cake, let it walk right|next to your enemies and let them have an explosive|party. The cake is able to pass almost all terrain|but he might detonate earlier this way.|Attack: Start the cake or let it stop and explode
+04:25=Use this disguise kit to get your enemies to jump|towards your hog (and into some gap or hole).|Attack: Use the kit and try to seduce another hog
+04:26=Throw this juicy watermelon at your enemies. Once|the timer expires, it will split into several|explosive pieces.|1-5: Set watermelon's timer|Attack: Hold to shoot with more power
+04:27=Let hellfire rain onto your opponents by using|this fiendish explosive. Don't get too close to|the explosion as smaller fires might last longer.|Attack: Hold to shoot with more power
+04:28=Short time after launching this rocket, it will|start drilling through solid ground and explode|once its fuse is triggered or it resurfaces again.|Attack: Hold to shoot with more power
+04:29=This is nothing for small kids! The ball gun fires|tons of small colored balls filled with explosives.|Attack: Shoot at full power|Up/Down: Continue aiming
+04:30=Call in an airplane to launch a powerful napalm|strike. With proper aiming this attack can eradicate|huge parts of landscape including unlucky hogs|sitting there.|Left/Right: Determine attack direction|Cursor: Select target region
+04:31=The RC plane is the ideal weapon to collect crates or|attack far away hogs. Either steer it into enemies or|drop some bombs first.|Attack: Launch the plane or drop bombs|Long Jump: Let the valkyries ride into battle|Up/Down: Steer the plane
+04:32=Low gravity is more effective than any diet! Jump|higher and over greater distances or let your enemies|fly even further.|Attack: Activate
+04:33=Sometimes you just need that little extra boost to|deal some more damage.|Attack: Activate
+04:34=Can't touch me!|Attack: Activate
+04:35=Sometimes time's running too fast. Grab some extra|seconds to finish your attack.|Attack: Activate
+04:36=Well, sometimes you're just too bad in aiming. Get|some assistance using modern day technology.|Attack: Activate
+04:37=Don't fear the daylight. It will just last one turn|but will enable you to absorb the damage you do to|other hogs.|Attack: Activate
+04:38=The sniper rifle can be the most devastating weapon|in your whole arsenal, however it's very ineffective|at close quarters. The damage dealt increases with|the distance to its target.|Attack: Shoot (twice)
+04:39=Fly to other parts of the map using the flying|saucer. This hard to master utility is able to|take you to almost any position on the battlefield.|Attack: Activate|Up/Left/Right: Apply force in one direction|Long Jump: Drop grenades or similar weapons
+04:40=Set some ground on fire using this bottle filled|with (soon to be) burning liquid.|Attack: Hold to shoot with more power
+04:41=The evidence nature might even top the flying|saucer. Birdy can carry your hog around and|drop eggs on your enemies!|Attack: Activate and drop eggs|Up/Left/Right: Flap in one direction
+04:42=This portable portal device is capable|of instantly transporting you, your enemies,|or your weaponry between two points on the|terrain.|Use it wisely and your campaign will be a...|HUGE SUCCESS!|Attack: Shoot a portal|Switch: Cycle portal colours
+04:43=Make your musical debut an explosive success!|Drop a piano from the heavens, but beware...|someone needs to play it, and that may cost you|your life!|Cursor: Select target region|F1-F9: Play the piano
+04:44=This isn't just cheese, it's biological warfare!|It won't cause an huge amount of damage once|the timer reaches zero but it will definitely|poison anyone unlucky to touch the smell!|1-5: Set grenade's timer|Attack: Hold to throw with more power
+04:45=All those physics classes have finally|paid off, launch a devastating Sine|wave at your foes.|Watch out, this weapon packs quite a kick. (This weapon is incomplete)|Attack: Shoot
+04:46=Cover your foes with sizzling liquid flame.|Heartwarming!|Attack: Activate|Up/Down: Continue aiming|Left/Right: Modify spitting power
+04:47=Double the fun with two spiky, sneaky, sticky mines.|Set up a chain reaction or defend yourself (or both!)|Attack: Hold to shoot with more power (twice)
+04:48=Why should the moles get all the abuse?|Wacking a hog can be just as fun! A good|blow from this hammer will shave off one|third of a hog's health and plunge them|underground.|Attack: Activate
+04:49=Resurrect your friends!|But beware that this also resurrects your foes.|Attack: Keep attack pressed to resurrect slowly|Up: Accelerate resurrection
+
+; Game goal strings
+05:00=Game Modes
+05:01=The following rules apply
+05:02=Forts: Defend your fortress; vanquish your enemies!
+05:03=Low Gravity: Watch your step
+05:04=Invulnerability: Hogs are (almost) invulnerable
+05:05=Vampirism: Hogs will be healed for the damage dealt
+05:06=Karma: Hogs will be damaged for the damage dealt
+05:07=Protect the King: Don't let your king die!|Place the King: Pick a protected starting point for your King
+05:08=Place Hedgehogs: Place your hogs before the game starts
+05:09=Artillery: Hogs can't walk to change position
+05:10=Indestructible Terrain: Most weapons won't destroy terrain
+05:11=Shared Ammo: All teams of the same color share their ammunition
+05:12=Mine Timers: Mines will detonate after %1 second(s)
+05:13=Mine Timers: Mines will detonate instantly
+05:14=Mine Timers: Mines will detonate after 0 - 5 seconds
+05:15=Damage Modifier: All weapons will do %1% damage
+05:16=Health of all hogs is reset on end of turn
+05:17=AI hogs respawn on death
+05:18=Unlimited Attacks
+05:19=Weapons are reset on end of turn
+05:20=Weapons are not shared between hogs
--- a/share/hedgewars/Data/Maps/Knockball/map.lua Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Maps/Knockball/map.lua Tue Nov 30 22:46:47 2010 +0100
@@ -17,7 +17,7 @@
["es"] = "Partido no-tan-amistoso",
["pl"] = "Mecz Nie-Do-Końca Towarzyski",
["pt_PT"] = "Partida não muito amigável",
- ["sk"] = "Nie tak celkom priateľký zápas",
+ ["sk"] = "Nie tak celkom priateľský zápas",
["sv"] = "En inte så vänlig match",
["pt_BR"] = "Partida não muito amigável"
}
--- a/share/hedgewars/Data/Maps/TrophyRace/map.lua Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Maps/TrophyRace/map.lua Tue Nov 30 22:46:47 2010 +0100
@@ -6,7 +6,8 @@
["pt_PT"] = "TrophyRace",
["pl"] = "TrophyRace",
["es"] = "TrophyRace",
- ["pt_BR"] = "TrophyRace"
+ ["pt_BR"] = "TrophyRace",
+ ["sk"] = "Preteky o trofej"
}
local goal = {
@@ -15,7 +16,8 @@
["pt_PT"] = "Utilizando a corda, percorre o percurso do inicio ao fim o mais rápido que conseguires!",
["pl"] = "Użyj liny by jak najszybciej dotrzec od startu do mety",
["es"] = "¡Usa tu cuerda para llegar a la salida lo más rápido que puedas!",
- ["pt_BR"] = "Use sua corda para ir do início ao fim o mais rápido que você puder!"
+ ["pt_BR"] = "Use sua corda para ir do início ao fim o mais rápido que você puder!",
+ ["sk"] = "Použite lano na presun zo štartovnej pozície do cieľa tak rýchlo, ako to len viete!"
}
local done = {
@@ -24,7 +26,8 @@
["pt_PT"] = "Chegaste ao fim!| |Tempo: ",
["pl"] = "Dotarłeś do celu!| |Czas: ",
["es"] = "¡Has llegado a la meta!| |Tiempo: ",
- ["pt_BR"] = "Você alcançou o objetivo!| |Tempo: "
+ ["pt_BR"] = "Você alcançou o objetivo!| |Tempo: ",
+ ["sk"] = "Dosiahli ste cieľ!| |Čas: "
}
local eliminated = {
@@ -33,7 +36,8 @@
["pt_PT"] = "A eliminar o pior ouriço da ronda...| |% está FORA!",
["pl"] = "Eliminujemy najgorszego jeża tej rundy...| |%s ODPADŁ!",
["es"] = "Eliminando al peor erizo de esta ronda...| |¡%s está FUERA!",
- ["pt_BR"] = "Eliminando o ouriço mais lento...| |%s vai para o chuveiro!"
+ ["pt_BR"] = "Eliminando o ouriço mais lento...| |%s vai para o chuveiro!",
+ ["sk"] = "Eliminujem najhoršieho ježka tohto kola...| |%s je mimo hru!"
}
local newbesttime = {
@@ -42,7 +46,8 @@
["pt_PT"] = "NOVA volta recorde: ",
["pl"] = "NOWE najszybsze okrążenie: ",
["es"] = "NUEVA vuelta rápida: ",
- ["pt_BR"] = "NOVA volta mais rápida: "
+ ["pt_BR"] = "NOVA volta mais rápida: ",
+ ["sk"] = "NOVÉ najrýchlejšie kolo: "
}
local oldbesttime = {
@@ -51,7 +56,8 @@
["pt_PT"] = "Volta mais rápida: ",
["pl"] = "Najszybsze okrążenie: ",
["es"] = "Vuelta rápida: ",
- ["pt_BR"] = "Volta mais rápida: "
+ ["pt_BR"] = "Volta mais rápida: ",
+ ["sk"] = "Najrýchlejšie kolo: "
}
local bestclantimes = {
@@ -60,7 +66,8 @@
["pt_PT"] = "Melhores voltas por equipa: ",
["pl"] = "Najszybsze okrążenie drużyny: ",
["es"] = "Mejores tiempos por equipo: ",
- ["pt_BR"] = "Melhor volta por equipe: "
+ ["pt_BR"] = "Melhor volta por equipe: ",
+ ["sk"] = "Najrýchlejšie kolá podľa tímov: "
}
local clantime = {
@@ -69,7 +76,8 @@
["pt_PT"] = "Equipa %d: ",
["pl"] = "Drużyna %d: ",
["es"] = "Equipo %d",
- ["pt_BR"] = "Equipe %d: "
+ ["pt_BR"] = "Equipe %d: ",
+ ["sk"] = "Tím %d: "
}
local function loc(text)
--- a/share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua Tue Nov 30 22:46:47 2010 +0100
@@ -10,7 +10,8 @@
["sv"] = "Blodiga nybörjare",
["es"] = "Reclutas",
["pt_PT"] = "Recrutas",
- ["pt_BR"] = "Maldito Recrutas"
+ ["pt_BR"] = "Maldito Recrutas",
+ ["sk"] = "Regruti"
}
teamnames[1] = {
@@ -20,7 +21,8 @@
["sv"] = "Instruktör",
["es"] = "Instructores",
["pt_PT"] = "Instrutores",
- ["pt_BR"] = "Instrutores"
+ ["pt_BR"] = "Instrutores",
+ ["sk"] = "Inštruktori"
}
hognames[0] = {
@@ -30,7 +32,8 @@
["sv"] = "Joker",
["es"] = "Joker",
["pt_PT"] = "Joker",
- ["pt_BR"] = "Comediante"
+ ["pt_BR"] = "Comediante",
+ ["sk"] = "Komediant"
}
hognames[1] = {
@@ -40,7 +43,8 @@
["sv"] = "Harthog",
["es"] = "Harthog",
["pt_PT"] = "Harthog",
- ["pt_BR"] = "Harthog"
+ ["pt_BR"] = "Harthog",
+ ["sk"] = "Harthog"
}
local caption = {
@@ -50,7 +54,8 @@
["sv"] = "Grundutbildning",
["es"] = "Campamento militar",
["pt_PT"] = "Acampamento militar",
- ["pt_BR"] = "Acampamento Militar"
+ ["pt_BR"] = "Acampamento Militar",
+ ["sk"] = "Výcvikový tábor"
}
@@ -61,7 +66,8 @@
["sv"] = "Följ instruktioner!",
["es"] = "¡Sigue las órdenes!",
["pt_PT"] = "Segue as instruções!",
- ["pt_BR"] = "Siga as ordens!"
+ ["pt_BR"] = "Siga as ordens!",
+ ["sk"] = "Postupujte podľa inštrukcií!"
}
local goals = {}
@@ -73,7 +79,8 @@
["sv"] = "Lyssna på din instruktör och gör som han säger!",
["es"] = "¡Escucha atentamente a tu instructor de maniobras y sigue sus órdenes!",
["pt_PT"] = "Ouve atentamente o teu Instrutor e segue as suas ordens!",
- ["pt_BR"] = "Escute seu instrutor de escavação e siga seu líder"
+ ["pt_BR"] = "Escute seu instrutor de escavação e siga seu líder",
+ ["sk"] = "Počúvajte vášho inštruktora výcviku a vykonávajte jeho rozkazy!"
}
goals[1] = {
@@ -83,7 +90,8 @@
["sv"] = "Förstör målet för att avklara uppdraget!",
["es"] = "¡Destruye el objetivo para completar esta misión!",
["pt_PT"] = "Destrói o alvo para completar esta missão!",
- ["pt_BR"] = "Destrua o alvo para concluir a missão"
+ ["pt_BR"] = "Destrua o alvo para concluir a missão",
+ ["sk"] = "Pre ukončenie misie zneškodnite cieľ!"
}
goals[2] = {
@@ -93,7 +101,8 @@
["sv"] = "Brilliant! Du har klarat av grundutbildningen!",
["es"] = "¡Excelente! ¡Has completado la maniobra de hoy!",
["pt_PT"] = "Excelente! Completaste o treino para recrutas!",
- ["pt_BR"] = "Excelente! Você completou a manobra"
+ ["pt_BR"] = "Excelente! Você completou a manobra",
+ ["pt_BR"] = "Výborne! Prešli ste výcvikovým táborom!"
}
local failed = {
@@ -103,7 +112,8 @@
["sv"] = "Du har misslyckats! Följ instruktionerna och sjut endast på målen!",
["es"] = "¡Has fallado! ¡Sigue las instrucciones y destruye únicamente el objetivo!",
["pt_PT"] = "Falhaste! Segue as instruções e destrói apenas o alvo!",
- ["pt_BR"] = "Você falhou! Siga as instruções e atire somente no alvo"
+ ["pt_BR"] = "Você falhou! Siga as instruções e atire somente no alvo",
+ ["sk"] = "Prehrali ste! Nasledujte inštrukcie a strieľajte iba na cieľ!"
}
local drill = {}
@@ -115,7 +125,8 @@
["sv"] = "Dåså, din mask!",
["es"] = "¡Muy bien, escoria!",
["pt_PT"] = "Bom trabalho verme!",
- ["pt_BR"] = "Parabéns escória"
+ ["pt_BR"] = "Parabéns escória",
+ ["sk"] = "Počúvaj, ty červík!"
}
drill[1] = {
@@ -125,7 +136,8 @@
["sv"] = "Visa att du inte är så värdelös!",
["es"] = "Demuéstrame que no eres tan inútil como pareces.",
["pt_PT"] = "Prova-me que não és tão inútil como pareces.",
- ["pt_BR"] = "Mostre que você não é um inútil."
+ ["pt_BR"] = "Mostre que você não é um inútil.",
+ ["sk"] = "Dokáž, že nie si na svete úplne zbytočným."
}
drill[2] = {
@@ -135,7 +147,8 @@
["sv"] = "Använd [vänster] för att gå åt vänster!",
["es"] = "¡Aprieta [izquierda] para desplazarte a la izquierda!",
["pt_PT"] = "Carrega [esquerda] para te moveres para a esquerda!",
- ["pt_BR"] = "Use [esquerda] para mover para a esquerda"
+ ["pt_BR"] = "Use [esquerda] para mover para a esquerda",
+ ["sk"] = "Stlačte [vľavo] pre pohyb doľava"
}
drill[3] = {
@@ -145,7 +158,8 @@
["sv"] = "Bra! Använd nu [höger] för att gå tillbaka!",
["es"] = "¡Muy bien! ¡Ahora presiona [derecha] para volver!",
["pt_PT"] = "Muito bem! Agora pressiona [direita] para voltar!",
- ["pt_BR"] = "Bom! Agora use [direita] para voltar"
+ ["pt_BR"] = "Bom! Agora use [direita] para voltar",
+ ["sk"] = "Dobre! Teraz použite [vpravo] a vráťte sa naspäť!"
}
drill[4] = {
@@ -155,7 +169,8 @@
["sv"] = "Utmärkt!",
["es"] = "¡Excelente!",
["pt_PT"] = "Excelente!",
- ["pt_BR"] = "Excelente!"
+ ["pt_BR"] = "Excelente!",
+ ["sk"] = "Výborne!"
}
drill[5] = {
@@ -165,7 +180,8 @@
["sv"] = "Hoppa nu åt vänster med hjälp av [enter]!",
["es"] = "¡Ahora salta hacia la izquierda usando [intro]!",
["pt_PT"] = "Agora salta para a esquerda pressionando [retrocesso]!",
- ["pt_BR"] = "Agora pule para a esquerda usando [return"
+ ["pt_BR"] = "Agora pule para a esquerda usando [return]!",
+ ["sk"] = "Teraz skočte doľava stlačením [enter]!"
}
drill[6] = {
@@ -175,7 +191,8 @@
["sv"] = "Använd [upp] och [ner] för att sikta!",
["es"] = "Presiora [arriba] y [abajo] para apuntar.",
["pt_PT"] = "Pressiona [cima] e [baixo] para apontar.",
- ["pt_BR"] = "Pressione [acima] e [abaixo] para mirar."
+ ["pt_BR"] = "Pressione [acima] e [abaixo] para mirar.",
+ ["sk"] = "Stlačte [hore] a [dole] pre mierenie."
}
drill[7] = {
@@ -185,7 +202,8 @@
["sv"] = "Håll ner [mellanslag] för att få kraft och släpp för att skjuta!",
["es"] = "Mantén presionada la [barra espaciadora] para controlar la fuerza del disparo y suéltala para disparar.",
["pt_PT"] = "Mantem a [barra de espaços] pressionada para controlar a força do tiro e larga-a para disparar.",
- ["pt_BR"] = "Mantenha pressionado [espaço] para aumentar a força do seu tiro e solte para atirar"
+ ["pt_BR"] = "Mantenha pressionado [espaço] para aumentar a força do seu tiro e solte para atirar",
+ ["sk"] = "Držte stlačený [medzerník] pre nabíjanie, jeho uvoľnením vystrelíte."
}
drill[8] = {
@@ -195,7 +213,8 @@
["sv"] = "Förstör målet för att avsluta din grundutbildning!",
["es"] = "¡Destruye el objetivo para completar el entrenamiento básico!",
["pt_PT"] = "Destrói o alvo para completar o treino básico!",
- ["pt_BR"] = "Destrua o alvo para terminar o treino básico"
+ ["pt_BR"] = "Destrua o alvo para terminar o treino básico",
+ ["sk"] = "Zneškodnite cieľ na ukončenie základného výcviku!"
}
local function loc(text)
--- a/share/hedgewars/Data/Missions/Training/Bazooka.lua Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Missions/Training/Bazooka.lua Tue Nov 30 22:46:47 2010 +0100
@@ -22,7 +22,8 @@
["pl"] = "Trening bazooki",
["pt_PT"] = "Treino com Bazuca",
["pt_BR"] = "Treino com a Bazuca",
- ["sv"] = "Bazookaträning"
+ ["sv"] = "Bazookaträning",
+ ["sk"] = "Tréning s bazukou"
-- To add other languages, just add lines similar to the
-- existing ones - don't forget the trailing ","!
}
@@ -34,7 +35,8 @@
["pl"] = "Potrenuj celność",
["pt_PT"] = "Pratica a tua pontaria",
["pt_BR"] = "Pratique a sua pontaria",
- ["sv"] = "Siktesövning"
+ ["sv"] = "Siktesövning",
+ ["sk"] = "Tréning presnosti"
}
local goal = {
@@ -44,7 +46,8 @@
["pl"] = "Zniszcz wszystkie cele zanim upłynie czas.|W tej misji masz nieskończoną ilość amunicji.",
["pt_PT"] = "Destrói todos os alvos antes do tempo terminar.|Tens munições infinitas para esta missão.",
["pt_BR"] = "Destrua todos os alvos antes que o tempo acabe.|Você tem munição infinita para esta missão.",
- ["sv"] = "Förstör alla målen innan din tid tar slut.|Du har obegränsad ammunition för deta uppdrag"
+ ["sv"] = "Förstör alla målen innan din tid tar slut.|Du har obegränsad ammunition för deta uppdrag",
+ ["sk"] = "Zneškodnite všetky ciele pred vypršaním času.|Na túto misiu máte neobmedzené množstvo streliva."
}
local timeout = {
@@ -54,7 +57,8 @@
["pl"] = "Ajajaj! Koniec czasu! Spróbuj jeszcze raz.",
["pt_PT"] = "Oh não! Acabou o tempo! Tenta novamente.",
["pt_BR"] = "Oh não! O tempo acabou! Tente novamente.",
- ["sv"] = "Åh nej! Tiden är ute! Pröva igen."
+ ["sv"] = "Åh nej! Tiden är ute! Pröva igen.",
+ ["sk"] = "Ale nie! Čas vypršal! Tak to skúste znovu."
}
local success = {
@@ -64,7 +68,8 @@
["pl"] = "Gratulacje! Zniszczyłeś wszystkie cele przed upłynięciem czasu.",
["pt_PT"] = "Parabéns! Eliminaste todos os alvos|dentro do tempo limite.",
["pt_BR"] = "Parabéns! Você eliminou todos os alvos|dentro do tempo limite.",
- ["sv"] = "Grattis! Du har förstört alla målen inom den|tillåtna tidsramen."
+ ["sv"] = "Grattis! Du har förstört alla målen inom den|tillåtna tidsramen.",
+ ["sk"] = "Gratulujem! Zneškodnili ste všetky ciele|v stanovenom čase."
}
local teamname = {
@@ -74,7 +79,8 @@
["pl"] = "Bazookinierzy",
["pt_PT"] = "Bazuqueiros",
["pt_BR"] = "Bazuqueiros",
- ["sv"] = "Bazookalaget"
+ ["sv"] = "Bazookalaget",
+ ["sk"] = "Bazuka tím"
}
local hogname = {
@@ -84,7 +90,8 @@
["pl"] = "Strzelec",
["pt_PT"] = "Comando",
["pt_BR"] = "Artilheiro",
- ["sv"] = "Jägare"
+ ["sv"] = "Jägare",
+ ["sk"] = "Lovec"
}
-- To handle missing texts we define a small wrapper function that
--- a/share/hedgewars/Data/Missions/Training/Shotgun.lua Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Missions/Training/Shotgun.lua Tue Nov 30 22:46:47 2010 +0100
@@ -22,7 +22,8 @@
["pl"] = "Trening strzelecki",
["pt_PT"] = "Treino com Caçadeira",
["pt_BR"] = "Treino com a Escopeta",
- ["sv"] = "Hagelgevärsträning"
+ ["sv"] = "Hagelgevärsträning",
+ ["sk"] = "Tréning s brokovnicou"
-- To add other languages, just add lines similar to the
-- existing ones - don't forget the trailing ","!
}
@@ -34,7 +35,8 @@
["pl"] = "Potrenuj celność",
["pt_PT"] = "Pratica a tua pontaria",
["pt_BR"] = "Pratique a sua pontaria",
- ["sv"] = "Siktesövning"
+ ["sv"] = "Siktesövning",
+ ["sk"] = "Tréning presnosti"
}
local goal = {
@@ -44,7 +46,8 @@
["pl"] = "Zniszcz wszystkie cele zanim upłynie czas.|W tej misji masz nieskończoną ilość amunicji.",
["pt_PT"] = "Destrói todos os alvos antes do tempo terminar.|Tens munições infinitas para esta missão.",
["pt_BR"] = "Destrua todos os alvos antes que o tempo acabe.|Você tem munição infinita para esta missão.",
- ["sv"] = "Förstör alla målen innan din tid tar slut.|Du har obegränsad ammunition för deta uppdrag"
+ ["sv"] = "Förstör alla målen innan din tid tar slut.|Du har obegränsad ammunition för deta uppdrag",
+ ["sk"] = "Zneškodnite všetky ciele pred vypršaním času.|Na túto misiu máte neobmedzené množstvo streliva."
}
local timeout = {
@@ -54,7 +57,8 @@
["pl"] = "Ajajaj! Koniec czasu! Spróbuj jeszcze raz.",
["pt_PT"] = "Oh não! Acabou o tempo! Tenta novamente.",
["pt_BR"] = "Oh não! O tempo acabou! Tente novamente.",
- ["sv"] = "Åh nej! Tiden är ute! Pröva igen."
+ ["sv"] = "Åh nej! Tiden är ute! Pröva igen.",
+ ["sk"] = "Ale nie! Čas vypršal! Tak to skúste znovu."
}
local success = {
@@ -64,7 +68,8 @@
["pl"] = "Gratulacje! Zniszczyłeś wszystkie cele przed upłynięciem czasu.",
["pt_PT"] = "Parabéns! Eliminaste todos os alvos|dentro do tempo limite.",
["pt_BR"] = "Parabéns! Você eliminou todos os alvos|dentro do tempo limite.",
- ["sv"] = "Grattis! Du har förstört alla målen inom den|tillåtna tidsramen."
+ ["sv"] = "Grattis! Du har förstört alla målen inom den|tillåtna tidsramen.",
+ ["sk"] = "Gratulujem! Zneškodnili ste všetky ciele|v stanovenom čase."
}
local teamname = {
@@ -74,7 +79,8 @@
["pl"] = "Shotgun Team",
["pt_PT"] = "Caçadores",
["pt_PT"] = "Carabineiros",
- ["sv"] = "Hagelgevärslaget"
+ ["sv"] = "Hagelgevärslaget",
+ ["sk"] = "Shotgun tím"
}
local hogname = {
@@ -84,7 +90,8 @@
["pl"] = "Strzelec",
["pt_PT"] = "Comando",
["pt_BR"] = "Caçador",
- ["sv"] = "Jägare"
+ ["sv"] = "Jägare",
+ ["sk"] = "Lovec"
}
-- To handle missing texts we define a small wrapper function that
--- a/share/hedgewars/Data/Missions/Training/SniperRifle.lua Mon Nov 29 09:11:31 2010 +0100
+++ b/share/hedgewars/Data/Missions/Training/SniperRifle.lua Tue Nov 30 22:46:47 2010 +0100
@@ -22,7 +22,8 @@
["pl"] = "Trening Snajperski",
["pt_PT"] = "Treino com Sniper",
["pt_BR"] = "Treino com o Rifle Sniper",
- ["sv"] = "Prickskyttesträning"
+ ["sv"] = "Prickskyttesträning",
+ ["sk"] = "Tréning pre ostreľovačov"
-- To add other languages, just add lines similar to the
-- existing ones - don't forget the trailing ","!
}
@@ -34,7 +35,8 @@
["pl"] = "Potrenuj celność",
["pt_PT"] = "Pratica a tua pontaria",
["pt_BR"] = "Pratique a sua pontaria",
- ["sv"] = "Siktesövning"
+ ["sv"] = "Siktesövning",
+ ["sk"] = "Tréning presnosti"
}
local goal = {
@@ -44,7 +46,8 @@
["pl"] = "Zniszcz wszystkie cele zanim upłynie czas.|W tej misji masz nieskończoną ilość amunicji.",
["pt_PT"] = "Destrói todos os alvos antes do tempo terminar.|Tens munições infinitas para esta missão.",
["pt_BR"] = "Destrua todos os alvos antes que o tempo acabe.|Você tem munição infinita para esta missão.",
- ["sv"] = "Förstör alla målen innan din tid tar slut.|Du har obegränsad ammunition för deta uppdrag"
+ ["sv"] = "Förstör alla målen innan din tid tar slut.|Du har obegränsad ammunition för deta uppdrag",
+ ["sk"] = "Zneškodnite všetky ciele pred vypršaním času.|Na túto misiu máte neobmedzené množstvo streliva."
}
local timeout = {
@@ -54,7 +57,8 @@
["pl"] = "Ajajaj! Koniec czasu! Spróbuj jeszcze raz.",
["pt_PT"] = "Oh não! Acabou o tempo! Tenta novamente.",
["pt_BR"] = "Oh não! O tempo acabou! Tente novamente.",
- ["sv"] = "Åh nej! Tiden är ute! Pröva igen."
+ ["sv"] = "Åh nej! Tiden är ute! Pröva igen.",
+ ["sk"] = "Ale nie! Čas vypršal! Tak to skúste znovu."
}
local success = {
@@ -64,7 +68,8 @@
["pl"] = "Gratulacje! Zniszczyłeś wszystkie cele przed upłynięciem czasu.",
["pt_PT"] = "Parabéns! Eliminaste todos os alvos|dentro do tempo limite.",
["pt_BR"] = "Parabéns! Você eliminou todos os alvos|dentro do tempo limite.",
- ["sv"] = "Grattis! Du har förstört alla målen inom den|tillåtna tidsramen."
+ ["sv"] = "Grattis! Du har förstört alla målen inom den|tillåtna tidsramen.",
+ ["sk"] = "Gratulujem! Zneškodnili ste všetky ciele|v stanovenom čase."
}
local teamname = {
@@ -73,7 +78,8 @@
["es"] = "Fusileros",
["pl"] = "Snajperzy",
["pt_BR"] = "Franco-Atiradores",
- ["sv"] = "Prickskyttarna"
+ ["sv"] = "Prickskyttarna",
+ ["sk"] = "Ostreľovači"
}
local hogname = {
@@ -83,7 +89,8 @@
["pl"] = "Strzelec",
["pt_PT"] = "Comando",
["pt_BR"] = "Caçador",
- ["sv"] = "Jägare"
+ ["sv"] = "Jägare",
+ ["sk"] = "Lovec"
}
-- To handle missing texts we define a small wrapper function that
Binary file share/hedgewars/Data/Sounds/voices/British/PoisonCough.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/British/PoisonMoan.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Classic/PoisonCough.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Classic/PoisonMoan.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Mobster/PoisonCough.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Mobster/PoisonMoan.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Pirate/PoisonCough.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Pirate/PoisonMoan.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Robot/PoisonCough.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Robot/PoisonMoan.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Russian/PoisonCough.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Russian/PoisonMoan.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Singer/PoisonCough.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Singer/PoisonMoan.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Surfer/PoisonCough.ogg has changed
Binary file share/hedgewars/Data/Sounds/voices/Surfer/PoisonMoan.ogg has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/PascalParser.hs Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,98 @@
+module PascalParser where
+
+import Text.ParserCombinators.Parsec
+import Control.Monad
+
+data PascalUnit =
+ Program Identificator Implementation FunctionBody
+ | Unit Identificator Interface Implementation (Maybe Initialize) (Maybe Finalize)
+ deriving Show
+
+data Interface = Interface Uses TypesAndVars
+ deriving Show
+data Implementation = Implementation Uses TypesAndVars Functions
+ deriving Show
+data Functions = Functions [Function]
+ deriving Show
+data Function = Function String
+ deriving Show
+data Identificator = Identificator String
+ deriving Show
+data FunctionBody = FunctionBody String
+ deriving Show
+data TypesAndVars = TypesAndVars String
+ deriving Show
+data Initialize = Initialize Functions
+ deriving Show
+data Finalize = Finalize Functions
+ deriving Show
+data Uses = Uses [Identificator]
+ deriving Show
+
+parsePascalUnit :: String -> Either ParseError PascalUnit
+parsePascalUnit = parse pascalUnit "unit"
+ where
+ comments = skipMany (comment >> spaces)
+ identificator = do
+ spaces
+ l <- letter <|> oneOf "_"
+ ls <- many (alphaNum <|> oneOf "_")
+ spaces
+ return $ Identificator (l:ls)
+
+ pascalUnit = do
+ spaces
+ comments
+ u <- choice [program, unit]
+ comments
+ spaces
+ return u
+
+ comment = choice [
+ char '{' >> manyTill anyChar (try $ char '}')
+ , string "(*" >> manyTill anyChar (try $ string "*)")
+ , string "//" >> manyTill anyChar (try newline)
+ ]
+
+ unit = do
+ name <- unitName
+ spaces
+ comments
+ int <- string "interface" >> interface
+ manyTill anyChar (try $ string "implementation")
+ spaces
+ comments
+ impl <- implementation
+ return $ Unit name int impl Nothing Nothing
+ where
+ unitName = between (string "unit") (char ';') identificator
+
+ interface = do
+ spaces
+ comments
+ u <- uses
+ return $ Interface u (TypesAndVars "")
+
+ program = do
+ name <- programName
+ spaces
+ comments
+ impl <- implementation
+ return $ Program name impl (FunctionBody "")
+ where
+ programName = between (string "program") (char ';') identificator
+
+ implementation = do
+ u <- uses
+ manyTill anyChar (try $ string "end.")
+ return $ Implementation u (TypesAndVars "") (Functions [])
+
+ uses = liftM Uses (option [] u)
+ where
+ u = do
+ string "uses"
+ spaces
+ u <- (identificator >>= \i -> spaces >> return i) `sepBy1` (char ',' >> spaces)
+ char ';'
+ spaces
+ return u
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/drawMapTest.pro Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,11 @@
+# -------------------------------------------------
+# Project created by QtCreator 2010-11-27T22:18:20
+# -------------------------------------------------
+TARGET = drawMapTest
+TEMPLATE = app
+SOURCES += main.cpp \
+ mainwindow.cpp \
+ drawmapscene.cpp
+HEADERS += mainwindow.h \
+ drawmapscene.h
+FORMS += mainwindow.ui
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/drawmapscene.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,127 @@
+#include <QDebug>
+#include <QGraphicsSceneMouseEvent>
+#include <QGraphicsPathItem>
+#include <QtEndian>
+
+#include "drawmapscene.h"
+
+template <class T> T sqr(const T & x)
+{
+ return x*x;
+}
+
+DrawMapScene::DrawMapScene(QObject *parent) :
+ QGraphicsScene(parent),
+ m_pen(Qt::yellow),
+ m_brush(Qt::yellow)
+{
+ setSceneRect(0, 0, 4096, 2048);
+
+ QLinearGradient gradient(0, 0, 0, 2048);
+ gradient.setColorAt(0, QColor(60, 60, 155));
+ gradient.setColorAt(1, QColor(155, 155, 60));
+ setBackgroundBrush(QBrush(gradient));
+
+ m_pen.setWidth(67);
+ m_pen.setJoinStyle(Qt::RoundJoin);
+ m_pen.setCapStyle(Qt::RoundCap);
+ m_currPath = 0;
+}
+
+void DrawMapScene::mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent)
+{
+
+ qDebug() << "move" << mouseEvent->scenePos();
+
+ if(m_currPath && (mouseEvent->buttons() & Qt::LeftButton))
+ {
+ QPainterPath path = m_currPath->path();
+ path.lineTo(mouseEvent->scenePos());
+ paths.last().append(mouseEvent->scenePos().toPoint());
+ m_currPath->setPath(path);
+
+ emit pathChanged();
+ }
+}
+
+void DrawMapScene::mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent)
+{
+ qDebug() << "press" << mouseEvent->scenePos();
+
+ m_currPath = addPath(QPainterPath(), m_pen);
+
+ QPainterPath path = m_currPath->path();
+ QPointF p = mouseEvent->scenePos();
+ p += QPointF(0.01, 0.01);
+ path.moveTo(p);
+ path.lineTo(mouseEvent->scenePos());
+ paths.append(QList<QPoint>() << mouseEvent->scenePos().toPoint());
+ m_currPath->setPath(path);
+
+ emit pathChanged();
+}
+
+void DrawMapScene::mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent)
+{
+ qDebug() << "release" << mouseEvent->scenePos();
+
+ m_currPath = 0;
+}
+
+void DrawMapScene::undo()
+{
+ if(items().size())
+ {
+ removeItem(items().first());
+ paths.removeLast();
+
+ emit pathChanged();
+ }
+}
+
+QByteArray DrawMapScene::encode()
+{
+ QByteArray b;
+
+ foreach(QList<QPoint> points, paths)
+ {
+ int cnt = 0;
+ foreach(QPoint point, points)
+ {
+ qint16 px = qToBigEndian((qint16)point.x());
+ qint16 py = qToBigEndian((qint16)point.y());
+ quint8 flags = 2;
+ if(cnt) flags |= 0x80;
+ b.append((const char *)&flags, 1);
+ b.append((const char *)&px, 2);
+ b.append((const char *)&py, 2);
+
+ ++cnt;
+ }
+
+ }
+
+ return b;
+}
+
+void DrawMapScene::simplify()
+{
+ for(int pit = 0; pit < paths.size(); ++pit)
+ {
+ QList<QPoint> points = paths[pit];
+
+ QPoint prevPoint = points.first();
+ int i = 1;
+ while(i < points.size())
+ {
+ if(sqr(prevPoint.x() - points[i].x()) + sqr(prevPoint.y() - points[i].y()) < 1000)
+ points.removeAt(i);
+ else
+ ++i;
+ }
+
+ paths[pit] = points;
+ }
+
+ emit pathChanged();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/drawmapscene.h Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,36 @@
+#ifndef DRAWMAPSCENE_H
+#define DRAWMAPSCENE_H
+
+#include <QGraphicsScene>
+
+class QGraphicsPathItem;
+
+typedef QList<QList<QPoint> > Paths;
+
+class DrawMapScene : public QGraphicsScene
+{
+Q_OBJECT
+public:
+ explicit DrawMapScene(QObject *parent = 0);
+
+ QByteArray encode();
+
+signals:
+ void pathChanged();
+
+public slots:
+ void undo();
+ void simplify();
+
+private:
+ QPen m_pen;
+ QBrush m_brush;
+ QGraphicsPathItem * m_currPath;
+ Paths paths;
+
+ virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
+ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
+};
+
+#endif // DRAWMAPSCENE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/main.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,10 @@
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+ return a.exec();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/mainwindow.cpp Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,51 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+#include "drawmapscene.h"
+
+MainWindow::MainWindow(QWidget *parent) :
+ QMainWindow(parent),
+ ui(new Ui::MainWindow)
+{
+ ui->setupUi(this);
+
+ scene = new DrawMapScene(this);
+ ui->graphicsView->setScene(scene);
+
+ connect(ui->pbUndo, SIGNAL(clicked()), scene, SLOT(undo()));
+ connect(scene, SIGNAL(pathChanged()), this, SLOT(scene_pathChanged()));
+}
+
+MainWindow::~MainWindow()
+{
+ delete ui;
+}
+
+void MainWindow::changeEvent(QEvent *e)
+{
+ QMainWindow::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+void MainWindow::resizeEvent(QResizeEvent * event)
+{
+ Q_UNUSED(event);
+
+ if(ui->graphicsView)
+ ui->graphicsView->fitInView(ui->graphicsView->scene()->sceneRect(), Qt::KeepAspectRatio);
+}
+
+void MainWindow::scene_pathChanged()
+{
+ ui->plainTextEdit->setPlainText(scene->encode().toBase64());
+}
+
+void MainWindow::on_pbSimplify_clicked()
+{
+ scene->simplify();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/mainwindow.h Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,32 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+namespace Ui {
+ class MainWindow;
+}
+
+class DrawMapScene;
+
+class MainWindow : public QMainWindow {
+ Q_OBJECT
+public:
+ MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::MainWindow *ui;
+ DrawMapScene * scene;
+
+ virtual void resizeEvent(QResizeEvent * event);
+
+private slots:
+ void on_pbSimplify_clicked();
+ void scene_pathChanged();
+};
+
+#endif // MAINWINDOW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/mainwindow.ui Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="2">
+ <widget class="QGraphicsView" name="graphicsView"/>
+ </item>
+ <item row="1" column="2">
+ <widget class="QPlainTextEdit" name="plainTextEdit">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>80</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" rowspan="2">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPushButton" name="pbUndo">
+ <property name="text">
+ <string>Undo</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pbSimplify">
+ <property name="text">
+ <string>Simplify</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/unitCycles.hs Tue Nov 30 22:46:47 2010 +0100
@@ -0,0 +1,46 @@
+module Main where
+
+import PascalParser
+import System
+import Control.Monad
+import Data.Either
+import Data.List
+import Data.Graph
+import Data.Maybe
+
+unident :: Identificator -> String
+unident (Identificator s) = s
+
+extractUnits :: PascalUnit -> (String, [String])
+extractUnits (Program (Identificator name) (Implementation (Uses idents) _ _) _) = ("program " ++ name, map unident idents)
+extractUnits (Unit (Identificator name) (Interface (Uses idents1) _) (Implementation (Uses idents2) _ _) _ _) = (name, map unident $ idents1 ++ idents2)
+
+f :: [(String, [String])] -> String
+f = unlines . map showSCC . stronglyConnComp . map (\(a, b) -> (a, a, b))
+ where
+ showSCC (AcyclicSCC v) = v
+ showSCC (CyclicSCC vs) = intercalate ", " vs
+
+myf :: [(String, [String])] -> String
+myf d = unlines . map (findCycle . fst) $ d
+ where
+ findCycle :: String -> String
+ findCycle searched = searched ++ ": " ++ (intercalate ", " $ fc searched [])
+ where
+ fc :: String -> [String] -> [String]
+ fc curSearch visited = let uses = curSearch `lookup` d; res = dropWhile null . map t $ fromJust uses in if isNothing uses || null res then [] else head res
+ where
+ t u =
+ if u == searched then
+ [u]
+ else
+ if u `elem` visited then
+ []
+ else
+ let chain = fc u (u:visited) in if null chain then [] else u:chain
+
+
+main = do
+ fileNames <- getArgs
+ files <- mapM readFile fileNames
+ putStrLn . myf . map extractUnits . rights . map parsePascalUnit $ files