Ok. This should pull 0.9.14.1 server into default
--- a/.hgtags Mon Dec 06 03:07:03 2010 +0100
+++ b/.hgtags Sun Dec 19 13:31:55 2010 -0500
@@ -22,3 +22,5 @@
0000000000000000000000000000000000000000 Hedgewars-iOS-1.0.1
3620607258cdc1213dce20cb6ad7872f6b8085e0 Hedgewars-iOS-1.0.1
adffb668f06e265b45d1e4aedc283e6f4e5ba7e8 Hedgewars-iOS-1.1
+ede569bb76f389bd5dfbb7ebf68af3087e3e881c Hedgewars-iOS-1.2
+a5735e877aae61cd705265e2f8c0c7ad08d45f0e Hedgewars-iOS-1.2.1
--- a/CMakeLists.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/CMakeLists.txt Sun Dec 19 13:31:55 2010 -0500
@@ -20,7 +20,7 @@
)
STRING(REGEX REPLACE "([0-9a-zA-Z]+)(.*) ([0-9]+)(.*)" "\\3:\\1" version_suffix ${version_suffix})
MESSAGE(STATUS "Building revision ${version_suffix}")
- set(version_suffix ".${version_suffix}")
+ set(version_suffix "-${version_suffix}")
ENDIF()
ENDIF()
ELSE()
--- a/ChangeLog.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/ChangeLog.txt Sun Dec 19 13:31:55 2010 -0500
@@ -11,14 +11,14 @@
+ New maps: ShoppaKing, Sticks, TrophyRace (Mission)
+ New utilities: Portal Gun, Resurrector
+ New weapons: Flamethrower, Hammer, Old Limburger, Piano Strike, Sticky Mines
- + Weapons' projectiles will how be launched from their barrels instead of the hog's center
+ + Weapons' projectiles will now be launched from their barrels instead of the hog's center
+ Flying Saucers may be used for moving below the water surface
+ New default game schemes: Clean Slate, Fort Mode, Timeless, Thinking with Portals, King Mode
+ New default weapon set: Clean Slate, Thinking with Portals
+ Bomb clusters/Melon parts inherit some of the original bomb's speed
+ Extended game statistics
+ Improved health bar updating
- + Hogs that blow themselves up will use triggers in they team color
+ + Hogs that blow themselves up will use triggers in their team color
+ Settings allow better control over the level of details/effects
+ Improved Lua support
+ On empty ammo switch to no weapon rather than the first available one (to avoid shooting by accident)
--- a/QTfrontend/CMakeLists.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/CMakeLists.txt Sun Dec 19 13:31:55 2010 -0500
@@ -23,137 +23,142 @@
include_directories(${SDL_INCLUDE_DIR})
include_directories(${SDLMIXER_INCLUDE_DIR})
if(UNIX)
- # HACK: in freebsd cannot find iconv.h included via SDL.h
- include_directories("/usr/local/include")
+ # HACK: in freebsd cannot find iconv.h included via SDL.h
+ include_directories("/usr/local/include")
endif(UNIX)
if(WIN32 AND NOT UNIX)
- set(HEDGEWARS_BINDIR ".")
- set(HEDGEWARS_DATADIR "../share/")
+ set(HEDGEWARS_BINDIR ".")
+ set(HEDGEWARS_DATADIR "../share/")
add_definitions(-DUSE_XFIRE)
else()
- set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX})
- if(DEFINED DATA_INSTALL_DIR)
- set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR})
- else()
- set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/)
- endif()
+ set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX})
+ if(DEFINED DATA_INSTALL_DIR)
+ set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR})
+ else()
+ set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/)
+ endif()
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hwconsts.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp)
-set( hwfr_src
- game.cpp
- main.cpp
- hwform.cpp
- team.cpp
- namegen.cpp
- teamselect.cpp
- teamselhelper.cpp
- frameTeam.cpp
- vertScrollArea.cpp
- gameuiconfig.cpp
- ui_hwform.cpp
- gamecfgwidget.cpp
- pages.cpp
- SquareLabel.cpp
- hats.cpp
- hedgehogerWidget.cpp
- hwmap.cpp
- mapContainer.cpp
- tcpBase.cpp
- about.cpp
- proto.cpp
- fpsedit.cpp
- netserver.cpp
- newnetclient.cpp
- netudpserver.cpp
- netudpwidget.cpp
- netregister.cpp
- netserverslist.cpp
- chatwidget.cpp
- binds.cpp
- SDLs.cpp
- playrecordpage.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp
- selectWeapon.cpp
- itemNum.cpp
- input_ip.cpp
- igbox.cpp
- weaponItem.cpp
- statsPage.cpp
- misc.cpp
- ammoSchemeModel.cpp
- togglebutton.cpp
- bgwidget.cpp
- achievements.cpp
- )
+set(hwfr_src
+ game.cpp
+ main.cpp
+ hwform.cpp
+ team.cpp
+ namegen.cpp
+ teamselect.cpp
+ teamselhelper.cpp
+ frameTeam.cpp
+ vertScrollArea.cpp
+ gameuiconfig.cpp
+ ui_hwform.cpp
+ gamecfgwidget.cpp
+ pages.cpp
+ SquareLabel.cpp
+ hats.cpp
+ hedgehogerWidget.cpp
+ hwmap.cpp
+ mapContainer.cpp
+ tcpBase.cpp
+ about.cpp
+ proto.cpp
+ fpsedit.cpp
+ netserver.cpp
+ newnetclient.cpp
+ netudpserver.cpp
+ netudpwidget.cpp
+ netregister.cpp
+ netserverslist.cpp
+ chatwidget.cpp
+ binds.cpp
+ SDLs.cpp
+ playrecordpage.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp
+ selectWeapon.cpp
+ itemNum.cpp
+ input_ip.cpp
+ igbox.cpp
+ weaponItem.cpp
+ statsPage.cpp
+ misc.cpp
+ ammoSchemeModel.cpp
+ togglebutton.cpp
+ bgwidget.cpp
+ achievements.cpp
+ qaspectratiolayout.cpp
+ drawmapwidget.cpp
+ drawmapscene.cpp
+ )
#xfire integration
if(WIN32)
- set(hwfr_src ${hwfr_src} xfire.cpp ../misc/xfire/xfiregameclient.cpp)
+ set(hwfr_src ${hwfr_src} xfire.cpp ../misc/xfire/xfiregameclient.cpp)
endif(WIN32)
if(MINGW)
- # resource compilation for mingw
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o
- COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR}
- -i ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars.rc
- -o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
- set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
+ # resource compilation for mingw
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o
+ COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR}
+ -i ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars.rc
+ -o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
+ set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
else(MINGW)
- set(hwfr_src ${hwfr_src} hedgewars.rc)
+ set(hwfr_src ${hwfr_src} hedgewars.rc)
endif(MINGW)
-set( hwfr_moc_hdrs
- game.h
- hats.h
- hwform.h
- teamselect.h
- teamselhelper.h
- frameTeam.h
- vertScrollArea.h
- gameuiconfig.h
- gamecfgwidget.h
- pages.h
- SquareLabel.h
- hedgehogerWidget.h
- hwmap.h
- mapContainer.h
- tcpBase.h
- about.h
- proto.h
- fpsedit.h
- netserver.h
- newnetclient.h
- netudpserver.h
- netudpwidget.h
- netregister.h
- netserverslist.h
- chatwidget.h
- SDLs.h
- playrecordpage.h
- selectWeapon.h
- itemNum.h
- input_ip.h
- igbox.h
- weaponItem.h
- statsPage.h
- misc.h
- ammoSchemeModel.h
- togglebutton.h
- bgwidget.h
- )
+set(hwfr_moc_hdrs
+ game.h
+ hats.h
+ hwform.h
+ teamselect.h
+ teamselhelper.h
+ frameTeam.h
+ vertScrollArea.h
+ gameuiconfig.h
+ gamecfgwidget.h
+ pages.h
+ SquareLabel.h
+ hedgehogerWidget.h
+ hwmap.h
+ mapContainer.h
+ tcpBase.h
+ about.h
+ proto.h
+ fpsedit.h
+ netserver.h
+ newnetclient.h
+ netudpserver.h
+ netudpwidget.h
+ netregister.h
+ netserverslist.h
+ chatwidget.h
+ SDLs.h
+ playrecordpage.h
+ selectWeapon.h
+ itemNum.h
+ input_ip.h
+ igbox.h
+ weaponItem.h
+ statsPage.h
+ misc.h
+ ammoSchemeModel.h
+ togglebutton.h
+ bgwidget.h
+ qaspectratiolayout.h
+ drawmapwidget.h
+ drawmapscene.h
+ )
-set( hwfr_hdrs
- binds.h
- ui_hwform.h
- predefteams.h
- KB.h
- hwconsts.h
- )
+set(hwfr_hdrs
+ binds.h
+ ui_hwform.h
+ KB.h
+ hwconsts.h
+ )
set(hwfr_rez hedgewars.qrc)
@@ -163,45 +168,45 @@
if(APPLE)
- set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m)
- set(HW_LINK_LIBS IOKit)
+ set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m)
+ set(HW_LINK_LIBS IOKit)
- find_package(Sparkle)
- if(SPARKLE_FOUND)
+ find_package(Sparkle)
+ if(SPARKLE_FOUND)
add_definitions(-DSPARKLE_ENABLED)
- set(hwfr_src ${hwfr_src} AutoUpdater.cpp SparkleAutoUpdater.mm)
+ set(hwfr_src ${hwfr_src} AutoUpdater.cpp SparkleAutoUpdater.mm)
set(HW_LINK_LIBS ${SPARKLE_LIBRARY} ${HW_LINK_LIBS})
- endif()
+ endif()
endif()
add_executable(hedgewars WIN32
- ${hwfr_src}
- ${hwfr_moc_srcs}
- ${hwfr_hdrs}
- ${hwfr_rez_src}
- )
+ ${hwfr_src}
+ ${hwfr_moc_srcs}
+ ${hwfr_hdrs}
+ ${hwfr_rez_src}
+ )
-set( HW_LINK_LIBS
- ${QT_LIBRARIES}
- ${SDL_LIBRARY}
- ${SDLMIXER_LIBRARY}
- ${HW_LINK_LIBS}
- )
+set(HW_LINK_LIBS
+ ${QT_LIBRARIES}
+ ${SDL_LIBRARY}
+ ${SDLMIXER_LIBRARY}
+ ${HW_LINK_LIBS}
+ )
if(WIN32 AND NOT UNIX)
- if(NOT SDL_LIBRARY)
- set(HW_LINK_LIBS ${HW_LINK_LIBS} SDL)
- endif()
+ if(NOT SDL_LIBRARY)
+ set(HW_LINK_LIBS ${HW_LINK_LIBS} SDL)
+ endif()
- set( HW_LINK_LIBS
- ${HW_LINK_LIBS}
- ole32
- oleaut32
- winspool
- uuid
- )
+ set( HW_LINK_LIBS
+ ${HW_LINK_LIBS}
+ ole32
+ oleaut32
+ winspool
+ uuid
+ )
endif()
--- a/QTfrontend/SquareLabel.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/SquareLabel.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -29,6 +29,8 @@
void SquareLabel::paintEvent(QPaintEvent * event)
{
+ Q_UNUSED(event);
+
QPainter painter(this);
int pixsize;
if (width() > height()) {
--- a/QTfrontend/about.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/about.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -125,7 +125,7 @@
"Slovak: Jose Riha<br>"
"Spanish: Carlos Vives <<a href=\"mailto:mail@carlosvives.es\">mail@carlosvives.es</a>><br>"
"Swedish: Niklas Grahn <<a href=\"mailto:raewolusjoon@yaoo.com\">raewolusjoon@yaoo.com</a>>, Henrik Rostedt <<a href=\"mailto:henrik.rostedt@gmail.com\">henrik.rostedt@gmail.com</a>><br>"
- "Ukrainian: Eugene V. Lyubimkin <<a href=\"mailto:jackyf.devel@gmail.com\">jackyf.devel@gmail.com</a>>"
+ "Ukrainian: Eugene V. Lyubimkin <<a href=\"mailto:jackyf.devel@gmail.com\">jackyf.devel@gmail.com</a>>, Igor Paliychuk <<a href=\"mailto:igor-hkr@mail.ru\">igor-hkr@mail.ru</a>>, Yevhen Sakara <<a href=\"mailto:eresid@gmail.com\">eresid@gmail.com</a>>"
"</p><h2>") +
QLabel::tr("Special thanks:") + "</h2><p>"
--- a/QTfrontend/ammoSchemeModel.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/ammoSchemeModel.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -45,19 +45,22 @@
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(45) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(5) // case prob 26
- << QVariant(3) // mines time 27
- << QVariant(4) // mines number 28
- << QVariant(0) // mine dud pct 29
- << QVariant(2) // explosives 30
- << QVariant(35) // health case pct 31
- << QVariant(25) // health case amt 32
- << QVariant(47) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(45) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(5) // case prob 28
+ << QVariant(3) // mines time 29
+ << QVariant(4) // mines number 30
+ << QVariant(0) // mine dud pct 31
+ << QVariant(2) // explosives 32
+ << QVariant(35) // health case pct 33
+ << 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) :
@@ -103,19 +106,22 @@
<< "infattack" // 19
<< "resetweps" // 20
<< "perhogammo" // 21
- << "damagefactor" // 22
- << "turntime" // 23
- << "health" // 24
- << "suddendeath" // 25
- << "caseprobability" // 26
- << "minestime" // 27
- << "minesnum" // 28
- << "minedudpct" // 29
- << "explosives" // 30
- << "healthprobability" // 31
- << "healthcaseamount" // 32
- << "waterrise" // 33
- << "healthdecrease" // 34
+ << "disablewind" // 22
+ << "morewind" // 23
+ << "damagefactor" // 24
+ << "turntime" // 25
+ << "health" // 26
+ << "suddendeath" // 27
+ << "caseprobability" // 28
+ << "minestime" // 29
+ << "minesnum" // 30
+ << "minedudpct" // 31
+ << "explosives" // 32
+ << "healthprobability" // 33
+ << "healthcaseamount" // 34
+ << "waterrise" // 35
+ << "healthdecrease" // 36
+ << "ropepct" // 37
;
QList<QVariant> proMode;
@@ -142,19 +148,22 @@
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(15) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(0) // case prob 26
- << QVariant(3) // mines time 27
- << QVariant(0) // mines number 28
- << QVariant(0) // mine dud pct 29
- << QVariant(2) // explosives 30
- << QVariant(35) // health case pct 31
- << QVariant(25) // health case amt 32
- << QVariant(47) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(15) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(0) // case prob 28
+ << QVariant(3) // mines time 29
+ << QVariant(0) // mines number 30
+ << QVariant(0) // mine dud pct 31
+ << QVariant(2) // explosives 32
+ << QVariant(35) // health case pct 33
+ << 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;
@@ -181,19 +190,22 @@
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(30) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(50) // sudden death 25
- << QVariant(1) // case prob 26
- << QVariant(3) // mines time 27
- << QVariant(0) // mines number 28
- << QVariant(0) // mine dud pct 29
- << QVariant(0) // explosives 30
- << QVariant(0) // health case pct 31
- << QVariant(25) // health case amt 32
- << QVariant(47) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(30) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(50) // sudden death 27
+ << QVariant(1) // case prob 28
+ << QVariant(3) // mines time 29
+ << QVariant(0) // mines number 30
+ << QVariant(0) // mine dud pct 31
+ << QVariant(0) // explosives 32
+ << QVariant(0) // health case pct 33
+ << 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;
@@ -220,19 +232,22 @@
<< QVariant(true) // inf. attack 19
<< QVariant(true) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(45) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(5) // case prob 26
- << QVariant(3) // mines time 27
- << QVariant(4) // mines number 28
- << QVariant(0) // mine dud pct 29
- << QVariant(2) // explosives 30
- << QVariant(35) // health case pct 31
- << QVariant(25) // health case amt 32
- << QVariant(47) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(45) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(5) // case prob 28
+ << QVariant(3) // mines time 29
+ << QVariant(4) // mines number 30
+ << QVariant(0) // mine dud pct 31
+ << QVariant(2) // explosives 32
+ << QVariant(35) // health case pct 33
+ << 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;
@@ -259,19 +274,22 @@
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(150) // damage modfier 22
- << QVariant(30) // turn time 23
- << QVariant(50) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(0) // case prob 26
- << QVariant(0) // mines time 27
- << QVariant(80) // mines number 28
- << QVariant(0) // mine dud pct 29
- << QVariant(0) // explosives 30
- << QVariant(35) // health case pct 31
- << QVariant(25) // health case amt 32
- << QVariant(47) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(150) // damage modfier 24
+ << QVariant(30) // turn time 25
+ << QVariant(50) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(0) // case prob 28
+ << QVariant(0) // mines time 29
+ << QVariant(80) // mines number 30
+ << QVariant(0) // mine dud pct 31
+ << QVariant(0) // explosives 32
+ << QVariant(35) // health case pct 33
+ << 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;
@@ -298,19 +316,22 @@
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(30) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(0) // case prob 26
- << QVariant(0) // mines time 27
- << QVariant(0) // mines number 28
- << QVariant(0) // mine dud pct 29
- << QVariant(80) // explosives 30
- << QVariant(35) // health case pct 31
- << QVariant(25) // health case amt 32
- << QVariant(47) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(30) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(0) // case prob 28
+ << QVariant(0) // mines time 29
+ << QVariant(0) // mines number 30
+ << QVariant(0) // mine dud pct 31
+ << QVariant(80) // explosives 32
+ << QVariant(35) // health case pct 33
+ << 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;
@@ -337,19 +358,22 @@
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(30) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(5) // case prob 26
- << QVariant(3) // mines time 27
- << QVariant(10) // mines number 28
- << QVariant(10) // mine dud pct 29
- << QVariant(10) // explosives 30
- << QVariant(35) // health case pct 31
- << QVariant(25) // health case amt 32
- << QVariant(47) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(30) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(5) // case prob 28
+ << QVariant(3) // mines time 29
+ << QVariant(10) // mines number 30
+ << QVariant(10) // mine dud pct 31
+ << QVariant(10) // explosives 32
+ << QVariant(35) // health case pct 33
+ << 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;
@@ -376,19 +400,22 @@
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(45) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(5) // case prob 26
- << QVariant(3) // mines time 27
- << QVariant(0) // mines number 28
- << QVariant(0) // mine dud pct 29
- << QVariant(0) // explosives 30
- << QVariant(35) // health case pct 31
- << QVariant(25) // health case amt 32
- << QVariant(47) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(45) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(5) // case prob 28
+ << QVariant(3) // mines time 29
+ << QVariant(0) // mines number 30
+ << QVariant(0) // mine dud pct 31
+ << QVariant(0) // explosives 32
+ << QVariant(35) // health case pct 33
+ << 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;
@@ -415,19 +442,22 @@
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(true) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(9999) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(5) // case prob 26
- << QVariant(3) // mines time 27
- << QVariant(5) // mines number 28
- << QVariant(10) // mine dud pct 29
- << QVariant(2) // explosives 30
- << QVariant(35) // health case pct 31
- << QVariant(30) // health case amt 32
- << QVariant(0) // water rise amt 33
- << QVariant(0) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(9999) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(5) // case prob 28
+ << QVariant(3) // mines time 29
+ << QVariant(5) // mines number 30
+ << QVariant(10) // mine dud pct 31
+ << QVariant(2) // explosives 32
+ << QVariant(35) // health case pct 33
+ << 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;
@@ -454,19 +484,22 @@
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(45) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(2) // case prob 26
- << QVariant(3) // mines time 27
- << QVariant(5) // mines number 28
- << QVariant(0) // mine dud pct 29
- << QVariant(5) // explosives 30
- << QVariant(25) // health case pct 31
- << QVariant(25) // health case amt 32
- << QVariant(47) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(45) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(2) // case prob 28
+ << QVariant(3) // mines time 29
+ << QVariant(5) // mines number 30
+ << QVariant(0) // mine dud pct 31
+ << QVariant(5) // explosives 32
+ << QVariant(25) // health case pct 33
+ << 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;
@@ -485,27 +518,30 @@
<< QVariant(false) // artillery 11
<< QVariant(true) // random order 12
<< QVariant(true) // king 13
- << QVariant(true) // place hog 14
- << QVariant(true) // shared ammo 15
+ << QVariant(false) // place hog 14
+ << QVariant(false) // shared ammo 15
<< QVariant(false) // disable girders 16
<< QVariant(false) // disable land objects 17
<< QVariant(false) // AI survival 18
<< QVariant(false) // inf. attack 19
<< QVariant(false) // reset weps 20
<< QVariant(false) // per hog ammo 21
- << QVariant(100) // damage modfier 22
- << QVariant(45) // turn time 23
- << QVariant(100) // init health 24
- << QVariant(15) // sudden death 25
- << QVariant(5) // case prob 26
- << QVariant(3) // mines time 27
- << QVariant(3) // mines number 28
- << QVariant(20) // mine dud pct 29
- << QVariant(3) // explosives 30
- << QVariant(35) // health case pct 31
- << QVariant(30) // health case amt 32
- << QVariant(30) // water rise amt 33
- << QVariant(5) // health dec amt 34
+ << QVariant(false) // no wind 22
+ << QVariant(false) // more wind 23
+ << QVariant(100) // damage modfier 24
+ << QVariant(45) // turn time 25
+ << QVariant(100) // init health 26
+ << QVariant(15) // sudden death 27
+ << QVariant(5) // case prob 28
+ << QVariant(3) // mines time 29
+ << QVariant(4) // mines number 30
+ << QVariant(0) // mine dud pct 31
+ << QVariant(2) // explosives 32
+ << QVariant(35) // health case pct 33
+ << QVariant(25) // health case amt 34
+ << QVariant(47) // water rise amt 35
+ << QVariant(5) // health dec amt 36
+ << QVariant(100) // rope modfier 37
;
@@ -541,6 +577,10 @@
QVariant AmmoSchemeModel::headerData(int section, Qt::Orientation orientation, int role) const
{
+ Q_UNUSED(section);
+ Q_UNUSED(orientation);
+ Q_UNUSED(role);
+
return QVariant();
}
@@ -562,6 +602,8 @@
Qt::ItemFlags AmmoSchemeModel::flags(const QModelIndex & index) const
{
+ Q_UNUSED(index);
+
return
Qt::ItemIsEnabled
| Qt::ItemIsSelectable
@@ -584,6 +626,8 @@
bool AmmoSchemeModel::insertRows(int row, int count, const QModelIndex & parent)
{
+ Q_UNUSED(count);
+
beginInsertRows(parent, row, row);
QList<QVariant> newScheme = defaultScheme;
@@ -648,6 +692,10 @@
QVariant NetAmmoSchemeModel::headerData(int section, Qt::Orientation orientation, int role) const
{
+ Q_UNUSED(section);
+ Q_UNUSED(orientation);
+ Q_UNUSED(role);
+
return QVariant();
}
--- a/QTfrontend/ammoSchemeModel.h Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/ammoSchemeModel.h Sun Dec 19 13:31:55 2010 -0500
@@ -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/bgwidget.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/bgwidget.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -103,6 +103,8 @@
void BGWidget::paintEvent(QPaintEvent *event)
{
+ Q_UNUSED(event);
+
QPainter p;
p.begin(this);
//p.setRenderHint(QPainter::Antialiasing);
--- a/QTfrontend/chatwidget.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/chatwidget.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -341,6 +341,8 @@
void HWChatWidget::chatNickSelected(int index)
{
+ Q_UNUSED(index);
+
QListWidgetItem* item = chatNicks->currentItem();
if (!item)
return;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/drawmapscene.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,192 @@
+#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)
+{
+ if(m_currPath && (mouseEvent->buttons() & Qt::LeftButton))
+ {
+ QPainterPath path = m_currPath->path();
+ path.lineTo(mouseEvent->scenePos());
+ paths.first().append(mouseEvent->scenePos().toPoint());
+ m_currPath->setPath(path);
+
+ emit pathChanged();
+ }
+}
+
+void DrawMapScene::mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent)
+{
+ 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.prepend(QList<QPoint>() << mouseEvent->scenePos().toPoint());
+ m_currPath->setPath(path);
+
+ emit pathChanged();
+}
+
+void DrawMapScene::mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent)
+{
+ Q_UNUSED(mouseEvent);
+
+ simplifyLast();
+
+ m_currPath = 0;
+}
+
+void DrawMapScene::undo()
+{
+ if(items().size())
+ {
+ removeItem(items().first());
+ paths.removeFirst();
+
+ emit pathChanged();
+ }
+}
+
+void DrawMapScene::clearMap()
+{
+ clear();
+ paths.clear();
+
+ 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 *)&px, 2);
+ b.append((const char *)&py, 2);
+ b.append((const char *)&flags, 1);
+
+ ++cnt;
+ }
+
+ }
+
+ return b;
+}
+
+void DrawMapScene::decode(QByteArray data)
+{
+ clear();
+ paths.clear();
+
+ QList<QPoint> points;
+
+ while(data.size() >= 5)
+ {
+ qint16 px = qFromBigEndian(*(qint16 *)data.data());
+ data.remove(0, 2);
+ qint16 py = qFromBigEndian(*(qint16 *)data.data());
+ data.remove(0, 2);
+ quint8 flags = *(quint8 *)data.data();
+ data.remove(0, 1);
+
+ //last chunk or first point
+ if((data.size() < 5) || (flags & 0x80))
+ {
+ if(points.size())
+ {
+ addPath(pointsToPath(points), m_pen);
+ paths.prepend(points);
+
+ points.clear();
+ }
+ }
+
+ points.append(QPoint(px, py));
+ }
+
+ emit pathChanged();
+}
+
+void DrawMapScene::simplifyLast()
+{
+ if(!paths.size()) return;
+
+ QList<QPoint> points = paths.at(0);
+
+ QPoint prevPoint = points.first();
+ int i = 1;
+ while(i < points.size())
+ {
+ if( (i != points.size() - 1)
+ && (sqr(prevPoint.x() - points[i].x()) + sqr(prevPoint.y() - points[i].y()) < 1000)
+ )
+ points.removeAt(i);
+ else
+ {
+ prevPoint = points[i];
+ ++i;
+ }
+ }
+
+ paths[0] = points;
+
+
+ // redraw path
+ {
+ QGraphicsPathItem * pathItem = static_cast<QGraphicsPathItem *>(items()[0]);
+ pathItem->setPath(pointsToPath(paths[0]));
+ }
+
+ emit pathChanged();
+}
+
+QPainterPath DrawMapScene::pointsToPath(const QList<QPoint> points)
+{
+ QPainterPath path;
+
+ if(points.size())
+ {
+ QPointF p = points[0] + QPointF(0.01, 0.01);
+ path.moveTo(p);
+
+ foreach(QPoint p, points)
+ path.lineTo(p);
+ }
+
+ return path;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/drawmapscene.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,41 @@
+#ifndef DRAWMAPSCENE_H
+#define DRAWMAPSCENE_H
+
+#include <QGraphicsScene>
+#include <QPainterPath>
+
+class QGraphicsPathItem;
+
+typedef QList<QList<QPoint> > Paths;
+
+class DrawMapScene : public QGraphicsScene
+{
+Q_OBJECT
+public:
+ explicit DrawMapScene(QObject *parent = 0);
+
+ QByteArray encode();
+ void decode(QByteArray data);
+
+signals:
+ void pathChanged();
+
+public slots:
+ void undo();
+ void clearMap();
+ void simplifyLast();
+
+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);
+
+ QPainterPath pointsToPath(const QList<QPoint> points);
+};
+
+#endif // DRAWMAPSCENE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/drawmapwidget.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,69 @@
+#include <QFile>
+
+#include "drawmapwidget.h"
+
+DrawMapWidget::DrawMapWidget(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::DrawMapWidget)
+{
+ ui->setupUi(this);
+
+ m_scene = 0;
+}
+
+DrawMapWidget::~DrawMapWidget()
+{
+ delete ui;
+}
+
+void DrawMapWidget::changeEvent(QEvent *e)
+{
+ QWidget::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+void DrawMapWidget::setScene(DrawMapScene * scene)
+{
+ ui->graphicsView->setScene(scene);
+}
+
+void DrawMapWidget::resizeEvent(QResizeEvent * event)
+{
+ Q_UNUSED(event);
+
+ if(ui->graphicsView && ui->graphicsView->scene())
+ ui->graphicsView->fitInView(ui->graphicsView->scene()->sceneRect(), Qt::KeepAspectRatio);
+}
+
+void DrawMapWidget::showEvent(QShowEvent * event)
+{
+ Q_UNUSED(event);
+
+ resizeEvent(0);
+}
+
+void DrawMapWidget::undo()
+{
+ if(m_scene) m_scene->undo();
+}
+
+void DrawMapWidget::clear()
+{
+ if(m_scene) m_scene->clear();
+}
+
+void DrawMapWidget::save(const QString & fileName)
+{
+ Q_UNUSED(fileName);
+}
+
+void DrawMapWidget::load(const QString & fileName)
+{
+ Q_UNUSED(fileName);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/drawmapwidget.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,69 @@
+#ifndef DRAWMAPWIDGET_H
+#define DRAWMAPWIDGET_H
+
+#include <QWidget>
+#include <QHBoxLayout>
+#include <QPushButton>
+#include <QGraphicsView>
+#include <QApplication>
+
+#include "qaspectratiolayout.h"
+#include "drawmapscene.h"
+
+namespace Ui {
+ class Ui_DrawMapWidget
+ {
+ public:
+ QGraphicsView *graphicsView;
+
+ void setupUi(QWidget *drawMapWidget)
+ {
+ QAspectRatioLayout * arLayout = new QAspectRatioLayout(drawMapWidget);
+ arLayout->setMargin(0);
+
+ graphicsView = new QGraphicsView(drawMapWidget);
+ arLayout->addWidget(graphicsView);
+
+ retranslateUi(drawMapWidget);
+
+ QMetaObject::connectSlotsByName(drawMapWidget);
+ } // setupUi
+
+ void retranslateUi(QWidget *drawMapWidget)
+ {
+ Q_UNUSED(drawMapWidget);
+ } // retranslateUi
+
+ };
+
+ class DrawMapWidget: public Ui_DrawMapWidget {};
+}
+
+class DrawMapWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit DrawMapWidget(QWidget *parent = 0);
+ ~DrawMapWidget();
+
+ void setScene(DrawMapScene * scene);
+
+public slots:
+ void undo();
+ void clear();
+ void save(const QString & fileName);
+ void load(const QString & fileName);
+
+protected:
+ void changeEvent(QEvent *e);
+ virtual void resizeEvent(QResizeEvent * event);
+ virtual void showEvent(QShowEvent * event);
+
+private:
+ Ui::DrawMapWidget *ui;
+
+ DrawMapScene * m_scene;
+};
+
+#endif // DRAWMAPWIDGET_H
--- a/QTfrontend/game.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/game.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -40,6 +40,7 @@
this->config = config;
this->gamecfg = gamecfg;
TeamCount = 0;
+ netSuspend = false;
}
HWGame::~HWGame()
@@ -77,7 +78,7 @@
}
HWProto::addStringToBuffer(buf, gt);
- HWProto::addStringListToBuffer(buf, gamecfg->getFullConfig());
+ buf += gamecfg->getFullConfig();
if (m_pTeamSelWidget)
{
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/game.h Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/gamecfgwidget.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -30,8 +30,9 @@
#include "igbox.h"
#include "hwconsts.h"
#include "ammoSchemeModel.h"
+#include "proto.h"
-GameCFGWidget::GameCFGWidget(QWidget* parent, bool externalControl) :
+GameCFGWidget::GameCFGWidget(QWidget* parent) :
QGroupBox(parent), mainLayout(this)
{
mainLayout.setMargin(0);
@@ -42,41 +43,96 @@
IconedGroupBox *GBoxOptions = new IconedGroupBox(this);
GBoxOptions->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- mainLayout.addWidget(GBoxOptions);
+ mainLayout.addWidget(GBoxOptions, 1, 0);
QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions);
- GameSchemes = new QComboBox(GBoxOptions);
- GBoxOptionsLayout->addWidget(GameSchemes, 0, 1);
+ GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Gameplay"), GBoxOptions), 0, 0);
+
+ Scripts = new QComboBox(GBoxOptions);
+ GBoxOptionsLayout->addWidget(Scripts, 0, 1);
+
+ Scripts->addItem(QComboBox::tr("Normal"));
+ Scripts->insertSeparator(1);
+
+ for (int i = 0; i < scriptList->size(); ++i) {
+ QString script = (*scriptList)[i].remove(".lua", Qt::CaseInsensitive);
+ QList<QVariant> scriptInfo;
+ scriptInfo.push_back(script);
+ QFile scriptCfgFile(QString("%1/Scripts/Multiplayer/%2.cfg").arg(datadir->absolutePath()).arg(script));
+ if (scriptCfgFile.exists() && scriptCfgFile.open(QFile::ReadOnly)) {
+ QString scheme;
+ QString weapons;
+ QTextStream input(&scriptCfgFile);
+ input >> scheme;
+ input >> weapons;
+ if (scheme.isEmpty())
+ scheme = "locked";
+ scheme.replace("_", " ");
+ if (weapons.isEmpty())
+ weapons = "locked";
+ weapons.replace("_", " ");
+ scriptInfo.push_back(scheme);
+ scriptInfo.push_back(weapons);
+ scriptCfgFile.close();
+ }
+ else
+ {
+ scriptInfo.push_back("locked");
+ scriptInfo.push_back("locked");
+ }
+ Scripts->addItem(script.replace("_", " "), scriptInfo);
+ }
+
+ connect(Scripts, SIGNAL(currentIndexChanged(int)), this, SLOT(scriptChanged(int)));
+
+ QWidget *SchemeWidget = new QWidget(GBoxOptions);
+ GBoxOptionsLayout->addWidget(SchemeWidget, 1, 0, 1, 2);
+
+ QGridLayout *SchemeWidgetLayout = new QGridLayout(SchemeWidget);
+ SchemeWidgetLayout->setMargin(0);
+
+ GameSchemes = new QComboBox(SchemeWidget);
+ SchemeWidgetLayout->addWidget(GameSchemes, 0, 2);
connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
- GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Game scheme"), GBoxOptions), 0, 0);
+ SchemeWidgetLayout->addWidget(new QLabel(QLabel::tr("Game scheme"), SchemeWidget), 0, 0);
QPixmap pmEdit(":/res/edit.png");
- QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
+ QPushButton * goToSchemePage = new QPushButton(SchemeWidget);
goToSchemePage->setToolTip(tr("Edit schemes"));
goToSchemePage->setIconSize(pmEdit.size());
goToSchemePage->setIcon(pmEdit);
goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
- GBoxOptionsLayout->addWidget(goToSchemePage, 0, 2);
- connect(goToSchemePage, SIGNAL(clicked()), this, SIGNAL(goToSchemes()));
+ SchemeWidgetLayout->addWidget(goToSchemePage, 0, 3);
+ connect(goToSchemePage, SIGNAL(clicked()), this, SLOT(jumpToSchemes()));
- GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Weapons"), GBoxOptions), 1, 0);
+ SchemeWidgetLayout->addWidget(new QLabel(QLabel::tr("Weapons"), SchemeWidget), 1, 0);
- WeaponsName = new QComboBox(GBoxOptions);
- GBoxOptionsLayout->addWidget(WeaponsName, 1, 1);
+ WeaponsName = new QComboBox(SchemeWidget);
+ SchemeWidgetLayout->addWidget(WeaponsName, 1, 2);
connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int)));
- QPushButton * goToWeaponPage = new QPushButton(GBoxOptions);
+ QPushButton * goToWeaponPage = new QPushButton(SchemeWidget);
goToWeaponPage->setToolTip(tr("Edit weapons"));
goToWeaponPage->setIconSize(pmEdit.size());
goToWeaponPage->setIcon(pmEdit);
goToWeaponPage->setMaximumWidth(pmEdit.width() + 6);
- GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 2);
+ SchemeWidgetLayout->addWidget(goToWeaponPage, 1, 3);
+ connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons()));
+
+ //GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Bind schemes with weapons"), GBoxOptions), 2, 0);
- connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons()));
+ bindEntries = new QCheckBox(SchemeWidget);
+ bindEntries->setToolTip(tr("When this option is enabled selecting a game scheme will auto-select a weapon"));
+ bindEntries->setChecked(true);
+ bindEntries->setMaximumWidth(42);
+ bindEntries->setStyleSheet( "QCheckBox::indicator:checked { image: url(\":/res/lock.png\"); }"
+ "QCheckBox::indicator:unchecked { image: url(\":/res/unlock.png\"); }" );
+ SchemeWidgetLayout->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 &)));
@@ -84,11 +140,18 @@
connect(pMapContainer, SIGNAL(maze_sizeChanged(int)), this, SLOT(maze_sizeChanged(int)));
connect(pMapContainer, SIGNAL(themeChanged(const QString &)), this, SLOT(themeChanged(const QString &)));
connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int)));
+ connect(pMapContainer, SIGNAL(drawMapRequested()), this, SIGNAL(goToDrawMap()));
+ connect(pMapContainer, SIGNAL(drawnMapChanged(const QByteArray &)), this, SLOT(onDrawnMapChanged(const QByteArray &)));
+}
+
+void GameCFGWidget::jumpToSchemes()
+{
+ emit goToSchemes(GameSchemes->currentIndex());
}
void GameCFGWidget::jumpToWeapons()
{
- emit goToWeapons(WeaponsName->currentText());
+ emit goToWeapons(WeaponsName->currentIndex());
}
QVariant GameCFGWidget::schemeData(int column) const
@@ -142,46 +205,82 @@
result |= 0x00200000; // reset weaps
if (schemeData(21).toBool())
result |= 0x00400000; // per hog ammo
+ if (schemeData(22).toBool())
+ result |= 0x00800000; // no wind
+ if (schemeData(23).toBool())
+ result |= 0x01000000; // more wind
return result;
}
quint32 GameCFGWidget::getInitHealth() const
{
- return schemeData(24).toInt();
+ return schemeData(26).toInt();
}
-QStringList GameCFGWidget::getFullConfig() const
+QByteArray GameCFGWidget::getFullConfig() const
{
- QStringList sl;
- sl.append("eseed " + pMapContainer->getCurrentSeed());
- sl.append(QString("e$gmflags %1").arg(getGameFlags()));
- sl.append(QString("e$damagepct %1").arg(schemeData(22).toInt()));
- sl.append(QString("e$turntime %1").arg(schemeData(23).toInt() * 1000));
- sl.append(QString("e$minestime %1").arg(schemeData(27).toInt() * 1000));
- sl.append(QString("e$minesnum %1").arg(schemeData(28).toInt()));
- sl.append(QString("e$sd_turns %1").arg(schemeData(25).toInt()));
- sl.append(QString("e$casefreq %1").arg(schemeData(26).toInt()));
- sl.append(QString("e$minedudpct %1").arg(schemeData(29).toInt()));
- sl.append(QString("e$explosives %1").arg(schemeData(30).toInt()));
- sl.append(QString("e$healthprob %1").arg(schemeData(31).toInt()));
- sl.append(QString("e$hcaseamount %1").arg(schemeData(32).toInt()));
- sl.append(QString("e$waterrise %1").arg(schemeData(33).toInt()));
- sl.append(QString("e$healthdec %1").arg(schemeData(34).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()));
+ QList<QByteArray> bcfg;
+ int mapgen = pMapContainer->get_mapgen();
+
+ bcfg << QString("eseed " + pMapContainer->getCurrentSeed()).toUtf8();
+ bcfg << QString("e$gmflags %1").arg(getGameFlags()).toUtf8();
+ bcfg << QString("e$damagepct %1").arg(schemeData(24).toInt()).toUtf8();
+ bcfg << QString("e$turntime %1").arg(schemeData(25).toInt() * 1000).toUtf8();
+ bcfg << QString("e$sd_turns %1").arg(schemeData(27).toInt()).toUtf8();
+ bcfg << QString("e$casefreq %1").arg(schemeData(28).toInt()).toUtf8();
+ bcfg << QString("e$minestime %1").arg(schemeData(29).toInt() * 1000).toUtf8();
+ bcfg << QString("e$minesnum %1").arg(schemeData(30).toInt()).toUtf8();
+ bcfg << QString("e$minedudpct %1").arg(schemeData(31).toInt()).toUtf8();
+ bcfg << QString("e$explosives %1").arg(schemeData(32).toInt()).toUtf8();
+ bcfg << QString("e$healthprob %1").arg(schemeData(33).toInt()).toUtf8();
+ bcfg << QString("e$hcaseamount %1").arg(schemeData(34).toInt()).toUtf8();
+ bcfg << QString("e$waterrise %1").arg(schemeData(35).toInt()).toUtf8();
+ bcfg << QString("e$healthdec %1").arg(schemeData(36).toInt()).toUtf8();
+ bcfg << QString("e$ropepct %1").arg(schemeData(37).toInt()).toUtf8();
+ bcfg << QString("e$template_filter %1").arg(pMapContainer->getTemplateFilter()).toUtf8();
+ bcfg << QString("e$mapgen %1").arg(mapgen).toUtf8();
+
+ switch (mapgen)
+ {
+ case MAPGEN_MAZE:
+ bcfg << QString("e$maze_size %1").arg(pMapContainer->get_maze_size()).toUtf8();
+
+ case MAPGEN_DRAWN:
+ {
+ QByteArray data = pMapContainer->getDrawnMapData();
+ while(data.size() > 0)
+ {
+ QByteArray tmp = data;
+ tmp.truncate(200);
+ tmp.prepend("edraw ");
+ bcfg << tmp;
+ data.remove(0, 200);
+ }
+ }
+ default: ;
+ }
QString currentMap = pMapContainer->getCurrentMap();
if (currentMap.size() > 0)
{
- sl.append("emap " + currentMap);
+ bcfg << QString("emap " + currentMap).toUtf8();
if(pMapContainer->getCurrentIsMission())
- sl.append(QString("escript Maps/%1/map.lua")
- .arg(currentMap));
+ bcfg << QString("escript Maps/%1/map.lua").arg(currentMap).toUtf8();
+ }
+ bcfg << QString("etheme " + pMapContainer->getCurrentTheme()).toUtf8();
+
+ if (Scripts->currentIndex() > 0)
+ {
+ bcfg << QString("escript Scripts/Multiplayer/%1.lua").arg(Scripts->itemData(Scripts->currentIndex()).toList()[0].toString()).toUtf8();
}
- sl.append("etheme " + pMapContainer->getCurrentTheme());
- return sl;
+
+ QByteArray result;
+
+ foreach(QByteArray ba, bcfg)
+ HWProto::addByteArrayToBuffer(result, ba);
+
+ return result;
}
void GameCFGWidget::setNetAmmo(const QString& name, const QString& ammo)
@@ -209,6 +308,7 @@
themeChanged(pMapContainer->getCurrentTheme());
schemeChanged(GameSchemes->currentIndex());
+ scriptChanged(Scripts->currentIndex());
mapgenChanged(pMapContainer->get_mapgen());
maze_sizeChanged(pMapContainer->get_maze_size());
@@ -248,6 +348,14 @@
pMapContainer->setMaze_size(value.toUInt());
return;
}
+ if (param == "SCRIPT") {
+ Scripts->setCurrentIndex(Scripts->findText(value));
+ return;
+ }
+ if (param == "DRAWNMAP") {
+ pMapContainer->setDrawnMapData(qUncompress(QByteArray::fromBase64(slValue[0].toLatin1())));
+ return;
+ }
}
if (slValue.size() == 2)
@@ -263,26 +371,62 @@
void GameCFGWidget::ammoChanged(int index)
{
- if (index >= 0)
+ if (index >= 0) {
emit paramChanged(
"AMMO",
QStringList() << WeaponsName->itemText(index) << WeaponsName->itemData(index).toString()
);
+ }
}
void GameCFGWidget::mapChanged(const QString & value)
{
if(pMapContainer->getCurrentIsMission())
{
- GameSchemes->setEnabled(false);
- WeaponsName->setEnabled(false);
- GameSchemes->setCurrentIndex(GameSchemes->findText("Default"));
- WeaponsName->setCurrentIndex(WeaponsName->findText("Default"));
+ Scripts->setEnabled(false);
+ Scripts->setCurrentIndex(0);
+
+ if (pMapContainer->getCurrentScheme() == "locked")
+ {
+ GameSchemes->setEnabled(false);
+ GameSchemes->setCurrentIndex(GameSchemes->findText("Default"));
+ }
+ else
+ {
+ GameSchemes->setEnabled(true);
+ int num = GameSchemes->findText(pMapContainer->getCurrentScheme());
+ if (num != -1)
+ GameSchemes->setCurrentIndex(num);
+ else
+ GameSchemes->setCurrentIndex(GameSchemes->findText("Default"));
+ }
+
+ if (pMapContainer->getCurrentWeapons() == "locked")
+ {
+ WeaponsName->setEnabled(false);
+ WeaponsName->setCurrentIndex(WeaponsName->findText("Default"));
+ }
+ else
+ {
+ WeaponsName->setEnabled(true);
+ int num = WeaponsName->findText(pMapContainer->getCurrentWeapons());
+ if (num != -1)
+ WeaponsName->setCurrentIndex(num);
+ else
+ WeaponsName->setCurrentIndex(WeaponsName->findText("Default"));
+ }
+
+ if (pMapContainer->getCurrentScheme() != "locked" && pMapContainer->getCurrentWeapons() != "locked")
+ bindEntries->setEnabled(true);
+ else
+ bindEntries->setEnabled(false);
}
else
{
+ Scripts->setEnabled(true);
GameSchemes->setEnabled(true);
WeaponsName->setEnabled(true);
+ bindEntries->setEnabled(true);
}
emit paramChanged("MAP", QStringList(value));
}
@@ -302,7 +446,7 @@
emit paramChanged("THEME", QStringList(value));
}
-void GameCFGWidget::schemeChanged(int value)
+void GameCFGWidget::schemeChanged(int index)
{
QStringList sl;
@@ -311,6 +455,70 @@
sl << schemeData(i).toString();
emit paramChanged("SCHEME", sl);
+
+ if (bindEntries->isEnabled() && bindEntries->isChecked()) {
+ QString schemeName = GameSchemes->itemText(index);
+ for (int i = 0; i < WeaponsName->count(); i++) {
+ QString weapName = WeaponsName->itemText(i);
+ int res = QString::compare(weapName, schemeName, Qt::CaseSensitive);
+ if (0 == res) {
+ WeaponsName->setCurrentIndex(i);
+ emit ammoChanged(i);
+ break;
+ }
+ }
+ }
+}
+
+void GameCFGWidget::scriptChanged(int index)
+{
+ if(index > 0)
+ {
+ QString scheme = Scripts->itemData(Scripts->currentIndex()).toList()[1].toString();
+ QString weapons = Scripts->itemData(Scripts->currentIndex()).toList()[2].toString();
+
+ if (scheme == "locked")
+ {
+ GameSchemes->setEnabled(false);
+ GameSchemes->setCurrentIndex(GameSchemes->findText("Default"));
+ }
+ else
+ {
+ GameSchemes->setEnabled(true);
+ int num = GameSchemes->findText(scheme);
+ if (num != -1)
+ GameSchemes->setCurrentIndex(num);
+ else
+ GameSchemes->setCurrentIndex(GameSchemes->findText("Default"));
+ }
+
+ if (weapons == "locked")
+ {
+ WeaponsName->setEnabled(false);
+ WeaponsName->setCurrentIndex(WeaponsName->findText("Default"));
+ }
+ else
+ {
+ WeaponsName->setEnabled(true);
+ int num = WeaponsName->findText(weapons);
+ if (num != -1)
+ WeaponsName->setCurrentIndex(num);
+ else
+ WeaponsName->setCurrentIndex(WeaponsName->findText("Default"));
+ }
+
+ if (scheme != "locked" && weapons != "locked")
+ bindEntries->setEnabled(true);
+ else
+ bindEntries->setEnabled(false);
+ }
+ else
+ {
+ GameSchemes->setEnabled(true);
+ WeaponsName->setEnabled(true);
+ bindEntries->setEnabled(true);
+ }
+ emit paramChanged("SCRIPT", QStringList(Scripts->itemText(index)));
}
void GameCFGWidget::mapgenChanged(MapGenerator m)
@@ -327,3 +535,8 @@
{
schemeChanged(GameSchemes->currentIndex());
}
+
+void GameCFGWidget::onDrawnMapChanged(const QByteArray & data)
+{
+ emit paramChanged("DRAWNMAP", QStringList(qCompress(data, 9).toBase64()));
+}
--- a/QTfrontend/gamecfgwidget.h Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/gamecfgwidget.h Sun Dec 19 13:31:55 2010 -0500
@@ -36,14 +36,16 @@
Q_OBJECT
public:
- GameCFGWidget(QWidget* parent, bool externalControl=false);
+ GameCFGWidget(QWidget* parent);
quint32 getGameFlags() const;
quint32 getInitHealth() const;
- QStringList getFullConfig() const;
+ QByteArray getFullConfig() const;
+ QComboBox * Scripts;
QComboBox * GameSchemes;
QComboBox * WeaponsName;
HWMapContainer* pMapContainer;
QTableView * tv;
+ QVariant schemeData(int column) const;
public slots:
void setParam(const QString & param, const QStringList & value);
@@ -52,8 +54,9 @@
signals:
void paramChanged(const QString & param, const QStringList & value);
- void goToSchemes();
- void goToWeapons(const QString & name);
+ void goToSchemes(int);
+ void goToWeapons(int);
+ void goToDrawMap();
private slots:
void ammoChanged(int index);
@@ -62,19 +65,21 @@
void seedChanged(const QString &);
void themeChanged(const QString &);
void schemeChanged(int);
+ void scriptChanged(int);
+ void jumpToSchemes();
void jumpToWeapons();
void mapgenChanged(MapGenerator m);
void maze_sizeChanged(int s);
+ void onDrawnMapChanged(const QByteArray & data);
private:
QGridLayout mainLayout;
-
+ QCheckBox * bindEntries;
QString curNetAmmoName;
QString curNetAmmo;
void setNetAmmo(const QString& name, const QString& ammo);
- QVariant schemeData(int column) const;
};
#endif // GAMECONFIGWIDGET_H
--- a/QTfrontend/hats.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hats.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -77,6 +77,10 @@
QVariant HatsModel::headerData(int section,
Qt::Orientation orientation, int role) const
{
+ Q_UNUSED(section);
+ Q_UNUSED(orientation);
+ Q_UNUSED(role);
+
return QVariant();
}
--- a/QTfrontend/hedgehogerWidget.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hedgehogerWidget.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hedgehogerWidget.h Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hedgewars.qrc Sun Dec 19 13:31:55 2010 -0500
@@ -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>
@@ -71,6 +78,8 @@
<file>res/btnInfAttack.png</file>
<file>res/btnResetWeps.png</file>
<file>res/btnPerHogAmmo.png</file>
+ <file>res/btnNoWind.png</file>
+ <file>res/btnMoreWind.png</file>
<file>res/iconBox.png</file>
<file>res/iconHealth.png</file>
<file>res/iconSuddenDeath.png</file>
@@ -78,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>
@@ -91,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>
@@ -100,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/hwconsts.cpp.in Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hwconsts.cpp.in Sun Dec 19 13:31:55 2010 -0500
@@ -29,6 +29,7 @@
QStringList * Themes;
QStringList * mapList;
+QStringList * scriptList;
bool custom_config = false;
bool custom_data = false;
@@ -36,10 +37,10 @@
int cMaxTeams = 6;
QString * cDefaultAmmoStore = new QString(
- "9391929422199121032235111001201000000211110101011"
- "0405040541600655546554464776576666666155510101115"
- "0000000000000205500000040007004000000000200000000"
- "1311110312111111123114111111111111111211111101111"
+ "93919294221991210322351110012010000002111101010111"
+ "04050405416006555465544647765766666661555101011154"
+ "00000000000002055000000400070040000000002000000006"
+ "13111103121111111231141111111111111112111111011111"
);
int cAmmoNumber = cDefaultAmmoStore->size() / 4;
@@ -48,40 +49,40 @@
<< qMakePair(QString("Default"), *cDefaultAmmoStore)
<< qMakePair(QString("Crazy"), QString(
// TODO: Remove Piano's unlimited uses!
- "9999999999999999992999999999999999299999999909999"
- "1111110111111111111111111111111111111111111101111"
- "0000000000000000000000000000000000000000000000000"
- "1311110312111111123114111111111111111211110101111"
+ "99999999999999999929999999999999992999999999099999"
+ "11111101111111111111111111111111111111111111011111"
+ "00000000000000000000000000000000000000000000000000"
+ "13111103121111111231141111111111111112111101011111"
))
<< qMakePair(QString("Pro Mode"), QString(
- "9090009000000000000009000000000000000000000000000"
- "0000000000000000000000000000000000000000000000000"
- "0000000000000205500000040007004000000000200000000"
- "1111111111111111111111111111111111111111100101111"
+ "90900090000000000000090000000000000000000000000000"
+ "00000000000000000000000000000000000000000000000000"
+ "00000000000002055000000400070040000000002000000000"
+ "11111111111111111111111111111111111111111001011111"
))
<< qMakePair(QString("Shoppa"), QString(
- "0000009900000000000000000000000000000000000000000"
- "4444410044244402210112121222422000000002000400010"
- "0000000000000000000000000000000000000000000000000"
- "1111111111111111111111111111111111111111101101111"
+ "00000099000000000000000000000000000000000000000000"
+ "44444100442444022101121212224220000000020004000100"
+ "00000000000000000000000000000000000000000000000000"
+ "11111111111111111111111111111111111111111011011111"
))
<< qMakePair(QString("Clean Slate"),QString(
- "1010009000010000011000000000000000000000000000001"
- "0405040541600655546554464776576666666155510101115"
- "0000000000000000000000000000000000000000000000000"
- "1311110312111111123114111111111111111211111101111"
+ "10100090000100000110000000000000000000000000000010"
+ "04050405416006555465544647765766666661555101011154"
+ "00000000000000000000000000000000000000000000000000"
+ "13111103121111111231141111111111111112111111011111"
))
<< qMakePair(QString("Minefield"), QString(
- "0000009900090000000300000000000000000000000000000"
- "0000000000000000000000000000000000000000000000000"
- "0000000000000205500000040007004000000000200000000"
- "1111111111111111111111111111111111111111111101111"
+ "00000099000900000003000000000000000000000000000000"
+ "00000000000000000000000000000000000000000000000000"
+ "00000000000002055000000400070040000000002000000006"
+ "11111111111111111111111111111111111111111111011111"
))
<< qMakePair(QString("Thinking with Portals"), QString(
- "9000009002000000002100000000000000110000090000000"
- "0405040541600655546554464776576666666155510101115"
- "0000000000000205500000040007004000000000200000000"
- "1311110312111111123114111111111111111211111101111"
+ "90000090020000000021000000000000001100000900000000"
+ "04050405416006555465544647765766666661555101011154"
+ "00000000000002055000000400070040000000002000000006"
+ "13111103121111111231141111111111111112111111011111"
));
QColor *colors[] = {
--- a/QTfrontend/hwconsts.h Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hwconsts.h Sun Dec 19 13:31:55 2010 -0500
@@ -38,6 +38,7 @@
extern QStringList * Themes;
extern QStringList * mapList;
+extern QStringList * scriptList;
extern QString * cDefaultAmmoStore;
extern int cAmmoNumber;
--- a/QTfrontend/hwform.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hwform.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -35,6 +35,7 @@
#include <QDataWidgetMapper>
#include <QTableView>
#include <QCryptographicHash>
+#include <QSignalMapper>
#include "hwform.h"
#include "game.h"
@@ -56,6 +57,7 @@
#include "ammoSchemeModel.h"
#include "bgwidget.h"
#include "xfire.h"
+#include "drawmapwidget.h"
#ifdef __APPLE__
#include "CocoaInitializer.h"
@@ -77,6 +79,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());
@@ -107,13 +110,23 @@
UpdateCampaignPage(0);
UpdateWeapons();
+ pageSwitchMapper = new QSignalMapper(this);
+ connect(pageSwitchMapper, SIGNAL(mapped(int)), this, SLOT(GoToPage(int)));
+
connect(config, SIGNAL(frontendFullscreen(bool)), this, SLOT(onFrontendFullscreen(bool)));
onFrontendFullscreen(config->isFrontendFullscreen());
- connect(ui.pageMain->BtnSinglePlayer, SIGNAL(clicked()), this, SLOT(GoToSinglePlayer()));
- connect(ui.pageMain->BtnSetup, SIGNAL(clicked()), this, SLOT(GoToSetup()));
- connect(ui.pageMain->BtnNet, SIGNAL(clicked()), this, SLOT(GoToNetType()));
- connect(ui.pageMain->BtnInfo, SIGNAL(clicked()), this, SLOT(GoToInfo()));
+ connect(ui.pageMain->BtnSinglePlayer, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageMain->BtnSinglePlayer, ID_PAGE_SINGLEPLAYER);
+
+ connect(ui.pageMain->BtnSetup, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageMain->BtnSetup, ID_PAGE_SETUP);
+
+ connect(ui.pageMain->BtnNet, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageMain->BtnNet, ID_PAGE_NETTYPE);
+ connect(ui.pageMain->BtnInfo, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageMain->BtnInfo, ID_PAGE_INFO);
+
connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked()));
@@ -127,9 +140,12 @@
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.pageMultiplayer->gameCFG, SIGNAL(goToDrawMap()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageMultiplayer->gameCFG, ID_PAGE_DRAWMAP);
+
connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pagePlayDemo->BtnPlayDemo, SIGNAL(clicked()), this, SLOT(PlayDemo()));
@@ -146,12 +162,18 @@
#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()));
connect(ui.pageNet->BtnSpecifyServer, SIGNAL(clicked()), this, SLOT(NetConnect()));
- connect(ui.pageNet->BtnNetSvrStart, SIGNAL(clicked()), this, SLOT(GoToNetServer()));
+ connect(ui.pageNet->BtnNetSvrStart, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageNet->BtnNetSvrStart, ID_PAGE_NETSERVER);
+
connect(ui.pageNet, SIGNAL(connectClicked(const QString &, quint16)), this, SLOT(NetConnectServer(const QString &, quint16)));
connect(ui.pageNetServer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
@@ -162,21 +184,30 @@
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.pageNetGame->pGameCFG, SIGNAL(goToDrawMap()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageNetGame->pGameCFG, ID_PAGE_DRAWMAP);
connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
- connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), this, SLOT(GoToAdmin()));
+ connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageRoomsList->BtnAdmin, ID_PAGE_ADMIN);
connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageGameStats->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageSinglePlayer->BtnSimpleGamePage, SIGNAL(clicked()), this, SLOT(SimpleGame()));
- connect(ui.pageSinglePlayer->BtnTrainPage, SIGNAL(clicked()), this, SLOT(GoToTraining()));
- connect(ui.pageSinglePlayer->BtnCampaignPage, SIGNAL(clicked()), this, SLOT(GoToCampaign()));
- connect(ui.pageSinglePlayer->BtnMultiplayer, SIGNAL(clicked()), this, SLOT(GoToMultiplayer()));
+ connect(ui.pageSinglePlayer->BtnTrainPage, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageSinglePlayer->BtnTrainPage, ID_PAGE_TRAINING);
+
+ connect(ui.pageSinglePlayer->BtnCampaignPage, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageSinglePlayer->BtnCampaignPage, ID_PAGE_CAMPAIGN);
+
+ connect(ui.pageSinglePlayer->BtnMultiplayer, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
+ pageSwitchMapper->setMapping(ui.pageSinglePlayer->BtnMultiplayer, ID_PAGE_MULTIPLAYER);
+
connect(ui.pageSinglePlayer->BtnLoad, SIGNAL(clicked()), this, SLOT(GoToSaves()));
connect(ui.pageSinglePlayer->BtnDemos, SIGNAL(clicked()), this, SLOT(GoToDemos()));
connect(ui.pageSinglePlayer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
@@ -194,8 +225,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()));
@@ -205,10 +236,13 @@
connect(ui.pageNetType->BtnLAN, SIGNAL(clicked()), this, SLOT(GoToNet()));
connect(ui.pageNetType->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer()));
+ connect(ui.pageDrawMap->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+
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 +310,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 +333,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();
@@ -336,59 +371,24 @@
ui.pageCampaign->CBTeam->addItems(teamslist);
}
-void HWForm::GoToMain()
-{
- GoToPage(ID_PAGE_MAIN);
-}
-
-void HWForm::GoToSinglePlayer()
-{
- GoToPage(ID_PAGE_SINGLEPLAYER);
-}
-
-void HWForm::GoToTraining()
-{
- GoToPage(ID_PAGE_TRAINING);
-}
-
-void HWForm::GoToCampaign()
-{
- GoToPage(ID_PAGE_CAMPAIGN);
-}
-
-void HWForm::GoToSetup()
-{
- GoToPage(ID_PAGE_SETUP);
-}
-
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);
}
-void HWForm::GoToInfo()
-{
- GoToPage(ID_PAGE_INFO);
-}
-
-void HWForm::GoToMultiplayer()
-{
- GoToPage(ID_PAGE_MULTIPLAYER);
-}
-
void HWForm::GoToSaves()
{
ui.pagePlayDemo->FillFromDir(PagePlayDemo::RT_Save);
@@ -410,24 +410,22 @@
GoToPage(ID_PAGE_NET);
}
-void HWForm::GoToNetType()
+void HWForm::GoToScheme(int index)
{
- GoToPage(ID_PAGE_NETTYPE);
-}
-
-void HWForm::GoToNetServer()
-{
- GoToPage(ID_PAGE_NETSERVER);
-}
-
-void HWForm::GoToSchemes()
-{
+ ui.pageScheme->selectScheme->setCurrentIndex(index);
GoToPage(ID_PAGE_SCHEME);
}
-void HWForm::GoToAdmin()
+void HWForm::GoToNewScheme()
{
- GoToPage(ID_PAGE_ADMIN);
+ ui.pageScheme->newRow();
+ GoToPage(ID_PAGE_SCHEME);
+}
+
+void HWForm::GoToEditScheme()
+{
+ ui.pageScheme->selectScheme->setCurrentIndex(ui.pageOptions->SchemesName->currentIndex());
+ GoToPage(ID_PAGE_SCHEME);
}
void HWForm::OnPageShown(quint8 id, quint8 lastid)
@@ -435,6 +433,24 @@
#ifdef USE_XFIRE
updateXfire();
#endif
+ if(id == ID_PAGE_DRAWMAP)
+ {
+ DrawMapScene * scene;
+ if(lastid == ID_PAGE_MULTIPLAYER)
+ scene = ui.pageMultiplayer->gameCFG->pMapContainer->getDrawMapScene();
+ else
+ scene = ui.pageNetGame->pGameCFG->pMapContainer->getDrawMapScene();
+
+ ui.pageDrawMap->drawMapWidget->setScene(scene);
+ }
+ if(lastid == ID_PAGE_DRAWMAP)
+ {
+ if(id == ID_PAGE_MULTIPLAYER)
+ ui.pageMultiplayer->gameCFG->pMapContainer->mapDrawingFinished();
+ else
+ ui.pageNetGame->pGameCFG->pMapContainer->mapDrawingFinished();
+ }
+
if (id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETGAME) {
QStringList tmNames = config->GetTeamsList();
TeamSelWidget* curTeamSelWidget;
@@ -457,7 +473,7 @@
teamsList.push_back(team);
}
- if(lastid == ID_PAGE_SETUP) { // _TEAM
+ if(lastid == ID_PAGE_SETUP || lastid == ID_PAGE_DRAWMAP) { // _TEAM
if (editedTeam) {
curTeamSelWidget->addTeam(*editedTeam);
}
@@ -490,13 +506,19 @@
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)
+void HWForm::GoToPage(int id)
{
- quint8 lastid = ui.Pages->currentIndex();
+ int lastid = ui.Pages->currentIndex();
PagesStack.push(ui.Pages->currentIndex());
OnPageShown(id, lastid);
ui.Pages->setCurrentIndex(id);
@@ -504,8 +526,8 @@
void HWForm::GoBack()
{
- quint8 id = PagesStack.isEmpty() ? ID_PAGE_MAIN : PagesStack.pop();
- quint8 curid = ui.Pages->currentIndex();
+ int id = PagesStack.isEmpty() ? ID_PAGE_MAIN : PagesStack.pop();
+ int curid = ui.Pages->currentIndex();
ui.Pages->setCurrentIndex(id);
OnPageShown(id, curid);
@@ -521,6 +543,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 +613,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 +655,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 +723,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&)),
@@ -830,7 +875,6 @@
void HWForm::NetDisconnect()
{
- //qDebug("NetDisconnect");
if(hwnet) {
hwnet->Disconnect();
delete hwnet;
@@ -853,8 +897,9 @@
{
if(pnetserver) return; // we have server - let it care of all things
if (hwnet) {
- hwnet->deleteLater();
+ HWNewNet * tmp = hwnet;
hwnet = 0;
+ tmp->deleteLater();
QMessageBox::warning(this, QMessageBox::tr("Network"),
QMessageBox::tr("Connection to server is lost"));
@@ -892,11 +937,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 +956,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 +1139,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");
@@ -1107,6 +1157,8 @@
void HWForm::UpdateCampaignPage(int index)
{
+ Q_UNUSED(index);
+
HWTeam team(ui.pageCampaign->CBTeam->currentText());
ui.pageCampaign->CBSelect->clear();
--- a/QTfrontend/hwform.h Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hwform.h Sun Dec 19 13:31:55 2010 -0500
@@ -42,6 +42,7 @@
class QCloseEvent;
class AmmoSchemeModel;
class QSettings;
+class QSignalMapper;
extern bool frontendEffects;
extern QString playerHash;
@@ -59,24 +60,16 @@
void updateXfire();
private slots:
- void GoToMain();
- void GoToSinglePlayer();
- void GoToSetup();
- void GoToMultiplayer();
void GoToSaves();
void GoToDemos();
void GoToNet();
- void GoToNetType();
- void GoToInfo();
- void GoToTraining();
- void GoToCampaign();
void GoToSelectWeapon();
- void GoToSelectWeaponSet(const QString & name);
+ void GoToSelectWeaponSet(int index);
void GoToSelectNewWeapon();
- void GoToNetServer();
- void GoToSchemes();
- void GoToAdmin();
- void GoToPage(quint8 id);
+ void GoToScheme(int index);
+ void GoToEditScheme();
+ void GoToNewScheme();
+ void GoToPage(int id);
void GoBack();
void AssociateFiles();
void btnExitPressed();
@@ -89,6 +82,8 @@
void RandomName(const int &i);
void TeamSave();
void TeamDiscard();
+ void DeleteScheme();
+ void DeleteWeaponSet();
void SimpleGame();
void PlayDemo();
void StartTraining();
@@ -149,7 +144,8 @@
ID_PAGE_SCHEME = 16,
ID_PAGE_ADMIN = 17,
ID_PAGE_NETTYPE = 18,
- ID_PAGE_CAMPAIGN = 19
+ ID_PAGE_CAMPAIGN = 19,
+ ID_PAGE_DRAWMAP = 20
};
HWGame * game;
HWNetServer* pnetserver;
@@ -158,9 +154,10 @@
HWNewNet * hwnet;
HWNamegen * namegen;
AmmoSchemeModel * ammoSchemeModel;
- QStack<quint8> PagesStack;
+ QStack<int> PagesStack;
QTime eggTimer;
BGWidget * wBackground;
+ QSignalMapper * pageSwitchMapper;
#ifdef __APPLE__
InstallController * panel;
--- a/QTfrontend/hwmap.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hwmap.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -27,12 +27,13 @@
{
}
-void HWMap::getImage(std::string seed, int filter, MapGenerator mapgen, int maze_size)
+void HWMap::getImage(const QString & seed, int filter, MapGenerator mapgen, int maze_size, const QByteArray & drawMapData)
{
m_seed = seed;
templateFilter = filter;
m_mapgen = mapgen;
m_maze_size = maze_size;
+ if(mapgen == MAPGEN_MAZE) m_drawMapData = drawMapData;
Start();
}
@@ -59,9 +60,30 @@
void HWMap::SendToClientFirst()
{
- SendIPC(QString("eseed %1").arg(m_seed.c_str()).toLatin1());
- SendIPC(QString("e$template_filter %1").arg(templateFilter).toLatin1());
- SendIPC(QString("e$mapgen %1").arg(m_mapgen).toLatin1());
- SendIPC(QString("e$maze_size %1").arg(m_maze_size).toLatin1());
+ SendIPC(QString("eseed %1").arg(m_seed).toUtf8());
+ SendIPC(QString("e$template_filter %1").arg(templateFilter).toUtf8());
+ SendIPC(QString("e$mapgen %1").arg(m_mapgen).toUtf8());
+
+ switch (m_mapgen)
+ {
+ case MAPGEN_MAZE:
+ SendIPC(QString("e$maze_size %1").arg(m_maze_size).toUtf8());
+ break;
+
+ case MAPGEN_DRAWN:
+ {
+ QByteArray data = m_drawMapData;
+ while(data.size() > 0)
+ {
+ QByteArray tmp = data;
+ tmp.truncate(200);
+ SendIPC("edraw " + tmp);
+ data.remove(0, 200);
+ }
+ break;
+ }
+ default: ;
+ }
+
SendIPC("!");
}
--- a/QTfrontend/hwmap.h Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/hwmap.h Sun Dec 19 13:31:55 2010 -0500
@@ -25,12 +25,12 @@
#include "tcpBase.h"
-#include <string>
-
enum MapGenerator
{
MAPGEN_REGULAR,
MAPGEN_MAZE,
+ MAPGEN_DRAWN,
+ MAPGEN_MAP
};
class HWMap : public TCPBase
@@ -40,7 +40,7 @@
public:
HWMap();
virtual ~HWMap();
- void getImage(std::string seed, int templateFilter, MapGenerator mapgen, int maze_size);
+ void getImage(const QString & seed, int templateFilter, MapGenerator mapgen, int maze_size, const QByteArray & drawMapData);
protected:
virtual QStringList setArguments();
@@ -52,10 +52,11 @@
void HHLimitReceived(int hhLimit);
private:
- std::string m_seed;
+ QString m_seed;
int templateFilter;
MapGenerator m_mapgen;
int m_maze_size;
+ QByteArray m_drawMapData;
private slots:
};
--- a/QTfrontend/igbox.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/igbox.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -24,6 +24,7 @@
#include "igbox.h"
IconedGroupBox::IconedGroupBox(QWidget * parent)
+ : QGroupBox(parent)
{
// Has issues with border-radius on children
// setAttribute(Qt::WA_PaintOnScreen, true);
@@ -56,6 +57,8 @@
void IconedGroupBox::paintEvent(QPaintEvent * event)
{
+ Q_UNUSED(event);
+
QStylePainter painter(this);
QStyleOptionGroupBox option;
--- a/QTfrontend/itemNum.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/itemNum.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -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();
@@ -67,15 +68,25 @@
void ItemNum::paintEvent(QPaintEvent* event)
{
+ Q_UNUSED(event);
+
QPainter painter(this);
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 +99,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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/itemNum.h Sun Dec 19 13:31:55 2010 -0500
@@ -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/main.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/main.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -399,6 +399,11 @@
tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
mapList = new QStringList(tmpdir.entryList(QStringList("*")));
+ tmpdir.cd(datadir->absolutePath());
+ tmpdir.cd("Scripts/Multiplayer");
+ tmpdir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
+ scriptList = new QStringList(tmpdir.entryList(QStringList("*.lua")));
+
QTranslator Translator;
{
--- a/QTfrontend/mapContainer.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/mapContainer.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -29,6 +29,8 @@
#include <QListWidget>
#include <QVBoxLayout>
#include <QIcon>
+#include <QLineEdit>
+#include <QMessageBox>
#include "hwconsts.h"
#include "mapContainer.h"
@@ -38,8 +40,7 @@
QWidget(parent),
mainLayout(this),
pMap(0),
- mapgen(MAPGEN_REGULAR),
- maze_size(0)
+ mapgen(MAPGEN_REGULAR)
{
hhSmall.load(":/res/hh_small.png");
hhLimit = 18;
@@ -50,16 +51,23 @@
QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin),
QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
- imageButt = new QPushButton(this);
+ QWidget* mapWidget = new QWidget(this);
+ mainLayout.addWidget(mapWidget, 0, 0, Qt::AlignHCenter);
+
+ QGridLayout* mapLayout = new QGridLayout(mapWidget);
+ mapLayout->setMargin(0);
+
+ imageButt = new QPushButton(mapWidget);
imageButt->setObjectName("imageButt");
imageButt->setFixedSize(256 + 6, 128 + 6);
imageButt->setFlat(true);
imageButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);//QSizePolicy::Minimum, QSizePolicy::Minimum);
- mainLayout.addWidget(imageButt, 0, 0, 1, 2);
- connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed()));
- connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme()));
+ mapLayout->addWidget(imageButt, 0, 0, 1, 2);
+ //connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed()));
+ //connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme()));
+ connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomMap()));
- chooseMap = new QComboBox(this);
+ chooseMap = new QComboBox(mapWidget);
chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
chooseMap->addItem(
// FIXME - need real icons. Disabling until then
@@ -69,9 +77,14 @@
// FIXME - need real icons. Disabling until then
//QIcon(":/res/mapMaze.png"),
QComboBox::tr("generated maze..."));
+
+ chooseMap->addItem(QComboBox::tr("hand drawn map..."));
+ chooseMap->insertSeparator(chooseMap->count()); // separator between generators and missions
+
chooseMap->insertSeparator(chooseMap->count()); // separator between generators and missions
int missionindex = chooseMap->count();
+ numMissions = 0;
for (int i = 0; i < mapList->size(); ++i) {
QString map = (*mapList)[i];
QFile mapCfgFile(
@@ -86,10 +99,14 @@
if (mapCfgFile.open(QFile::ReadOnly)) {
QString theme;
quint32 limit = 0;
+ QString scheme;
+ QString weapons;
QList<QVariant> mapInfo;
QTextStream input(&mapCfgFile);
input >> theme;
input >> limit;
+ input >> scheme;
+ input >> weapons;
mapInfo.push_back(map);
mapInfo.push_back(theme);
if (limit)
@@ -97,45 +114,56 @@
else
mapInfo.push_back(18);
mapInfo.push_back(mapLuaFile.exists());
+ if (scheme.isEmpty())
+ scheme = "locked";
+ scheme.replace("_", " ");
+ if (weapons.isEmpty())
+ weapons = "locked";
+ weapons.replace("_", " ");
+ mapInfo.push_back(scheme);
+ mapInfo.push_back(weapons);
if(mapLuaFile.exists())
+ {
chooseMap->insertItem(missionindex++,
// FIXME - need real icons. Disabling until then
//QIcon(":/res/mapMission.png"),
QComboBox::tr("Mission") + ": " + map, mapInfo);
+ numMissions++;
+ }
else
chooseMap->addItem(
// FIXME - need real icons. Disabling until then
-//QIcon(":/res/mapCustom.png"),
- map, mapInfo);
+//QIcon(":/res/mapCustom.png"),
+map, mapInfo);
mapCfgFile.close();
}
}
chooseMap->insertSeparator(missionindex); // separator between missions and maps
connect(chooseMap, SIGNAL(currentIndexChanged(int)), this, SLOT(mapChanged(int)));
- mainLayout.addWidget(chooseMap, 1, 1);
+ mapLayout->addWidget(chooseMap, 1, 1);
- QLabel * lblMap = new QLabel(tr("Map"), this);
- mainLayout.addWidget(lblMap, 1, 0);
+ QLabel * lblMap = new QLabel(tr("Map"), mapWidget);
+ mapLayout->addWidget(lblMap, 1, 0);
- lblFilter = new QLabel(tr("Filter"), this);
- mainLayout.addWidget(lblFilter, 2, 0);
+ lblFilter = new QLabel(tr("Filter"), mapWidget);
+ mapLayout->addWidget(lblFilter, 2, 0);
- CB_TemplateFilter = new QComboBox(this);
+ CB_TemplateFilter = new QComboBox(mapWidget);
CB_TemplateFilter->addItem(tr("All"), 0);
CB_TemplateFilter->addItem(tr("Small"), 1);
CB_TemplateFilter->addItem(tr("Medium"), 2);
CB_TemplateFilter->addItem(tr("Large"), 3);
CB_TemplateFilter->addItem(tr("Cavern"), 4);
CB_TemplateFilter->addItem(tr("Wacky"), 5);
- mainLayout.addWidget(CB_TemplateFilter, 2, 1);
+ mapLayout->addWidget(CB_TemplateFilter, 2, 1);
connect(CB_TemplateFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(templateFilterChanged(int)));
- maze_size_label = new QLabel(tr("Type"), this);
+ maze_size_label = new QLabel(tr("Type"), mapWidget);
mainLayout.addWidget(maze_size_label, 2, 0);
maze_size_label->hide();
- maze_size_selection = new QComboBox(this);
+ maze_size_selection = new QComboBox(mapWidget);
maze_size_selection->addItem(tr("Small tunnels"), 0);
maze_size_selection->addItem(tr("Medium tunnels"), 1);
maze_size_selection->addItem(tr("Large tunnels"), 2);
@@ -143,23 +171,23 @@
maze_size_selection->addItem(tr("Medium floating islands"), 4);
maze_size_selection->addItem(tr("Large floating islands"), 5);
maze_size_selection->setCurrentIndex(1);
- maze_size = 1;
- mainLayout.addWidget(maze_size_selection, 2, 1);
+
+ mapLayout->addWidget(maze_size_selection, 2, 1);
maze_size_selection->hide();
connect(maze_size_selection, SIGNAL(currentIndexChanged(int)), this, SLOT(setMaze_size(int)));
- gbThemes = new IconedGroupBox(this);
+ gbThemes = new IconedGroupBox(mapWidget);
gbThemes->setTitleTextPadding(60);
gbThemes->setContentTopPadding(6);
gbThemes->setTitle(tr("Themes"));
//gbThemes->setStyleSheet("padding: 0px"); // doesn't work - stylesheet is set with icon
- mainLayout.addWidget(gbThemes, 0, 2, 3, 1);
+ mapLayout->addWidget(gbThemes, 0, 2, 3, 1);
QVBoxLayout * gbTLayout = new QVBoxLayout(gbThemes);
gbTLayout->setContentsMargins(0, 0, 0 ,0);
gbTLayout->setSpacing(0);
- lwThemes = new QListWidget(this);
+ lwThemes = new QListWidget(mapWidget);
lwThemes->setMinimumHeight(30);
lwThemes->setFixedWidth(140);
for (int i = 0; i < Themes->size(); ++i) {
@@ -188,7 +216,26 @@
gbTLayout->addWidget(lwThemes);
lwThemes->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum);
- mainLayout.setSizeConstraint(QLayout::SetFixedSize);//SetMinimumSize
+ mapLayout->setSizeConstraint(QLayout::SetFixedSize);
+
+ QWidget* seedWidget = new QWidget(this);
+ mainLayout.addWidget(seedWidget, 1, 0);
+
+ QGridLayout* seedLayout = new QGridLayout(seedWidget);
+ seedLayout->setMargin(0);
+
+ QLabel* seedLabel = new QLabel(tr("Seed"), seedWidget);
+ seedLayout->addWidget(seedLabel, 3, 0);
+ seedEdit = new QLineEdit(seedWidget);
+ seedEdit->setMaxLength(54);
+ connect(seedEdit, SIGNAL(returnPressed()), this, SLOT(seedEdited()));
+ seedLayout->addWidget(seedEdit, 3, 1);
+ seedLayout->setColumnStretch(1, 5);
+ seedSet = new QPushButton(seedWidget);
+ seedSet->setText(QPushButton::tr("Set"));
+ connect(seedSet, SIGNAL(clicked()), this, SLOT(seedEdited()));
+ seedLayout->setColumnStretch(2, 1);
+ seedLayout->addWidget(seedSet, 3, 2);
setRandomSeed();
setRandomTheme();
@@ -211,7 +258,7 @@
p.drawPixmap(QPoint(0, 0), px);
addInfoToPreview(pxres);
- chooseMap->setCurrentIndex(mapgen);
+ //chooseMap->setCurrentIndex(mapgen);
pMap = 0;
}
@@ -225,7 +272,7 @@
switch(index) {
case MAPGEN_REGULAR:
mapgen = MAPGEN_REGULAR;
- changeImage();
+ updatePreview();
gbThemes->show();
lblFilter->show();
CB_TemplateFilter->show();
@@ -237,7 +284,7 @@
break;
case MAPGEN_MAZE:
mapgen = MAPGEN_MAZE;
- changeImage();
+ updatePreview();
gbThemes->show();
lblFilter->hide();
CB_TemplateFilter->hide();
@@ -247,8 +294,20 @@
emit mapgenChanged(mapgen);
emit themeChanged(chooseMap->itemData(index).toList()[1].toString());
break;
+ case MAPGEN_DRAWN:
+ mapgen = MAPGEN_DRAWN;
+ updatePreview();
+ gbThemes->show();
+ lblFilter->hide();
+ CB_TemplateFilter->hide();
+ maze_size_label->hide();
+ maze_size_selection->hide();
+ emit mapChanged("+drawn+");
+ emit mapgenChanged(mapgen);
+ emit themeChanged(chooseMap->itemData(index).toList()[1].toString());
+ break;
default:
- loadMap(index);
+ updatePreview();
gbThemes->hide();
lblFilter->hide();
CB_TemplateFilter->hide();
@@ -258,19 +317,6 @@
}
}
-void HWMapContainer::loadMap(int index)
-{
- QPixmap mapImage;
- if(!mapImage.load(datadir->absolutePath() + "/Maps/" + chooseMap->itemData(index).toList()[0].toString() + "/preview.png")) {
- changeImage();
- chooseMap->setCurrentIndex(0);
- return;
- }
-
- hhLimit = chooseMap->itemData(index).toList()[2].toInt();
- addInfoToPreview(mapImage);
-}
-
// Should this add text to identify map size?
void HWMapContainer::addInfoToPreview(QPixmap image)
{
@@ -291,7 +337,7 @@
imageButt->setIconSize(image.size());
}
-void HWMapContainer::changeImage()
+void HWMapContainer::askForGeneratedPreview()
{
if (pMap)
{
@@ -303,24 +349,27 @@
pMap = new HWMap();
connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int)));
- pMap->getImage(m_seed.toStdString(), getTemplateFilter(), mapgen, maze_size);
+ pMap->getImage(m_seed,
+ getTemplateFilter(),
+ get_mapgen(),
+ get_maze_size(),
+ getDrawnMapData()
+ );
}
void HWMapContainer::themeSelected(int currentRow)
{
QString theme = Themes->at(currentRow);
- QList<QVariant> mapInfoRegular;
- mapInfoRegular.push_back(QString("+rnd+"));
- mapInfoRegular.push_back(theme);
- mapInfoRegular.push_back(18);
- mapInfoRegular.push_back(false);
- chooseMap->setItemData(0, mapInfoRegular);
- QList<QVariant> mapInfoMaze;
- mapInfoMaze.push_back(QString("+maze+"));
- mapInfoMaze.push_back(theme);
- mapInfoMaze.push_back(18);
- mapInfoMaze.push_back(false);
- chooseMap->setItemData(1, mapInfoMaze);
+ QList<QVariant> mapInfo;
+ mapInfo.push_back(QString("+rnd+"));
+ mapInfo.push_back(theme);
+ mapInfo.push_back(18);
+ mapInfo.push_back(false);
+ chooseMap->setItemData(0, mapInfo);
+ mapInfo[0] = QString("+maze+");
+ chooseMap->setItemData(1, mapInfo);
+ mapInfo[0] = QString("+drawn+");
+ chooseMap->setItemData(2, mapInfo);
gbThemes->setIcon(QIcon(QString("%1/Themes/%2/icon.png").arg(datadir->absolutePath()).arg(theme)));
emit themeChanged(theme);
}
@@ -332,7 +381,7 @@
QString HWMapContainer::getCurrentMap() const
{
- if(chooseMap->currentIndex() <= 1) return QString();
+ if(chooseMap->currentIndex() < MAPGEN_MAP) return QString();
return chooseMap->itemData(chooseMap->currentIndex()).toList()[0].toString();
}
@@ -352,6 +401,16 @@
return hhLimit;
}
+QString HWMapContainer::getCurrentScheme() const
+{
+ return chooseMap->itemData(chooseMap->currentIndex()).toList()[4].toString();
+}
+
+QString HWMapContainer::getCurrentWeapons() const
+{
+ return chooseMap->itemData(chooseMap->currentIndex()).toList()[5].toString();
+}
+
quint32 HWMapContainer::getTemplateFilter() const
{
return CB_TemplateFilter->itemData(CB_TemplateFilter->currentIndex()).toInt();
@@ -359,23 +418,21 @@
void HWMapContainer::resizeEvent ( QResizeEvent * event )
{
+ Q_UNUSED(event);
//imageButt->setIconSize(imageButt->size());
}
void HWMapContainer::setSeed(const QString & seed)
{
m_seed = seed;
- changeImage();
+ if (seed != seedEdit->text())
+ seedEdit->setText(seed);
+ if (chooseMap->currentIndex() < MAPGEN_MAP)
+ updatePreview();
}
void HWMapContainer::setMap(const QString & map)
{
- if(map == "+rnd+" || map == "+maze+")
- {
- changeImage();
- return;
- }
-
int id = 0;
for(int i = 0; i < chooseMap->count(); i++)
if(!chooseMap->itemData(i).isNull() && chooseMap->itemData(i).toList()[0].toString() == map)
@@ -392,7 +449,7 @@
pMap = 0;
}
chooseMap->setCurrentIndex(id);
- loadMap(id);
+ updatePreview();
}
}
@@ -403,11 +460,49 @@
lwThemes->setCurrentItem(items.at(0));
}
+void HWMapContainer::setRandomMap()
+{
+ setRandomSeed();
+ switch(chooseMap->currentIndex())
+ {
+ case MAPGEN_REGULAR:
+ case MAPGEN_MAZE:
+ setRandomTheme();
+ break;
+ case MAPGEN_DRAWN:
+ emit drawMapRequested();
+ break;
+ default:
+ if(chooseMap->currentIndex() <= numMissions + MAPGEN_MAP + 1)
+ setRandomMission();
+ else
+ setRandomStatic();
+ break;
+ }
+}
+
+void HWMapContainer::setRandomStatic()
+{
+ int i = MAPGEN_MAP + 3 + numMissions + rand() % (chooseMap->count() - MAPGEN_MAP - 3 - numMissions);
+ chooseMap->setCurrentIndex(i);
+ setRandomSeed();
+}
+
+void HWMapContainer::setRandomMission()
+{
+ int i = MAPGEN_MAP + 2 + rand() % numMissions;
+ qDebug() << i << MAPGEN_MAP << numMissions;
+ chooseMap->setCurrentIndex(i);
+ setRandomSeed();
+}
+
void HWMapContainer::setRandomSeed()
{
m_seed = QUuid::createUuid().toString();
+ seedEdit->setText(m_seed);
emit seedChanged(m_seed);
- changeImage();
+ if (chooseMap->currentIndex() < MAPGEN_MAP)
+ updatePreview();
}
void HWMapContainer::setRandomTheme()
@@ -425,7 +520,7 @@
void HWMapContainer::templateFilterChanged(int filter)
{
emit newTemplateFilter(filter);
- changeImage();
+ updatePreview();
}
MapGenerator HWMapContainer::get_mapgen(void) const
@@ -435,20 +530,82 @@
int HWMapContainer::get_maze_size(void) const
{
- return maze_size;
+ return maze_size_selection->currentIndex();
}
void HWMapContainer::setMaze_size(int size)
{
- maze_size = size;
maze_size_selection->setCurrentIndex(size);
emit maze_sizeChanged(size);
- changeImage();
+ updatePreview();
}
void HWMapContainer::setMapgen(MapGenerator m)
{
mapgen = m;
+ chooseMap->setCurrentIndex(m);
emit mapgenChanged(m);
- changeImage();
+ updatePreview();
+}
+
+void HWMapContainer::setDrawnMapData(const QByteArray & ar)
+{
+ drawMapScene.decode(ar);
+ updatePreview();
+}
+
+QByteArray HWMapContainer::getDrawnMapData()
+{
+ return drawMapScene.encode();
+}
+
+void HWMapContainer::seedEdited()
+{
+ if (seedEdit->text().isEmpty())
+ seedEdit->setText(m_seed);
+ else
+ {
+ setSeed(seedEdit->text());
+ emit seedChanged(seedEdit->text());
+ }
+}
+
+DrawMapScene * HWMapContainer::getDrawMapScene()
+{
+ return &drawMapScene;
}
+
+void HWMapContainer::mapDrawingFinished()
+{
+ emit drawnMapChanged(getDrawnMapData());
+
+ updatePreview();
+}
+
+void HWMapContainer::updatePreview()
+{
+ int curIndex = chooseMap->currentIndex();
+
+ switch(curIndex)
+ {
+ case MAPGEN_REGULAR:
+ askForGeneratedPreview();
+ break;
+ case MAPGEN_MAZE:
+ askForGeneratedPreview();
+ break;
+ case MAPGEN_DRAWN:
+ askForGeneratedPreview();
+ break;
+ default:
+ QPixmap mapImage;
+ qDebug() << "Map data" << curIndex << chooseMap->currentText() << chooseMap->itemData(curIndex);
+ if(!mapImage.load(datadir->absolutePath() + "/Maps/" + chooseMap->itemData(curIndex).toList()[0].toString() + "/preview.png")) {
+ imageButt->setIcon(QIcon());
+ return;
+ }
+
+ hhLimit = chooseMap->itemData(curIndex).toList()[2].toInt();
+ addInfoToPreview(mapImage);
+ }
+}
--- a/QTfrontend/mapContainer.h Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/mapContainer.h Sun Dec 19 13:31:55 2010 -0500
@@ -23,8 +23,11 @@
#include <QGridLayout>
#include <QComboBox>
#include <QLabel>
+#include <QByteArray>
+#include <QLineEdit>
#include "hwmap.h"
+#include "drawmapscene.h"
class QPushButton;
class IconedGroupBox;
@@ -44,19 +47,25 @@
QString getCurrentMap() const;
QString getCurrentTheme() const;
int getCurrentHHLimit() const;
+ QString getCurrentScheme() const;
+ QString getCurrentWeapons() const;
quint32 getTemplateFilter() const;
MapGenerator get_mapgen(void) const;
int get_maze_size(void) const;
bool getCurrentIsMission() const;
+ QByteArray getDrawnMapData();
+ DrawMapScene * getDrawMapScene();
+ void mapDrawingFinished();
public slots:
- void changeImage();
+ void askForGeneratedPreview();
void setSeed(const QString & seed);
void setMap(const QString & map);
void setTheme(const QString & theme);
void setTemplateFilter(int);
void setMapgen(MapGenerator m);
void setMaze_size(int size);
+ void setDrawnMapData(const QByteArray & ar);
signals:
void seedChanged(const QString & seed);
@@ -65,6 +74,8 @@
void newTemplateFilter(int filter);
void mapgenChanged(MapGenerator m);
void maze_sizeChanged(int s);
+ void drawMapRequested();
+ void drawnMapChanged(const QByteArray & data);
private slots:
void setImage(const QImage newImage);
@@ -72,9 +83,13 @@
void mapChanged(int index);
void setRandomSeed();
void setRandomTheme();
+ void setRandomMap();
+ void setRandomStatic();
+ void setRandomMission();
void themeSelected(int currentRow);
void addInfoToPreview(QPixmap image);
void templateFilterChanged(int filter);
+ void seedEdited();
protected:
virtual void resizeEvent ( QResizeEvent * event );
@@ -87,6 +102,8 @@
QListWidget* lwThemes;
HWMap* pMap;
QString m_seed;
+ QLineEdit* seedEdit;
+ QPushButton* seedSet;
int hhLimit;
int templateFilter;
QPixmap hhSmall;
@@ -95,9 +112,10 @@
QLabel *maze_size_label;
QComboBox *maze_size_selection;
MapGenerator mapgen;
- int maze_size;
+ int numMissions;
+ DrawMapScene drawMapScene;
- void loadMap(int index);
+ void updatePreview();
};
#endif // _HWMAP_CONTAINER_INCLUDED
--- a/QTfrontend/netregister.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/netregister.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -21,7 +21,8 @@
HWNetRegisterServer::HWNetRegisterServer(QObject *parent, const QString & descr, quint16 port) :
QObject(parent)
{
-
+ Q_UNUSED(descr);
+ Q_UNUSED(port);
}
void HWNetRegisterServer::unregister()
--- a/QTfrontend/pages.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/pages.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -63,6 +63,7 @@
#include "togglebutton.h"
#include "hwform.h"
#include "SDLs.h"
+#include "drawmapwidget.h"
PageMain::PageMain(QWidget* parent) :
AbstractPage(parent)
@@ -440,17 +441,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 +528,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 +766,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 +931,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 +1029,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 +1104,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) :
@@ -1562,6 +1609,14 @@
TBW_perhogammo->setToolTip("<b>" + ToggleButtonWidget::tr("Per Hedgehog Ammo") + "</b>:<br />" + tr("Each hedgehog has its own ammo. It does not share with the team."));
glGMLayout->addWidget(TBW_perhogammo,4,0,1,1);
+ TBW_nowind = new ToggleButtonWidget(gbGameModes, ":/res/btnNoWind.png");
+ TBW_nowind->setToolTip("<b>" + ToggleButtonWidget::tr("Disable Wind") + "</b>:<br />" + tr("You will not have to worry about wind anymore."));
+ glGMLayout->addWidget(TBW_nowind,4,1,1,1);
+
+ TBW_morewind = new ToggleButtonWidget(gbGameModes, ":/res/btnMoreWind.png");
+ TBW_morewind->setToolTip("<b>" + ToggleButtonWidget::tr("More Wind") + "</b>:<br />" + tr("Wind will affect almost everything."));
+ glGMLayout->addWidget(TBW_morewind,4,2,1,1);
+
// Right
QLabel * l;
@@ -1650,105 +1705,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:"));
@@ -1800,19 +1868,22 @@
mapper->addMapping(TBW_infattack, 19);
mapper->addMapping(TBW_resetweps, 20);
mapper->addMapping(TBW_perhogammo, 21);
- mapper->addMapping(SB_DamageModifier, 22);
- mapper->addMapping(SB_TurnTime, 23);
- mapper->addMapping(SB_InitHealth, 24);
- mapper->addMapping(SB_SuddenDeath, 25);
- mapper->addMapping(SB_CaseProb, 26);
- mapper->addMapping(SB_MinesTime, 27);
- mapper->addMapping(SB_Mines, 28);
- mapper->addMapping(SB_MineDuds, 29);
- mapper->addMapping(SB_Explosives, 30);
- mapper->addMapping(SB_HealthCrates, 31);
- mapper->addMapping(SB_CrateHealth, 32);
- mapper->addMapping(SB_WaterRise, 33);
- mapper->addMapping(SB_HealthDecrease, 34);
+ mapper->addMapping(TBW_nowind, 22);
+ mapper->addMapping(TBW_morewind, 23);
+ mapper->addMapping(SB_DamageModifier, 24);
+ mapper->addMapping(SB_TurnTime, 25);
+ mapper->addMapping(SB_InitHealth, 26);
+ mapper->addMapping(SB_SuddenDeath, 27);
+ mapper->addMapping(SB_CaseProb, 28);
+ mapper->addMapping(SB_MinesTime, 29);
+ mapper->addMapping(SB_Mines, 30);
+ mapper->addMapping(SB_MineDuds, 31);
+ mapper->addMapping(SB_Explosives, 32);
+ mapper->addMapping(SB_HealthCrates, 33);
+ mapper->addMapping(SB_CrateHealth, 34);
+ mapper->addMapping(SB_WaterRise, 35);
+ mapper->addMapping(SB_HealthDecrease, 36);
+ mapper->addMapping(SB_RopeModifier, 37);
mapper->toFirst();
}
@@ -1826,8 +1897,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)
@@ -1936,3 +2011,15 @@
BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
}
+
+/////////////////////////////////////////////////
+
+PageDrawMap::PageDrawMap(QWidget* parent) : AbstractPage(parent)
+{
+ QGridLayout * pageLayout = new QGridLayout(this);
+
+ BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true);
+
+ drawMapWidget = new DrawMapWidget(this);
+ pageLayout->addWidget(drawMapWidget, 0, 0, 1, 2);
+}
--- a/QTfrontend/pages.h Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/pages.h Sun Dec 19 13:31:55 2010 -0500
@@ -61,6 +61,8 @@
class IconedGroupBox;
class FreqSpinBox;
+class DrawMapWidget;
+
class AbstractPage : public QWidget
{
Q_OBJECT
@@ -69,6 +71,8 @@
protected:
AbstractPage(QWidget* parent = 0) {
+ Q_UNUSED(parent);
+
font14 = new QFont("MS Shell Dlg", 14);
setFocusPolicy(Qt::StrongFocus);
}
@@ -196,6 +200,9 @@
GameCFGWidget *gameCFG;
TeamSelWidget *teamsSelect;
QPushButton *BtnStartMPGame;
+
+signals:
+ void SetupClicked();
};
class PageOptions : public AbstractPage
@@ -205,11 +212,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 +326,9 @@
public slots:
void setReadyStatus(bool isReady);
void setMasterMode(bool isMaster);
+
+signals:
+ void SetupClicked();
};
class PageInfo : public AbstractPage
@@ -379,8 +394,10 @@
QPushButton *BtnSave;
QPushButton *BtnDefault;
QPushButton *BtnDelete;
+ QPushButton *BtnNew;
QPushButton *BtnBack;
SelWeaponWidget* pWeapons;
+ QComboBox* selectWeaponSet;
};
class PageInGame : public AbstractPage
@@ -455,9 +472,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;
@@ -481,6 +503,8 @@
ToggleButtonWidget * TBW_infattack;
ToggleButtonWidget * TBW_resetweps;
ToggleButtonWidget * TBW_perhogammo;
+ ToggleButtonWidget * TBW_nowind;
+ ToggleButtonWidget * TBW_morewind;
QSpinBox * SB_DamageModifier;
QSpinBox * SB_TurnTime;
@@ -495,16 +519,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
@@ -553,4 +576,17 @@
QPushButton * BtnOfficialServer;
};
+
+class PageDrawMap : public AbstractPage
+{
+ Q_OBJECT
+
+public:
+ PageDrawMap(QWidget* parent = 0);
+
+ QPushButton * BtnBack;
+
+ DrawMapWidget * drawMapWidget;
+};
+
#endif // PAGES_H
--- a/QTfrontend/predefteams.h Mon Dec 06 03:07:03 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
--- a/QTfrontend/proto.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/proto.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -23,14 +23,19 @@
}
+QByteArray & HWProto::addByteArrayToBuffer(QByteArray & buf, const QByteArray & msg)
+{
+ QByteArray bmsg = msg;
+ bmsg = bmsg.left(250);
+ quint8 sz = bmsg.size();
+ buf.append(QByteArray((char *)&sz, 1));
+ buf.append(bmsg);
+ return buf;
+}
+
QByteArray & HWProto::addStringToBuffer(QByteArray & buf, const QString & string)
{
- QByteArray strmsg = string.toUtf8();
- strmsg = strmsg.left(250);
- quint8 sz = strmsg.size();
- buf.append(QByteArray((char *)&sz, 1));
- buf.append(strmsg);
- return buf;
+ return addByteArrayToBuffer(buf, string.toUtf8());
}
QByteArray & HWProto::addStringListToBuffer(QByteArray & buf, const QStringList & strList)
--- a/QTfrontend/proto.h Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/proto.h Sun Dec 19 13:31:55 2010 -0500
@@ -31,6 +31,7 @@
public:
HWProto();
static QByteArray & addStringToBuffer(QByteArray & buf, const QString & string);
+ static QByteArray & addByteArrayToBuffer(QByteArray & buf, const QByteArray & msg);
static QByteArray & addStringListToBuffer(QByteArray & buf, const QStringList & strList);
static QString formatChatMsg(const QString & nick, const QString & msg);
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/qaspectratiolayout.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#include "qaspectratiolayout.h"
+
+QAspectRatioLayout::QAspectRatioLayout(QWidget* parent, int spacing) : QLayout(parent) {
+ init(spacing);
+}
+
+QAspectRatioLayout::QAspectRatioLayout(int spacing) {
+ init(spacing);
+}
+
+QAspectRatioLayout::~QAspectRatioLayout() {
+ delete item;
+ delete lastReceivedRect;
+ delete _geometry;
+}
+
+void QAspectRatioLayout::init(int spacing) {
+ item = 0;
+ lastReceivedRect = new QRect(0, 0, 0, 0);
+ _geometry = new QRect(0, 0, 0, 0);
+ setSpacing(spacing);
+}
+
+
+/* Adds item if place isn't already taken. */
+void QAspectRatioLayout::add(QLayoutItem* item) {
+ if(!hasItem()) {
+ replaceItem(item);
+ }
+}
+
+/* Adds item if place isn't already taken. */
+void QAspectRatioLayout::addItem(QLayoutItem* item) {
+ if(!hasItem()) {
+ replaceItem(item);
+ }
+}
+
+/* Adds widget if place isn't already taken. */
+void QAspectRatioLayout::addWidget(QWidget* widget) {
+ if(!hasItem()) {
+ replaceItem(new QWidgetItem(widget));
+ }
+}
+
+/* Returns the item pointer and dereferences it here. */
+QLayoutItem* QAspectRatioLayout::take() {
+ QLayoutItem* item = 0;
+ if(this->hasItem()) {
+ item = this->item;
+ this->item = 0;
+ }
+ return item;
+}
+
+/* Returns the item pointer and dereferences it here. */
+QLayoutItem* QAspectRatioLayout::takeAt(int index) {
+ if(index != 0) {
+ return 0;
+ }
+ return this->take();
+}
+
+/* Returns the item pointer. */
+QLayoutItem* QAspectRatioLayout::itemAt(int index) const {
+ if(index != 0) {
+ return 0;
+ }
+ if(hasItem()) {
+ return this->item;
+ }
+ return 0;
+}
+
+/* Checks if we have an item. */
+bool QAspectRatioLayout::hasItem() const {
+ return this->item != 0;
+}
+
+/* Returns the count of items which can be either 0 or 1. */
+int QAspectRatioLayout::count() const {
+ int returnValue = 0;
+ if(hasItem()) {
+ returnValue = 1;
+ }
+ return returnValue;
+}
+
+/* Replaces the item with the new and returns the old. */
+QLayoutItem* QAspectRatioLayout::replaceItem(QLayoutItem* item) {
+ QLayoutItem* old = 0;
+ if(this->hasItem()) {
+ old = this->item;
+ }
+ this->item = item;
+ setGeometry(*this->_geometry);
+ return old;
+}
+
+/* Tells which way layout expands. */
+Qt::Orientations QAspectRatioLayout::expandingDirections() const {
+ return Qt::Horizontal | Qt::Vertical;
+}
+
+/* Tells which size is preferred. */
+QSize QAspectRatioLayout::sizeHint() const {
+ return this->item->minimumSize();
+}
+
+/* Tells minimum size. */
+QSize QAspectRatioLayout::minimumSize() const {
+ return this->item->minimumSize();
+}
+
+/*
+ * Tells if heightForWidth calculations is handled.
+ * It isn't since width isn't enough to calculate
+ * proper size.
+ */
+bool QAspectRatioLayout::hasHeightForWidth() const {
+ return false;
+}
+
+/* Replaces lastReceivedRect. */
+void QAspectRatioLayout::setLastReceivedRect(const QRect& rect) {
+ QRect* oldRect = this->lastReceivedRect;
+ this->lastReceivedRect = new QRect(rect.topLeft(), rect.size());
+ delete oldRect;
+}
+
+/* Returns geometry */
+QRect QAspectRatioLayout::geometry() {
+ return QRect(*this->_geometry);
+}
+
+/* Sets geometry to given size. */
+void QAspectRatioLayout::setGeometry(const QRect& rect) {
+ /*
+ * We check if the item is set and
+ * if size is the same previously received.
+ * If either is false nothing is done.
+ */
+ if(!this->hasItem() ||
+ areRectsEqual(*this->lastReceivedRect, rect)) {
+ return;
+ }
+ /* Replace the last received rectangle. */
+ setLastReceivedRect(rect);
+ /* Calculate proper size for the item relative to the received size. */
+ QSize properSize = calculateProperSize(rect.size());
+ /* Calculate center location in the rect and with item size. */
+ QPoint properLocation = calculateCenterLocation(rect.size(), properSize);
+ /* Set items geometry */
+ this->item->setGeometry(QRect(properLocation, properSize));
+ QRect* oldRect = this->_geometry;
+ /* Cache the calculated geometry. */
+ this->_geometry = new QRect(properLocation, properSize);
+ delete oldRect;
+ /* Super classes setGeometry */
+ QLayout::setGeometry(*this->_geometry);
+}
+
+/* Takes the shortest side and creates QSize
+ * with the shortest side as width and height. */
+QSize QAspectRatioLayout::calculateProperSize(QSize from) const {
+ QSize properSize;
+ if(from.height() * 2 < from.width()) {
+ properSize.setHeight(from.height() - this->margin());
+ properSize.setWidth(from.height() * 2 - this->margin());
+ }
+ else {
+ properSize.setWidth(from.width() - this->margin());
+ properSize.setHeight(from.width() / 2 - this->margin());
+ }
+ return properSize;
+}
+
+/* Calculates center location from the given height and width for item size. */
+QPoint QAspectRatioLayout::calculateCenterLocation(QSize from,
+ QSize itemSize) const {
+ QPoint centerLocation;
+ if((from.width() - itemSize.width()) > 0) {
+ centerLocation.setX((from.width() - itemSize.width())/2);
+ }
+ if((from.height() - itemSize.height()) > 0) {
+ centerLocation.setY((from.height() - itemSize.height())/2);
+ }
+ return centerLocation;
+}
+
+/* Compares if two QRects are equal. */
+bool QAspectRatioLayout::areRectsEqual(const QRect& a,
+ const QRect& b) const {
+ bool result = false;
+ if(a.x() == b.x() &&
+ a.y() == b.y() &&
+ a.height() == b.height() &&
+ a.width() == b.width()) {
+ result = true;
+ }
+ return result;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/qaspectratiolayout.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#ifndef QASPECTRATIOLAYOUT_H_
+#define QASPECTRATIOLAYOUT_H_
+
+#include <QLayout>
+#include <QPointer>
+#include <QRect>
+#include <QWidgetItem>
+#include <QLayoutItem>
+
+
+class QAspectRatioLayout : public QLayout
+{
+ Q_OBJECT
+
+public:
+ QAspectRatioLayout(QWidget* parent, int spacing =-1);
+ QAspectRatioLayout(int spacing = -1);
+ ~QAspectRatioLayout();
+
+ /* Convenience method */
+ virtual void add(QLayoutItem* item);
+
+/* http://doc.trolltech.com/qlayout.html#addItem */
+ virtual void addItem(QLayoutItem* item);
+ /* http://doc.trolltech.com/qlayout.html#addWidget */
+ virtual void addWidget(QWidget* widget);
+ /* http://doc.trolltech.com/qlayout.html#takeAt */
+ virtual QLayoutItem* takeAt(int index);
+ /* http://doc.trolltech.com/qlayout.html#itemAt */
+ virtual QLayoutItem* itemAt(int index) const;
+ /* http://doc.trolltech.com/qlayout.html#count */
+ virtual int count() const;
+
+ /*
+ * These are ours since we do have only one item.
+ */
+ virtual QLayoutItem* replaceItem(QLayoutItem* item);
+ virtual QLayoutItem* take();
+ virtual bool hasItem() const;
+
+/* http://doc.trolltech.com/qlayout.html#expandingDirections */
+ virtual Qt::Orientations expandingDirections() const;
+
+ /*
+ * This method contains most of the juice of this article.
+ * http://doc.trolltech.com/qlayoutitem.html#setGeometry
+ */
+ virtual void setGeometry(const QRect& rect);
+ /* http://doc.trolltech.com/qlayoutitem.html#geometry */
+ virtual QRect geometry();
+
+ /* http://doc.trolltech.com/qlayoutitem.html#sizeHint */
+ virtual QSize sizeHint() const;
+ /* http://doc.trolltech.com/qlayout.html#minimumSize */
+ virtual QSize minimumSize() const;
+ /* http://doc.trolltech.com/qlayoutitem.html#hasHeightForWidth */
+ virtual bool hasHeightForWidth() const;
+
+private:
+ /* Saves the last received rect. */
+ void setLastReceivedRect(const QRect& rect);
+ /* Used to initialize the object. */
+ void init(int spacing);
+ /* Calculates the maximum size for the item from the assigned size. */
+ QSize calculateProperSize(QSize from) const;
+ /* Calculates the center location from the assigned size and
+ * the items size. */
+ QPoint calculateCenterLocation(QSize from, QSize itemSize) const;
+ /* Check if two QRects are equal */
+ bool areRectsEqual(const QRect& a, const QRect& b) const;
+ /* Contains item reference */
+ QLayoutItem* item;
+ /*
+ * Used for caching so we won't do calculations every time
+ * setGeometry is called.
+ */
+ QRect* lastReceivedRect;
+ /* Contains geometry */
+ QRect* _geometry;
+
+};
+
+#endif /* QASPECTRATIOLAYOUT_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/btnMoreWind.png has changed
Binary file QTfrontend/res/btnNoWind.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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/selectWeapon.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/selectWeapon.h Sun Dec 19 13:31:55 2010 -0500
@@ -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/statsPage.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/statsPage.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -31,6 +31,8 @@
void FitGraphicsView::resizeEvent(QResizeEvent * event)
{
+ Q_UNUSED(event);
+
fitInView(sceneRect());
}
--- a/QTfrontend/teamselect.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/teamselect.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/teamselect.h Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/teamselhelper.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -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/togglebutton.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/togglebutton.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -19,6 +19,7 @@
#include "togglebutton.h"
ToggleButtonWidget::ToggleButtonWidget(QWidget * parent, QString img)
+ : QPushButton(parent)
{
setCheckable(true);
--- a/QTfrontend/ui_hwform.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/ui_hwform.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -116,4 +116,7 @@
pageCampaign = new PageCampaign();
Pages->addWidget(pageCampaign);
+
+ pageDrawMap = new PageDrawMap();
+ Pages->addWidget(pageDrawMap);
}
--- a/QTfrontend/ui_hwform.h Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/ui_hwform.h Sun Dec 19 13:31:55 2010 -0500
@@ -40,6 +40,7 @@
class PageScheme;
class PageAdmin;
class PageNetType;
+class PageDrawMap;
class QStackedLayout;
class QFont;
class QWidget;
@@ -72,6 +73,7 @@
PageAdmin *pageAdmin;
PageNetType *pageNetType;
PageCampaign *pageCampaign;
+ PageDrawMap *pageDrawMap;
QStackedLayout *Pages;
QFont *font14;
@@ -79,8 +81,6 @@
void setupUi(HWForm *HWForm);
void SetupFonts();
void SetupPages(QWidget *Parent, HWForm *HWForm);
- void SetupPageNetChat(QWidget *Parent);
- void SetupPageNetGame(QWidget *Parent);
};
#endif // UI_HWFORM_H
--- a/QTfrontend/weaponItem.cpp Mon Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/weaponItem.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/QTfrontend/weaponItem.h Sun Dec 19 13:31:55 2010 -0500
@@ -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/bin/CMakeLists.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/bin/CMakeLists.txt Sun Dec 19 13:31:55 2010 -0500
@@ -1,7 +1,9 @@
if(WIN32 AND NOT UNIX)
file(GLOB DLLs *.dll)
+ file(GLOB ICOs *.ico)
install(FILES
${DLLs}
+ ${ICOs}
DESTINATION bin)
endif(WIN32 AND NOT UNIX)
--- a/hedgewars/CCHandlers.inc Mon Dec 06 03:07:03 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,849 +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}
- perfExt_NewTurnBeginning();
-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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/CMakeLists.txt Sun Dec 19 13:31:55 2010 -0500
@@ -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,95 @@
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
+ uLandPainted.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 +132,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 +153,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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/GSHandlers.inc Sun Dec 19 13:31:55 2010 -0500
@@ -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
@@ -317,7 +317,11 @@
if Gear^.AdvBounce > 1 then dec(Gear^.AdvBounce);
- if isFalling then Gear^.dY := Gear^.dY + cGravity;
+ if isFalling then
+ begin
+ Gear^.dY := Gear^.dY + cGravity;
+ if (GameFlags and gfMoreWind) <> 0 then Gear^.dX := Gear^.dX + cWindSpeed * _16 / max(12,sqr(Gear^.Radius))
+ end;
Gear^.X := Gear^.X + Gear^.dX;
Gear^.Y := Gear^.Y + Gear^.dY;
@@ -512,7 +516,7 @@
procedure doStepShell(Gear: PGear);
begin
AllInactive := false;
- Gear^.dX := Gear^.dX + cWindSpeed;
+ if (GameFlags and gfMoreWind) = 0 then Gear^.dX := Gear^.dX + cWindSpeed;
doStepFallingGear(Gear);
if (Gear^.State and gstCollision) <> 0 then
begin
@@ -622,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);
@@ -704,6 +708,7 @@
var
i, x, y: LongWord;
oX, oY: hwFloat;
+ VGear: PVisualGear;
begin
AllInactive := false;
inc(Gear^.Timer);
@@ -750,6 +755,41 @@
cLaserSighting := false;
if (Ammoz[Gear^.AmmoType].Ammo.NumPerTurn <= CurrentHedgehog^.MultiShootAttacks) and
((GameFlags and gfArtillery) = 0) then cArtillery := false;
+
+ // Bullet Hit
+ if (hwRound(Gear^.X) and LAND_WIDTH_MASK = 0)
+ and (hwRound(Gear^.Y) and LAND_HEIGHT_MASK = 0) then
+ begin
+ VGear := AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBulletHit);
+ if VGear <> nil then
+ begin
+ VGear^.Angle := DxDy2Angle(-Gear^.dX, Gear^.dY);
+ end;
+ end;
+
+ // Bullet trail
+ VGear := AddVisualGear(
+ hwround(CurrentHedgehog^.Gear^.X) + GetLaunchX(CurrentHedgehog^.CurAmmoType, hwSign(CurrentHedgehog^.Gear^.dX), CurrentHedgehog^.Gear^.Angle),
+ hwround(CurrentHedgehog^.Gear^.Y) + GetLaunchY(CurrentHedgehog^.CurAmmoType, CurrentHedgehog^.Gear^.Angle),
+ vgtLineTrail
+ );
+ if VGear <> nil then
+ begin
+ // http://mantis.freepascal.org/view.php?id=17714 hits again
+ VGear^.dX := Gear^.X.QWordValue / SignAs(_1,_1).QWordValue;
+ VGear^.dY := Gear^.Y.QWordValue / SignAs(_1,_1).QWordValue;
+
+ // reached edge of land. assume infinite beam. Extend it way out past camera
+ if (hwRound(Gear^.X) and LAND_WIDTH_MASK <> 0)
+ or (hwRound(Gear^.Y) and LAND_HEIGHT_MASK <> 0) then
+ begin
+ VGear^.dX := VGear^.dX + (CurrentHedgehog^.Gear^.dX * LAND_WIDTH).QWordValue / SignAs(_1,_1).QWordValue;
+ VGear^.dY := VGear^.dY + (CurrentHedgehog^.Gear^.dY * LAND_WIDTH).QWordValue / SignAs(_1,_1).QWordValue;
+ end;
+
+ VGear^.Timer := 200;
+ end;
+
Gear^.doStep := @doStepShotIdle
end;
end;
@@ -766,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
@@ -859,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
@@ -933,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
@@ -965,7 +1005,7 @@
begin
AllInactive := false;
dec(Gear^.Timer);
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HedgehogChAngle(HHGear);
@@ -1047,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
@@ -1062,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;
@@ -1081,17 +1121,18 @@
HHGear^.X := HHGear^.X + HHGear^.dX;
HHGear^.Y := HHGear^.Y + HHGear^.dY;
HHGear^.dY := HHGear^.dY + cGravity;
+ if (GameFlags and gfMoreWind) <> 0 then HHGear^.dX := HHGear^.dX + cWindSpeed * _0_2;
if (Gear^.Message and gmAttack) <> 0 then
begin
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;
@@ -1129,7 +1170,7 @@
end;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
if ((HHGear^.State and gstHHDriven) = 0)
or (CheckGearDrowning(HHGear)) then
@@ -1143,7 +1184,11 @@
else
if (Gear^.Message and gmRight <> 0) then HHGear^.dX := HHGear^.dX + _0_0002;
- if not TestCollisionYwithGear(HHGear, 1) then HHGear^.dY := HHGear^.dY + cGravity;
+ if not TestCollisionYwithGear(HHGear, 1) then
+ begin
+ HHGear^.dY := HHGear^.dY + cGravity;
+ if (GameFlags and gfMoreWind) <> 0 then HHGear^.dX := HHGear^.dX + cWindSpeed * _0_2
+ end;
ropeDx := HHGear^.X - Gear^.X;
// vector between hedgehog and rope attaching point
@@ -1195,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
@@ -1285,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
@@ -1311,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
@@ -1322,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
@@ -1343,7 +1415,8 @@
begin
HHGear^.Y := HHGear^.Y + HHGear^.dY;
Gear^.Y := Gear^.Y + HHGear^.dY;
- HHGear^.dY := HHGear^.dY + cGravity
+ HHGear^.dY := HHGear^.dY + cGravity;
+ if (GameFlags and gfMoreWind) <> 0 then HHGear^.dX := HHGear^.dX + cWindSpeed * _0_2
end;
tt := Gear^.Elasticity;
@@ -1351,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;
@@ -1376,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
@@ -1401,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
@@ -1762,7 +1836,7 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.State := HHGear^.State or gstNoDamage;
DeleteCI(HHGear);
@@ -1779,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);
@@ -1811,13 +1885,12 @@
if ((GameTicks mod 100) = 0) then
begin
- vgt:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFire);
+ vgt:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFire, gstTmpFlag);
if vgt <> nil then
begin
vgt^.dx:= 0;
vgt^.dy:= 0;
vgt^.FrameTicks:= 1800 div (Gear^.Tag mod 3 + 2);
- vgt^.State:= gstTmpFlag;
end;
end;
@@ -1932,7 +2005,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);
@@ -1962,7 +2035,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);
@@ -1975,7 +2048,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;
@@ -1985,7 +2058,7 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
inc(Gear^.Timer);
@@ -2003,7 +2076,7 @@
end;
DeleteGear(Gear);
isCursorVisible := false;
- ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^);
+ ApplyAmmoChanges(HHGear^.Hedgehog^);
exit
end;
@@ -2024,7 +2097,7 @@
var
HHGear: PGear;
begin
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
DeleteCI(HHGear);
@@ -2041,8 +2114,6 @@
////////////////////////////////////////////////////////////////////////////////
procedure doStepAirAttackWork(Gear: PGear);
-var
- i: Longint;
begin
AllInactive := false;
Gear^.X := Gear^.X + cAirPlaneSpeed * Gear^.Tag;
@@ -2055,9 +2126,12 @@
Gear^.Tag, _0, 0);
1: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtMine, 0, cBombsSpeed *
Gear^.Tag, _0, 0);
- 2: for i:= -19 to 19 do
- FollowGear := AddGear(hwRound(Gear^.X) + i div 3, hwRound(Gear^.Y), gtFlame, 0,
- _0_001 * i, _0, 0);
+ 2: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtNapalmBomb, 0, cBombsSpeed *
+ Gear^.Tag, _0, 0);
+ 3: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtDrill, gsttmpFlag, cBombsSpeed *
+ Gear^.Tag, _0, 0);
+ //4: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtWaterMelon, 0, cBombsSpeed *
+ // Gear^.Tag, _0, 5000);
end;
Gear^.dX := Gear^.dX + int2hwFloat(30 * Gear^.Tag)
end;
@@ -2086,7 +2160,7 @@
Gear^.Y := int2hwFloat(topY-300);
Gear^.dX := int2hwFloat(TargetPoint.X - 5 * Gear^.Tag * 15);
- if (int2hwFloat(TargetPoint.Y) - Gear^.Y > _0) and (Gear^.State <> 2) then
+ if (int2hwFloat(TargetPoint.Y) - Gear^.Y > _0) then
Gear^.dX := Gear^.dX - cBombsSpeed * hwSqrt((int2hwFloat(TargetPoint.Y) - Gear^.Y) * 2 /
cGravity) * Gear^.Tag;
@@ -2120,7 +2194,7 @@
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
tx := int2hwFloat(TargetPoint.X);
ty := int2hwFloat(TargetPoint.Y);
x := HHGear^.X;
@@ -2155,8 +2229,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;
@@ -2186,7 +2260,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
@@ -2228,14 +2302,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;
@@ -2279,7 +2353,7 @@
begin
Gear^.doStep := @doStepSwitcherWork;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
with HHGear^ do
begin
State := State and not gstAttacking;
@@ -2330,7 +2404,7 @@
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.State := HHGear^.State or gstNoDamage;
DeleteCI(HHGear);
@@ -2390,7 +2464,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;
@@ -2401,7 +2475,7 @@
begin
AllInactive := false;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
HHGear^.dX := Gear^.dX;
HHGear^.dY := Gear^.dY;
@@ -2590,7 +2664,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;
@@ -2640,7 +2714,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
@@ -2650,7 +2724,7 @@
procedure doStepSeduction(Gear: PGear);
begin
AllInactive := false;
- DeleteCI(PHedgehog(Gear^.Hedgehog)^.Gear);
+ DeleteCI(Gear^.Hedgehog^.Gear);
Gear^.doStep := @doStepSeductionWear
end;
@@ -2699,6 +2773,8 @@
Gear^.X := Gear^.X + Gear^.dX;
Gear^.Y := Gear^.Y + Gear^.dY;
DrawTunnel(oX, oY, Gear^.dX, Gear^.dY, 2, 6);
+ if (Gear^.Timer mod 30) = 0 then
+ AddVisualGear(hwRound(Gear^.X + _20 * Gear^.dX), hwRound(Gear^.Y + _20 * Gear^.dY), vgtDust);
if (CheckGearDrowning(Gear)) then
begin
StopSound(Gear^.SoundChannel);
@@ -2717,7 +2793,10 @@
begin
//out of time or exited ground
StopSound(Gear^.SoundChannel);
- doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound);
+ if (Gear^.State and gsttmpFlag) <> 0 then
+ doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, EXPLAutoSound)
+ else
+ doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound);
DeleteGear(Gear);
exit
end;
@@ -2733,7 +2812,9 @@
begin
AllInactive := false;
- Gear^.dX := Gear^.dX + cWindSpeed;
+ if (Gear^.State and gsttmpFlag) = 0 then
+ Gear^.dX := Gear^.dX + cWindSpeed;
+
oldDx := Gear^.dX;
oldDy := Gear^.dY;
@@ -2759,7 +2840,10 @@
else
begin
//explode right on contact with HH
- doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound);
+ if (Gear^.State and gsttmpFlag) <> 0 then
+ doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, EXPLAutoSound)
+ else
+ doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound);
DeleteGear(Gear);
exit;
end;
@@ -2779,7 +2863,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);
@@ -2807,7 +2891,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
@@ -2832,7 +2916,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;
@@ -2968,7 +3052,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;
@@ -2988,7 +3072,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;
@@ -3095,7 +3179,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)
@@ -3112,7 +3196,7 @@
Gear^.Pos:= 0;
Gear^.doStep := @doStepJetpackWork;
- HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
+ HHGear := Gear^.Hedgehog^.Gear;
FollowGear := HHGear;
AfterAttack;
with HHGear^ do
@@ -3163,19 +3247,19 @@
Gear^.Tag := 1;
if (HHGear^.Message and gmUp) <> 0 then
- begin
+ begin
if (not HHGear^.dY.isNegative) or (HHGear^.Y > -_256) then
HHGear^.dY := HHGear^.dY - move;
dec(Gear^.Health, fuel);
Gear^.MsgParam := Gear^.MsgParam or gmUp;
- end;
+ end;
if (HHGear^.Message and gmLeft) <> 0 then move.isNegative := true;
if (HHGear^.Message and (gmLeft or gmRight)) <> 0 then
- begin
+ begin
HHGear^.dX := HHGear^.dX + (move * _0_1);
dec(Gear^.Health, fuel div 5);
Gear^.MsgParam := Gear^.MsgParam or (HHGear^.Message and (gmLeft or gmRight));
- end;
+ end;
if Gear^.Health < 0 then Gear^.Health := 0;
if ((GameTicks and $FF) = 0) and (Gear^.Health < 500) then
@@ -3183,16 +3267,15 @@
AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFeather);
if (HHGear^.Message and gmAttack <> 0) then
- begin
+ begin
HHGear^.Message := HHGear^.Message and not gmAttack;
if Gear^.FlightTime > 0 then
- begin
- AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) + 32, gtEgg, 0, Gear^.dX * _0_5, Gear^.dY, 0)
- ;
+ begin
+ AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) + 32, gtEgg, 0, Gear^.dX * _0_5, Gear^.dY, 0);
PlaySound(sndBirdyLay);
dec(Gear^.FlightTime)
+ end;
end;
- end;
if HHGear^.Message and (gmUp or gmPrecise or gmLeft or gmRight) <> 0 then
Gear^.State := Gear^.State and not gsttmpFlag;
@@ -3214,25 +3297,25 @@
or (((GameTicks and $1FF) = 0) and (not HHGear^.dY.isNegative) and TestCollisionYwithGear(
HHGear, 1))
or ((Gear^.Message and gmAttack) <> 0) then
- begin
+ begin
with HHGear^ do
- begin
+ begin
Message := 0;
Active := true;
State := State or gstMoving
- end;
+ end;
Gear^.State := Gear^.State or gstAnimation or gstTmpFlag;
if HHGear^.dY < _0 then
- begin
+ begin
Gear^.dX := HHGear^.dX;
Gear^.dY := HHGear^.dY;
- end;
+ end;
Gear^.Timer := 0;
Gear^.doStep := @doStepBirdyDisappear;
CurAmmoGear := nil;
isCursorVisible := false;
AfterAttack;
- end
+ end
end;
////////////////////////////////////////////////////////////////////////////////
@@ -3320,7 +3403,7 @@
if (Gear^.State and gstCollision) <> 0 then
begin
- doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 11, EXPLPoisoned, $C0E0FFE0);
+ doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 10, EXPLPoisoned, $C0E0FFE0);
PlaySound(sndEggBreak);
AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg);
vg := AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg);
@@ -3371,7 +3454,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);
@@ -3698,7 +3781,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;
@@ -3991,7 +4074,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);
@@ -4055,7 +4138,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
@@ -4084,7 +4167,7 @@
t: PGearArray;
i: LongInt;
begin
-HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear;
+HHGear:= Gear^.Hedgehog^.Gear;
HHGear^.State:= HHGear^.State or gstNoDamage;
DeleteCI(HHGear);
@@ -4125,7 +4208,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
@@ -4178,7 +4261,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
@@ -4197,7 +4280,7 @@
Gear^.doStep := @doStepHammerHitWork
end;
-
+////////////////////////////////////////////////////////////////////////////////
procedure doStepResurrectorWork(Gear: PGear);
var
graves: TPGearArray;
@@ -4209,9 +4292,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);*)
@@ -4265,13 +4351,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
@@ -4312,3 +4398,43 @@
end
end;
+////////////////////////////////////////////////////////////////////////////////
+procedure doStepNapalmBomb(Gear: PGear);
+var
+ i, gX, gY: LongInt;
+ dX, dY: hwFloat;
+begin
+ AllInactive := false;
+ doStepFallingGear(Gear);
+ if (Gear^.Timer > 0) and ((Gear^.State and gstCollision) <> 0) then
+ begin
+ doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 10, EXPLAutoSound);
+ gX := hwRound(Gear^.X);
+ gY := hwRound(Gear^.Y);
+ for i:= 0 to 10 do
+ begin
+ dX := AngleCos(i * 2) * ((_0_1*(i div 5))) * (GetRandom + _1);
+ dY := AngleSin(i * 8) * _0_5 * (GetRandom + _1);
+ AddGear(gX, gY, gtFlame, 0, dX, dY, 0);
+ AddGear(gX, gY, gtFlame, 0, dX, -dY, 0);
+ AddGear(gX, gY, gtFlame, 0, -dX, dY, 0);
+ AddGear(gX, gY, gtFlame, 0, -dX, -dY, 0);
+ end;
+ DeleteGear(Gear);
+ exit
+ end;
+ if (Gear^.Timer = 0) then
+ begin
+ doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 10, EXPLAutoSound);
+ for i:= -19 to 19 do
+ FollowGear := AddGear(hwRound(Gear^.X) + i div 3, hwRound(Gear^.Y), gtFlame, 0, _0_001 * i, _0, 0);
+ DeleteGear(Gear);
+ exit
+ end;
+ if (GameTicks and $3F) = 0 then
+ AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace);
+ dec(Gear^.Timer)
+end;
+
+////////////////////////////////////////////////////////////////////////////////
+
--- a/hedgewars/GearDrawing.inc Mon Dec 06 03:07:03 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,867 +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;
- VertexBuffer: array [0..1] of TVertex2f;
- 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
- glDisable(GL_TEXTURE_2D);
- glEnable(GL_LINE_SMOOTH);
-
- glLineWidth(1.0);
-
- Tint($FF, $00, $00, $C0);
- VertexBuffer[0].X:= hx + WorldDx;
- VertexBuffer[0].Y:= hy + WorldDy;
- VertexBuffer[1].X:= tx + WorldDx;
- VertexBuffer[1].Y:= ty + WorldDy;
-
- glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
- glDrawArrays(GL_LINES, 0, Length(VertexBuffer));
- Tint($FF, $FF, $FF, $FF);
- glEnable(GL_TEXTURE_2D);
- glDisable(GL_LINE_SMOOTH);
- 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: 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: 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;
- 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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/HHHandlers.inc Sun Dec 19 13:31:55 2010 -0500
@@ -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
@@ -305,6 +305,8 @@
gtResurrector, 0, _0, _0, 0);
CurAmmoGear^.SoundChannel := LoopSound(sndResurrector);
end;
+ amDrillStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 3, _0, _0, 0);
+ //amMelonStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 4, _0, _0, 0);
end;
uStats.AmmoUsed(CurAmmoType);
@@ -384,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;
@@ -404,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
@@ -415,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;
@@ -432,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
@@ -452,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);
@@ -472,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
@@ -495,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
@@ -534,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;
@@ -547,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;
@@ -568,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))
@@ -628,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;
@@ -647,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;
@@ -660,11 +662,22 @@
if (Gear^.dY.isNegative) and TestCollisionYKick(Gear, -1) then Gear^.dY:= _0;
Gear^.State:= Gear^.State or gstMoving;
if isUnderwater then Gear^.dY:= Gear^.dY + cGravity / _2
- else Gear^.dY:= Gear^.dY + cGravity
+ else
+ begin
+ Gear^.dY:= Gear^.dY + cGravity;
+// this set of circumstances could be less complex if jumping was more clearly identified
+ if ((GameFlags and gfMoreWind) <> 0) and
+ (Gear^.Damage <> 0) or
+ ((CurAmmoGear <> nil) and
+ ((CurAmmoGear^.AmmoType = amJetpack) or
+ (CurAmmoGear^.AmmoType = amBirdy))) or
+ ((Gear^.dY.QWordValue + Gear^.dX.QWordValue) > _0_55.QWordValue)
+ then Gear^.dX := Gear^.dX + cWindSpeed * _0_2
+ end
end
else
begin
- if ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_55)
+ if ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) < _0_55.QWordValue)
and ((Gear^.State and gstHHJumping) <> 0) then SetLittle(Gear^.dX);
if not Gear^.dY.isNegative then
@@ -760,7 +773,7 @@
wasJumping: boolean;
Hedgehog: PHedgehog;
begin
-Hedgehog:= PHedgehog(Gear^.Hedgehog);
+Hedgehog:= Gear^.Hedgehog;
if not isInMultiShoot then
AllInactive:= false
else
@@ -906,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
@@ -923,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
@@ -961,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/PascalExports.pas Mon Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/PascalExports.pas Sun Dec 19 13:31:55 2010 -0500
@@ -21,23 +21,22 @@
unit PascalExports;
interface
-uses uKeys, GLunit, uWorld, uMisc, uConsole, uTeams, uConsts, uChat,
- uGears, uSound, hwengine, uAmmos, uLocale; // don't change the order!
+uses uTypes, uConsts, uVariables, GLunit, uKeys, uChat, uSound, uAmmos, uUtils,
+ uCommands;
{$INCLUDE "config.inc"}
-type PPByte = ^PByte;
var dummy: boolean; // avoid compiler hint
implementation
{$IFDEF HWLIBRARY}
var cZoomVal: GLfloat;
+ previousGameState: TGameState;
// retrieve protocol information
procedure HW_versionInfo(netProto: PShortInt; versionStr: PPChar); cdecl; export;
begin
-// http://bugs.freepascal.org/view.php?id=16156
- if netProto <> nil then netProto^:= cNetProtoVersion;
- if versionStr <> nil then versionStr^:= cVersionString;
+ netProto^:= cNetProtoVersion;
+ versionStr^:= cVersionString;
end;
procedure HW_click; cdecl; export;
@@ -167,9 +166,31 @@
procedure HW_pause; cdecl; export;
begin
+ if isPaused = false then
+ pauseAction:= true;
+end;
+
+procedure HW_pauseToggle; cdecl; export;
+begin
pauseAction:= true;
end;
+function HW_isPaused: boolean; cdecl; export;
+begin
+ exit( isPaused );
+end;
+
+procedure HW_suspend; cdecl; export;
+begin
+ previousGameState:= GameState;
+ GameState:= gsSuspend;
+end;
+
+procedure HW_resume; cdecl; export;
+begin
+ GameState:= previousGameState;
+end;
+
procedure HW_terminate(closeFrontend: boolean); cdecl; export;
begin
isTerminated:= true;
@@ -199,11 +220,6 @@
((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) );
end;
-function HW_isPaused: boolean; cdecl; export;
-begin
- exit( isPaused );
-end;
-
function HW_isWaiting: boolean; cdecl; export;
begin
exit( ReadyTimeLeft > 0 );
--- a/hedgewars/SDLh.pas Mon Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/SDLh.pas Sun Dec 19 13:31:55 2010 -0500
@@ -511,6 +511,17 @@
{$ENDIF}
end;
+ TSDL_UserEvent = record
+{$IFDEF SDL13}
+ type_: LongInt;
+ windowID: LongInt;
+{$ELSE}
+ type_: Byte;
+{$ENDIF}
+ code: LongInt;
+ data1, data2: Pointer;
+ end;
+
PSDL_Event = ^TSDL_Event;
TSDL_Event = record
{$IFDEF SDL13}
@@ -531,6 +542,7 @@
SDL_JOYBALLMOTION: (jball: TSDL_JoyBallEvent);
SDL_JOYBUTTONDOWN,
SDL_JOYBUTTONUP: (jbutton: TSDL_JoyButtonEvent);
+ SDL_USEREVENT: (user: TSDL_UserEvent);
{$ELSE}
case Byte of
SDL_NOEVENT: (type_: byte);
@@ -774,7 +786,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 Dec 06 03:07:03 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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/VGSHandlers.inc Sun Dec 19 13:31:55 2010 -0500
@@ -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;
@@ -133,6 +133,16 @@
end;
////////////////////////////////////////////////////////////////////////////////
+procedure doStepLineTrail(Gear: PVisualGear; Steps: Longword);
+begin
+Steps := Steps;
+if Gear^.Timer <= Steps then
+ DeleteVisualGear(Gear)
+else
+ dec(Gear^.Timer, Steps)
+end;
+
+////////////////////////////////////////////////////////////////////////////////
procedure doStepEgg(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
@@ -434,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;
@@ -452,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);
@@ -469,7 +479,7 @@
Gear^.doStep:= @doStepSpeechBubbleWork;
-Gear^.Y:= Gear^.Y - float(Gear^.Tex^.h)
+Gear^.Y:= Gear^.Y - Gear^.Tex^.h
end;
////////////////////////////////////////////////////////////////////////////////
@@ -502,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);
@@ -511,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;
@@ -548,11 +558,20 @@
procedure doStepExplosion(Gear: PVisualGear; Steps: Longword);
var i: LongWord;
-gX,gY: LongInt;
+ gX,gY: LongInt;
+ vg: PVisualGear;
begin
gX:= round(Gear^.X);
gY:= round(Gear^.Y);
-for i:= 0 to 31 do AddVisualGear(gX, gY, vgtFire);
+for i:= 0 to 31 do
+ begin
+ vg:= AddVisualGear(gX, gY, vgtFire);
+ if vg <> nil then
+ begin
+ vg^.State:= gstTmpFlag;
+ inc(vg^.FrameTicks, vg^.FrameTicks)
+ end
+ end;
for i:= 0 to 8 do AddVisualGear(gX, gY, vgtExplPart);
for i:= 0 to 8 do AddVisualGear(gX, gY, vgtExplPart2);
Gear^.doStep:= @doStepExplosionWork;
@@ -580,12 +599,21 @@
procedure doStepBigExplosion(Gear: PVisualGear; Steps: Longword);
var i: LongWord;
-gX,gY: LongInt;
+ gX,gY: LongInt;
+ vg: PVisualGear;
begin
gX:= round(Gear^.X);
gY:= round(Gear^.Y);
AddVisualGear(gX, gY, vgtSmokeRing);
-for i:= 0 to 46 do AddVisualGear(gX, gY, vgtFire);
+for i:= 0 to 46 do
+ begin
+ vg:= AddVisualGear(gX, gY, vgtFire);
+ if vg <> nil then
+ begin
+ vg^.State:= gstTmpFlag;
+ inc(vg^.FrameTicks, vg^.FrameTicks)
+ end
+ end;
for i:= 0 to 15 do AddVisualGear(gX, gY, vgtExplPart);
for i:= 0 to 15 do AddVisualGear(gX, gY, vgtExplPart2);
Gear^.doStep:= @doStepBigExplosionWork;
@@ -608,3 +636,36 @@
DeleteVisualGear(Gear);
end
end;
+
+////////////////////////////////////////////////////////////////////////////////
+procedure doStepBulletHit(Gear: PVisualGear; Steps: Longword);
+begin
+ if Gear^.FrameTicks <= Steps then
+ DeleteVisualGear(Gear)
+ else
+ dec(Gear^.FrameTicks, Steps);
+end;
+
+////////////////////////////////////////////////////////////////////////////////
+procedure doStepCircle(Gear: PVisualGear; Steps: Longword);
+var tmp: LongInt;
+ 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;
+ if tmp > 255 then tmp := 255;
+ if tmp < 0 then tmp := 0;
+ Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or tmp
+ end
+ end
+end;
--- a/hedgewars/hwLibrary.pas Mon Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/hwLibrary.pas Sun Dec 19 13:31:55 2010 -0500
@@ -12,7 +12,7 @@
// these procedures/functions to the PascalImports.h file (also in the "Pascal Sources" group)
// to make these functions available in the C/C++/Objective-C source files
// (add "#include PascalImports.h" near the top of these files if it's not there yet)
-uses cmem, hwengine, PascalExports;
+uses cmem, uVariables, PascalExports, hwengine;
begin
// avoid compiler warnings about units not being used
isTerminated:= isTerminated;
--- a/hedgewars/hwengine.pas Mon Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/hwengine.pas Sun Dec 19 13:31:55 2010 -0500
@@ -30,10 +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;
-
-var isTerminated: boolean = false;
- alsoShutdownFrontend: boolean = false;
+ uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, uMobile,
+ sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted;
{$IFDEF HWLIBRARY}
procedure initEverything(complete:boolean);
@@ -50,11 +48,13 @@
procedure DoTimer(Lag: LongInt);
var s: shortstring;
begin
- if not isPaused then inc(RealTicks, Lag);
+ if isPaused = false then
+ inc(RealTicks, Lag);
case GameState of
gsLandGen: begin
GenMap;
+ ParseCommand('sendlanddigest', true);
GameState:= gsStart;
end;
gsStart: begin
@@ -98,6 +98,7 @@
gsExit: begin
isTerminated:= true;
end;
+ gsSuspend: exit;
end;
{$IFDEF SDL13}
@@ -105,12 +106,13 @@
{$ELSE}
SDL_GL_SwapBuffers();
{$ENDIF}
- // not going to make captures on the iPhone
+
if flagMakeCapture then
begin
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 +125,6 @@
FreeActionsList();
StoreRelease();
ControllerClose();
- SendKB();
CloseIPC();
TTF_Quit();
{$IFDEF SDL13}
@@ -147,19 +148,16 @@
begin
case event.type_ of
SDL_KEYDOWN: if GameState = gsChat then
-{$IFDEF IPHONEOS}
+{$IFDEF SDL13}
// sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3
KeyPressChat(event.key.keysym.sym);
+ SDL_WINDOWEVENT:
+ if event.wevent.event = SDL_WINDOWEVENT_SHOWN then
+ cHasFocus:= true;
{$ELSE}
KeyPressChat(event.key.keysym.unicode);
SDL_MOUSEBUTTONDOWN: if event.button.button = SDL_BUTTON_WHEELDOWN then uKeys.wheelDown:= true;
SDL_MOUSEBUTTONUP: if event.button.button = SDL_BUTTON_WHEELUP then uKeys.wheelUp:= true;
-{$ENDIF}
-{$IFDEF SDL13}
- SDL_WINDOWEVENT:
- if event.wevent.event = SDL_WINDOWEVENT_SHOWN then
- cHasFocus:= true;
-{$ELSE}
SDL_ACTIVEEVENT:
if (event.active.state and SDL_APPINPUTFOCUS) <> 0 then
cHasFocus:= event.active.gain = 1;
@@ -169,8 +167,8 @@
SDL_JOYBUTTONDOWN: ControllerButtonEvent(event.jbutton.which, event.jbutton.button, true);
SDL_JOYBUTTONUP: ControllerButtonEvent(event.jbutton.which, event.jbutton.button, false);
SDL_QUITEV: isTerminated:= true
- end; // end case event.type_
- end; // end while SDL_PollEvent(@event) <> 0
+ end; //end case event.type_ of
+ end; //end while SDL_PollEvent(@event) <> 0 do
if isTerminated = false then
begin
@@ -317,10 +315,16 @@
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;
+ uLandPainted.initModule;
+
uIO.initModule;
if complete then
@@ -349,6 +353,7 @@
uTeams.initModule;
uVisualGears.initModule;
uWorld.initModule;
+ uCaptions.initModule;
end;
end;
@@ -356,6 +361,7 @@
begin
if complete then
begin
+ uCaptions.freeModule;
uWorld.freeModule;
uVisualGears.freeModule;
uTeams.freeModule;
@@ -385,7 +391,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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uAI.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uAIActions.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uAIAmmoTests.pas Sun Dec 19 13:31:55 2010 -0500
@@ -20,7 +20,7 @@
unit uAIAmmoTests;
interface
-uses SDLh, uGears, uConsts, uFloat;
+uses SDLh, uConsts, uFloat, uTypes;
const amtest_OnTurn = $00000001;
type TAttackParams = record
@@ -101,13 +101,14 @@
(proc: nil; flags: 0), // amFlamethrower
(proc: @TestGrenade; flags: 0), // amSMine
(proc: @TestFirePunch; flags: 0), // amHammer
- (proc: nil; flags: 0) // amResurrector
+ (proc: nil; flags: 0), // amResurrector
+ (proc: nil; flags: 0) // amDrillStrike
);
const BadTurn = Low(LongInt) div 4;
implementation
-uses uMisc, uAIMisc, uLand;
+uses uAIMisc, uVariables, uUtils;
function Metric(x1, y1, x2, y2: LongInt): LongInt;
begin
@@ -538,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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uAIMisc.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uAmmos.pas Sun Dec 19 13:31:55 2010 -0500
@@ -20,7 +20,7 @@
unit uAmmos;
interface
-uses uConsts, uTeams, uStats;
+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;
@@ -68,20 +68,7 @@
begin
TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true);
Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo;
- with Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]] do
- begin
- Count:= cnts[a];
- if (TotalRounds < 0) and ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then Count:= AMMO_INFINITE;
- end;
- inc(mi[Ammoz[a].Slot])
- end
- else if (TotalRounds < 0) and ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then
- begin
- TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true);
- Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo;
-
- Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE;
-
+ with Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]] do Count:= cnts[a];
inc(mi[Ammoz[a].Slot])
end
end
@@ -134,10 +121,14 @@
if ((GameFlags and gfPlaceHog) <> 0) and
(a <> amTeleport) and (a <> amSkip) and
- (Ammoz[a].SkipTurns < 10000) then inc(Ammoz[a].SkipTurns,10000)
+ (Ammoz[a].SkipTurns < 10000) then inc(Ammoz[a].SkipTurns,10000);
+ if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then ammos[a]:= AMMO_INFINITE
end
else ammos[a]:= AMMO_INFINITE;
- InitialCounts[Pred(StoreCnt)][a]:= ammos[a];
+ if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then
+ InitialCounts[Pred(StoreCnt)][a]:= cnt
+ else
+ InitialCounts[Pred(StoreCnt)][a]:= ammos[a];
end;
FillAmmoStore(StoresList[Pred(StoreCnt)], ammos)
end;
@@ -335,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,14 +409,31 @@
with TeamsArray[t]^ do
for i:= 0 to cMaxHHIndex do
if Hedgehogs[i].Gear <> nil then
+ begin
FillAmmoStore(Hedgehogs[i].Ammo, InitialCounts[Hedgehogs[i].AmmoStore]);
+ Hedgehogs[i].CurAmmoType:= amNothing
+ end;
for a:= Low(TAmmoType) to High(TAmmoType) do
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 Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uChat.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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;
@@ -181,44 +181,42 @@
visibleCount:= cnt;
end;
+procedure SendHogSpeech(s: shortstring);
+begin
+SendIPC('h' + s);
+ParseCommand('/hogsay '+s, true)
+end;
+
procedure AcceptChatString(s: shortstring);
var i: TWave;
-
+ c, t: LongInt;
+ x: byte;
begin
-// "Make hedgehog say something"
-if (s[1] = '"') and (s[Length(s)] = '"') then
+t:= LocalTeam;
+x:= 0;
+if (s[1] = '"') and (s[Length(s)] = '"') then x:= 1
+else if (s[1] = '''') and (s[Length(s)] = '''') then x:= 2
+else if (s[1] = '-') and (s[Length(s)] = '-') then x:= 3;
+if not CurrentTeam^.ExtDriven and (x <> 0) then
+ for c:= 0 to Pred(TeamsCount) do
+ if (TeamsArray[c] = CurrentTeam) then t:= c;
+
+if x <> 0 then
begin
- if CurrentTeam^.ExtDriven then
+ if t = -1 then
ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
else
- ParseCommand('/hogsay '#1 + copy(s, 2, Length(s)-2), true);
+ SendHogSpeech(char(x) + char(t) + copy(s, 2, Length(s)-2));
exit
end;
-// 'Make hedgehog think something'
-if (s[1] = '''') and (s[Length(s)] = '''') then
- begin
- if CurrentTeam^.ExtDriven then
- ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
- else
- ParseCommand('/hogsay '#2 + copy(s, 2, Length(s)-2), true);
- exit
- end;
-// -Make hedgehog yell something-
-if (s[1] = '-') and (s[Length(s)] = '-') then
- begin
- if CurrentTeam^.ExtDriven then
- ParseCommand('/say ' + copy(s, 2, Length(s)-2), true)
- else
- ParseCommand('/hogsay '#3 + copy(s, 2, Length(s)-2), true);
- exit
- end;
+
// These 3 are same as above, only are to make the hedgehog say it on next attack
if (s[1] = '/') and (copy(s, 1, 5) = '/hsa ') then
begin
if CurrentTeam^.ExtDriven then
ParseCommand('/say ' + copy(s, 6, Length(s)-5), true)
else
- ParseCommand('/hogsay '#4 + copy(s, 6, Length(s)-5), true);
+ SendHogSpeech(#4 + copy(s, 6, Length(s)-5));
exit
end;
if (s[1] = '/') and (copy(s, 1, 5) = '/hta ') then
@@ -226,7 +224,7 @@
if CurrentTeam^.ExtDriven then
ParseCommand('/say ' + copy(s, 6, Length(s)-5), true)
else
- ParseCommand('/hogsay '#5 + copy(s, 6, Length(s)-5), true);
+ SendHogSpeech(#5 + copy(s, 6, Length(s)-5));
exit
end;
if (s[1] = '/') and (copy(s, 1, 5) = '/hya ') then
@@ -234,7 +232,7 @@
if CurrentTeam^.ExtDriven then
ParseCommand('/say ' + copy(s, 6, Length(s)-5), true)
else
- ParseCommand('/hogsay '#6 + copy(s, 6, Length(s)-5), true);
+ SendHogSpeech(#6 + copy(s, 6, Length(s)-5));
exit
end;
@@ -308,8 +306,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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uCollisions.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Sun Dec 19 13:31:55 2010 -0500
@@ -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, uRandom;
+
+procedure chGenCmd(var s: shortstring);
+begin
+case s[1] of
+ 'R': if ReadyTimeLeft > 1 then
+ begin
+ ReadyTimeLeft:= 1;
+ if not CurrentTeam^.ExtDriven then SendIPC('c'+s);
+ end
+ end
+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
+ 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');
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or (gmLeft and InputMask)
+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 and InputMask)
+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');
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or (gmRight and InputMask)
+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 and InputMask)
+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');
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or (gmUp and InputMask)
+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 and InputMask);
+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');
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or (gmDown and InputMask)
+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 and InputMask)
+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');
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or (gmPrecise and InputMask);
+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 and InputMask);
+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');
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or (gmLJump and InputMask)
+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');
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or (gmHJump and InputMask)
+end;
+
+procedure chAttack_p(var s: shortstring);
+begin
+s:= s; // avoid compiler hint
+if CheckNoTeamOrHH or isPaused then exit;
+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 and InputMask)
+ 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 and InputMask)
+ 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');
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ Message:= Message or (gmSwitch and InputMask)
+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 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);
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ begin
+ Message:= Message or (gmTimer and InputMask);
+ 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));
+bShowFinger:= false;
+with CurrentHedgehog^.Gear^ do
+ begin
+ Message:= Message or (gmSlot and InputMask);
+ 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 and InputMask);
+ 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 and InputMask);
+ 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;
+ 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 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
+//////// Begin top sorted by freq analysis not including chatmsg
+ 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('+left' , vtCommand, @chLeft_p , false);
+ RegisterVariable('-left' , vtCommand, @chLeft_m , false);
+ RegisterVariable('+attack' , vtCommand, @chAttack_p , false);
+ RegisterVariable('+down' , vtCommand, @chDown_p , false);
+ RegisterVariable('-down' , vtCommand, @chDown_m , false);
+ RegisterVariable('hjump' , vtCommand, @chHJump , false);
+ RegisterVariable('ljump' , vtCommand, @chLJump , false);
+ RegisterVariable('nextturn', vtCommand, @chNextTurn , false);
+ RegisterVariable('-attack' , vtCommand, @chAttack_m , false);
+ RegisterVariable('slot' , vtCommand, @chSlot , false);
+ RegisterVariable('setweap' , vtCommand, @chSetWeapon , false);
+//////// End top by freq analysis
+ RegisterVariable('gencmd' , vtCommand, @chGenCmd , false);
+ 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('switch' , vtCommand, @chSwitch , false);
+ RegisterVariable('timer' , vtCommand, @chTimer , false);
+ RegisterVariable('taunt' , vtCommand, @chTaunt , false);
+ RegisterVariable('put' , vtCommand, @chPut , 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 Sun Dec 19 13:31:55 2010 -0500
@@ -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;
+c:= CmdStr[1];
+if c in ['/', '$'] then Delete(CmdStr, 1, 1) else c:= '/';
+s:= '';
+SplitBySpace(CmdStr, s);
+{$IFDEF DEBUGFILE}AddFileLog('[Cmd] ' + c + CmdStr + ' (' + inttostr(length(CmdStr)) + ')');{$ENDIF}
+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/uConsole.pas Mon Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uConsole.pas Sun Dec 19 13:31:55 2010 -0500
@@ -20,44 +20,26 @@
unit uConsole;
interface
-uses uFloat;
-
-var isDeveloperMode: boolean;
-type TVariableType = (vtCommand, vtLongInt, vthwFloat, vtBoolean);
- TCommandHandler = procedure (var params: shortstring);
procedure initModule;
procedure freeModule;
procedure WriteToConsole(s: shortstring);
procedure WriteLnToConsole(s: shortstring);
-procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean);
-procedure StopMessages(Message: Longword);
function GetLastConsoleLine: shortstring;
-procedure doPut(putX, putY: LongInt; fromAI: boolean);
-
implementation
-uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uWorld, uMobile,
- uRandom, uAmmos, uStats, uChat, SDLh, uSound, uVisualGears, uScript;
+uses Types, uVariables, uUtils;
const cLineWidth: LongInt = 0;
- cLinesCount = 256;
+ cLinesCount = 8;
-type PVariable = ^TVariable;
- TVariable = record
- Next: PVariable;
- Name: string[15];
- VType: TVariableType;
- Handler: pointer;
- Trusted: boolean;
- end;
+type
TTextLine = record
s: shortstring;
end;
var ConsoleLines: array[byte] of TTextLine;
CurrLine: LongInt;
- Variables: PVariable;
procedure SetLine(var tl: TTextLine; str: shortstring);
begin
@@ -65,32 +47,12 @@
s:= str;
end;
-function RegisterVariable(Name: shortstring; VType: TVariableType; p: pointer; Trusted: boolean): PVariable;
-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;
-
-RegisterVariable:= value;
-end;
-
procedure WriteToConsole(s: shortstring);
var Len: LongInt;
done: boolean;
begin
{$IFNDEF NOCONSOLE}
-{$IFDEF DEBUGFILE}AddFileLog('Console write: ' + s);{$ENDIF}
+{$IFDEF DEBUGFILE}AddFileLog('[Con] ' + s);{$ENDIF}
Write(s);
done:= false;
@@ -122,60 +84,6 @@
{$ENDIF}
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;
function GetLastConsoleLine: shortstring;
var valueStr: shortstring;
@@ -192,22 +100,10 @@
GetLastConsoleLine:= valueStr;
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;
-
-{$INCLUDE "CCHandlers.inc"}
procedure initModule;
var i: LongInt;
begin
CurrLine:= 0;
- Variables:= nil;
- isDeveloperMode:= true;
// initConsole
cLineWidth:= cScreenWidth div 10;
@@ -215,113 +111,11 @@
cLineWidth:= 255;
for i:= 0 to Pred(cLinesCount) do
PByte(@ConsoleLines[i])^:= 0;
-
- // NOTE: please, keep most frequently used commands on bottom
- 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('addteam' , vtCommand, @chAddTeam , false);
- 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('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('voicepack',vtCommand, @chVoicepack , false);
- RegisterVariable('grave' , vtCommand, @chGrave , false);
- RegisterVariable('bind' , vtCommand, @chBind , true );
- RegisterVariable('addhh' , vtCommand, @chAddHH , false);
- RegisterVariable('hat' , vtCommand, @chSetHat , false);
- RegisterVariable('hhcoords', vtCommand, @chSetHHCoords , false);
- RegisterVariable('ammloadt', vtCommand, @chSetAmmoLoadout, false);
- RegisterVariable('ammdelay', vtCommand, @chSetAmmoDelay, false);
- RegisterVariable('ammprob', vtCommand, @chSetAmmoProbability, false);
- RegisterVariable('ammreinf', vtCommand, @chSetAmmoReinforcement, false);
- RegisterVariable('ammstore', vtCommand, @chAddAmmoStore , 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('skip' , vtCommand, @chSkip , false);
- RegisterVariable('history' , vtCommand, @chHistory , true );
- RegisterVariable('chat' , vtCommand, @chChat , true );
- RegisterVariable('say' , vtCommand, @chSay , true );
- RegisterVariable('hogsay' , vtCommand, @chHogSay , true );
- RegisterVariable('team' , vtCommand, @chTeamSay , 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('fullscr' , vtCommand, @chFullScr , true );
- 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;
-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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uConsts.pas Sun Dec 19 13:31:55 2010 -0500
@@ -21,7 +21,7 @@
unit uConsts;
interface
-uses SDLh, uFloat, uLocale, GLunit;
+uses SDLh, uFloat, GLunit;
{$INCLUDE "config.inc"}
@@ -29,167 +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
- );
-
- // 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);
-
- // 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);
-
- 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);
-
- 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;
@@ -264,6 +103,7 @@
cPowerDivisor = 1500;
MAXNAMELEN = 192;
+ MAXROPEPOINTS = 3840;
// some opengl headers do not have these macros
GL_BGR = $80E0;
@@ -284,7 +124,7 @@
cTransparentColor: Longword = $00000000;
- cMaxTeams = 6;
+ cMaxTeams = 8;
cMaxHHIndex = 7;
cMaxHHs = 48;
cMaxSpawnPoints = 1024;
@@ -355,6 +195,7 @@
gfResetWeps = $00200000;
gfPerHogAmmo = $00400000;
gfDisableWind = $00800000; // only lua for now
+ gfMoreWind = $01000000;
// NOTE: When adding new game flags, ask yourself
// if a "game start notice" would be useful. If so,
// add one in uWorld.pas - look for "AddGoal".
@@ -438,1804 +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
- );
-
-
- 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),
-
- (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)
- );
-
-
-
- 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 Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uFloat.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uGame.pas Sun Dec 19 13:31:55 2010 -0500
@@ -26,7 +26,7 @@
////////////////////
implementation
////////////////////
-uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript, uSound, uMobile, uVisualGears;
+uses uKeys, uTeams, uIO, uAI, uGears, 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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uGears.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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;
@@ -96,27 +40,16 @@
procedure InsertGearToList(Gear: PGear);
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;
+procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt; skipProximity: boolean = false);
+procedure DeleteGear(Gear: PGear);
+
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;
procedure doMakeExplosion(X, Y, Radius: LongInt; Mask, Tint: LongWord); forward;
procedure AmmoShove(Ammo: PGear; Damage, Power: LongInt); forward;
@@ -133,28 +66,6 @@
procedure HHSetWeapon(Gear: PGear); forward;
procedure doStepCase(Gear: PGear); forward;
-function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
-begin
- GetLaunchX:= 0
-(*
- 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
- GetLaunchY:= 0
-(*
- 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"}
@@ -215,7 +126,8 @@
@doStepPoisonCloud,
@doStepHammer,
@doStepHammerHit,
- @doStepResurrector
+ @doStepResurrector,
+ @doStepNapalmBomb
);
procedure InsertGearToList(Gear: PGear);
@@ -258,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;
@@ -304,7 +216,7 @@
gear^.ImpactSound:= sndGrenadeImpact;
gear^.nImpactSounds:= 1;
gear^.AdvBounce:= 1;
- gear^.Radius:= 6;
+ gear^.Radius:= 5;
gear^.Elasticity:= _0_8;
gear^.Friction:= _0_8;
gear^.RenderTimer:= true;
@@ -314,7 +226,7 @@
gear^.ImpactSound:= sndMelonImpact;
gear^.nImpactSounds:= 1;
gear^.AdvBounce:= 1;
- gear^.Radius:= 4;
+ gear^.Radius:= 6;
gear^.Elasticity:= _0_8;
gear^.Friction:= _0_995;
gear^.RenderTimer:= true;
@@ -328,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;
@@ -361,7 +273,7 @@
end;
gtRope: begin
gear^.Radius:= 3;
- gear^.Friction:= _450;
+ gear^.Friction:= _450 * _0_01 * cRopePercent;
RopePoints.Count:= 0;
end;
gtMine: begin
@@ -371,9 +283,9 @@
gear^.Elasticity:= _0_55;
gear^.Friction:= _0_995;
if cMinesTime < 0 then
- gear^.Timer:= getrandom(4)*1000
+ gear^.Timer:= getrandom(51)*100
else
- gear^.Timer:= cMinesTime*1;
+ gear^.Timer:= cMinesTime;
end;
gtSMine: begin
gear^.Health:= 10;
@@ -551,6 +463,10 @@
gtWaterUp: begin
gear^.Tag := 47;
end;
+ gtNapalmBomb: begin
+ gear^.Timer:= 1000;
+ gear^.Radius:= 5;
+ end;
end;
InsertGearToList(gear);
@@ -600,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;
@@ -619,7 +535,14 @@
end
end;
inc(KilledHHs);
- RecountTeamHealth(team)
+ RecountTeamHealth(team);
+ if (CurrentHedgehog <> nil) and CurrentHedgehog^.Effects[heResurrectable] and not Gear^.Hedgehog^.Effects[heResurrectable] then
+ with CurrentHedgehog^ do
+ begin
+ inc(Team^.stats.AIKills);
+ if Team^.AIKillsTex <> nil then FreeTexture(Team^.AIKillsTex);
+ Team^.AIKillsTex := RenderStringTex(inttostr(Team^.stats.AIKills), Team^.Clan^.Color, fnt16);
+ end
end;
{$IFDEF DEBUGFILE}
with Gear^ do AddFileLog('Delete: #' + inttostr(uid) + ' (' + inttostr(hwRound(x)) + ',' + inttostr(hwRound(y)) + '), d(' + floattostr(dX) + ',' + floattostr(dY) + ') type = ' + EnumToStr(Kind));
@@ -656,17 +579,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;
@@ -690,20 +613,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
@@ -712,7 +635,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
@@ -765,7 +688,7 @@
end;
Gear^.doStep(Gear);
// might be useful later
- //ScriptCall('OnGearStep', Gear^.uid);
+ //ScriptCall('onGearStep', Gear^.uid);
end
end;
@@ -940,6 +863,7 @@
inc(hiTicks) // we do not recieve a message for this
end;
+ScriptCall('onGameTick');
inc(GameTicks)
end;
@@ -970,11 +894,13 @@
for i:= 0 to cMaxHHIndex do
with Hedgehogs[i] do
begin
+(*
if (SpeechGear <> nil) then
begin
DeleteVisualGear(SpeechGear); // remove to restore persisting beyond end of turn. Tiy says was too much of a gameplay issue
SpeechGear:= nil
end;
+*)
if (Gear <> nil) then
begin
@@ -986,15 +912,15 @@
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;
- if (GameFlags and gfResetWeps) <> 0 then
+ if ((GameFlags and gfResetWeps) <> 0) and not PlacingHogs then
ResetWeapons;
if (GameFlags and gfResetHealth) <> 0 then
@@ -1010,7 +936,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
@@ -1046,7 +972,7 @@
end;
end;
inc(Gear^.Damage, Damage);
- ScriptCall('OnGearDamage', Gear^.UID, Damage);
+ ScriptCall('onGearDamage', Gear^.UID, Damage);
end;
procedure SetAllToActive;
@@ -1073,151 +999,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
@@ -1350,7 +1146,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;
@@ -1425,6 +1221,7 @@
var t: PGearArray;
Gear: PGear;
i, tmpDmg: LongInt;
+ VGear: PVisualGear;
begin
t:= CheckGearsCollision(Ammo);
// Just to avoid hogs on rope dodging fire.
@@ -1446,6 +1243,16 @@
tmpDmg:= ModifyDamage(Damage, Gear);
if (Gear^.State and gstNoDamage) = 0 then
begin
+
+ if (Ammo^.Kind = gtDEagleShot) or (Ammo^.Kind = gtSniperRifleShot) then
+ begin
+ VGear := AddVisualGear(hwround(Ammo^.X), hwround(Ammo^.Y), vgtBulletHit);
+ if VGear <> nil then
+ begin
+ VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
+ end;
+ end;
+
if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1;
case Gear^.Kind of
@@ -1463,7 +1270,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
@@ -1653,17 +1460,20 @@
gear^.State := gstWait;
uStats.HedgehogDamaged(gear);
gear^.Damage := 0;
- gear^.Health := 100;
- with CurrentHedgehog^ do begin
- inc(Team^.stats.AIKills);
- 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;
+ gear^.Health := gear^.Hedgehog^.InitialHealth;
+ gear^.Hedgehog^.Effects[hePoisoned] := false;
+ if not CurrentHedgehog^.Effects[heResurrectable] then
+ with CurrentHedgehog^ do
+ begin
+ inc(Team^.stats.AIKills);
+ if Team^.AIKillsTex <> nil then FreeTexture(Team^.AIKillsTex);
+ Team^.AIKillsTex := RenderStringTex(inttostr(Team^.stats.AIKills), Team^.Clan^.Color, fnt16);
+ end;
+ tempTeam := gear^.Hedgehog^.Team;
DeleteCI(gear);
- FindPlace(gear, false, 0, LAND_WIDTH);
+ FindPlace(gear, false, 0, LAND_WIDTH, true);
if gear <> nil then begin
- RenderHealth(PHedgehog(gear^.Hedgehog)^);
+ RenderHealth(gear^.Hedgehog^);
ScriptCall('onGearResurrect', gear^.uid);
end;
RecountTeamHealth(tempTeam);
@@ -1791,7 +1601,7 @@
end
end;
-procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt);
+procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt; skipProximity: boolean = false);
function CountNonZeroz(x, y, r, c: LongInt): LongInt;
var i: LongInt;
@@ -1813,57 +1623,66 @@
ar2: array[0..1023] of TPoint;
cnt, cnt2: Longword;
delta: LongInt;
+ reallySkip, tryAgain: boolean;
begin
-delta:= 250;
-cnt2:= 0;
-repeat
- x:= Left + LongInt(GetRandom(Delta));
+reallySkip:= false; // try not skipping proximity at first
+tryAgain:= true;
+while tryAgain do
+ begin
+ delta:= 250;
+ cnt2:= 0;
repeat
- inc(x, Delta);
- cnt:= 0;
- y:= min(1024, topY) - 2 * Gear^.Radius;
- while y < cWaterLine do
- begin
- repeat
- inc(y, 2);
- until (y >= cWaterLine) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) = 0);
+ x:= Left + LongInt(GetRandom(Delta));
+ repeat
+ inc(x, Delta);
+ cnt:= 0;
+ y:= min(1024, topY) - 2 * Gear^.Radius;
+ while y < cWaterLine do
+ begin
+ repeat
+ inc(y, 2);
+ until (y >= cWaterLine) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) = 0);
- sy:= y;
+ sy:= y;
- repeat
- inc(y);
- until (y >= cWaterLine) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) <> 0);
+ repeat
+ inc(y);
+ until (y >= cWaterLine) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) <> 0);
- if (y - sy > Gear^.Radius * 2) and
- (((Gear^.Kind = gtExplosives)
- and (y < cWaterLine)
- and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 60, 60) = nil)
- and (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1) > Gear^.Radius))
- or
- ((Gear^.Kind <> gtExplosives)
- and (y < cWaterLine)
- and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 110, 110) = nil))) then
- begin
- ar[cnt].X:= x;
- if withFall then ar[cnt].Y:= sy + Gear^.Radius
- else ar[cnt].Y:= y - Gear^.Radius;
- inc(cnt)
+ if (y - sy > Gear^.Radius * 2) and
+ (((Gear^.Kind = gtExplosives)
+ and (y < cWaterLine)
+ and (reallySkip or (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 60, 60) = nil))
+ and (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1) > Gear^.Radius))
+ or
+ ((Gear^.Kind <> gtExplosives)
+ and (y < cWaterLine)
+ and (reallySkip or (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 110, 110) = nil)))) then
+ begin
+ ar[cnt].X:= x;
+ if withFall then ar[cnt].Y:= sy + Gear^.Radius
+ else ar[cnt].Y:= y - Gear^.Radius;
+ inc(cnt)
+ end;
+
+ inc(y, 45)
end;
- inc(y, 45)
- end;
+ if cnt > 0 then
+ with ar[GetRandom(cnt)] do
+ begin
+ ar2[cnt2].x:= x;
+ ar2[cnt2].y:= y;
+ inc(cnt2)
+ end
+ until (x + Delta > Right);
- if cnt > 0 then
- with ar[GetRandom(cnt)] do
- begin
- ar2[cnt2].x:= x;
- ar2[cnt2].y:= y;
- inc(cnt2)
- end
- until (x + Delta > Right);
-
- dec(Delta, 60)
-until (cnt2 > 0) or (Delta < 70);
+ dec(Delta, 60)
+ until (cnt2 > 0) or (Delta < 70);
+ if (cnt2 = 0) and skipProximity and not reallySkip then tryAgain:= true
+ else tryAgain:= false;
+ reallySkip:= true;
+ end;
if cnt2 > 0 then
with ar2[GetRandom(cnt2)] do
@@ -1877,7 +1696,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
@@ -1892,7 +1711,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)
@@ -1914,8 +1733,86 @@
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;
+ hh: PHedgehog;
+ i, x, t, h: byte;
+ c, j: LongInt;
+begin
+ hh:= nil;
+ i:= 0;
+ t:= 0;
+ x:= byte(s[1]); // speech type
+ if x < 4 then
+ begin
+ t:= byte(s[2]); // team
+ if Length(s) > 2 then h:= byte(s[3]) // target hog
+ end;
+ // allow targetting a hog by specifying a number as the first portion of the text
+ if (x < 4) and (h > byte('0')) and (h < byte('9')) then i:= h - 48;
+ if i <> 0 then text:= copy(s, 4, Length(s) - 1)
+ else if x < 4 then text:= copy(s, 3, Length(s) - 1)
+ else text:= copy(s, 2, Length(s) - 1);
+
+ (*
+ if CheckNoTeamOrHH then
+ begin
+ ParseCommand('say ' + text, true);
+ exit
+ end;
+ *)
+
+ if (x < 4) and (TeamsArray[t] <> nil) then
+ begin
+ // if team matches current hedgehog team, default to current hedgehog
+ if (i = 0) and (CurrentHedgehog^.Team = TeamsArray[t]) then hh:= CurrentHedgehog
+ else
+ begin
+ // otherwise use the first living hog or the hog amongs the remaining ones indicated by i
+ j:= 0;
+ c:= 0;
+ while (j <= cMaxHHIndex) and (hh = nil) do
+ begin
+ if (TeamsArray[t]^.Hedgehogs[j].Gear <> nil) then
+ begin
+ inc(c);
+ if (i=0) or (i=c) then
+ hh:= @TeamsArray[t]^.Hedgehogs[j]
+ end;
+ inc(j)
+ end
+ end;
+ if hh <> nil then Gear:= AddVisualGear(0, 0, vgtSpeechBubble);
+ if Gear <> nil then
+ begin
+ Gear^.Hedgehog:= hh;
+ Gear^.Text:= text;
+ Gear^.FrameTicks:= x
+ end
+ else ParseCommand('say ' + text, true)
+ end
+ else if (x >= 4) then
+ begin
+ SpeechType:= x-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 Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uIO.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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
@@ -210,7 +220,7 @@
SendEmptyPacketTicks:= 0;
if s[0]>#251 then s[0]:= #251;
SDLNet_Write16(GameTicks, @s[Succ(byte(s[0]))]);
- {$IFDEF DEBUGFILE}AddFileLog('IPC send: '+ s[1]);{$ENDIF}
+ {$IFDEF DEBUGFILE}AddFileLog('[IPC out] '+ s[1]);{$ENDIF}
inc(s[0], 2);
SDLNet_TCP_Send(IPCSock, @s, Succ(byte(s[0])))
end
@@ -237,7 +247,7 @@
procedure SendIPCTimeInc;
const timeinc: shortstring = '#';
begin
-{$IFDEF DEBUGFILE}AddFileLog('IPC Send #');{$ENDIF}
+{$IFDEF DEBUGFILE}AddFileLog('[IPC out] <time increment>');{$ENDIF}
SendIPCRaw(@timeinc, 2)
end;
@@ -275,6 +285,7 @@
and (tmpflag or (headcmd^.cmd = '#')) // '#' is the only cmd which can be sent within same tick after 'N'
and ((GameTicks = hiTicks shl 16 + headcmd^.loTime)
or (headcmd^.cmd = 's') // for these commands time is not specified
+ or (headcmd^.cmd = 'h') // seems the hedgewars protocol does not allow remote synced commands
or (headcmd^.cmd = '#')
or (headcmd^.cmd = 'b')
or (headcmd^.cmd = 'F')) do
@@ -298,20 +309,25 @@
'j': ParseCommand('ljump', true);
'J': ParseCommand('hjump', true);
',': ParseCommand('skip', true);
+ 'c': begin
+ s:= copy(headcmd^.str, 2, Pred(headcmd^.len));
+ ParseCommand('gencmd ' + s, true);
+ end;
'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 +358,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 +367,58 @@
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;
+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 and InputMask);
+ 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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uKeys.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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];
@@ -175,14 +171,19 @@
if CurrentBinds[i][0] <> #0 then
begin
if (i > 3) and (tkbdn[i] <> 0) and not ((CurrentBinds[i] = 'put') or (CurrentBinds[i] = 'ammomenu') or (CurrentBinds[i] = '+cur_u') or (CurrentBinds[i] = '+cur_d') or (CurrentBinds[i] = '+cur_l') or (CurrentBinds[i] = '+cur_r')) then hideAmmoMenu:= true;
- if (tkbd[i] = 0) and (tkbdn[i] <> 0) then ParseCommand(CurrentBinds[i], Trusted)
+ if (tkbd[i] = 0) and (tkbdn[i] <> 0) then
+ begin
+ ParseCommand(CurrentBinds[i], Trusted);
+ if (CurrentTeam <> nil) and not CurrentTeam^.ExtDriven and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true)
+ end
else if (CurrentBinds[i][1] = '+')
and (tkbdn[i] = 0)
and (tkbd[i] <> 0) then
begin
s:= CurrentBinds[i];
s[1]:= '-';
- ParseCommand(s, Trusted)
+ ParseCommand(s, Trusted);
+ if (CurrentTeam <> nil) and not CurrentTeam^.ExtDriven and (ReadyTimeLeft > 1) then ParseCommand('gencmd R', true)
end;
tkbd[i]:= tkbdn[i]
end
@@ -196,7 +197,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 +266,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 +276,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 +286,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 +351,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 +426,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 +442,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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uLand.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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, uLandPainted;
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;
@@ -548,57 +496,70 @@
i: Longword;
y, x: Longword;
begin
-for y:= 0 to LAND_HEIGHT - 1 do
- for x:= 0 to LAND_WIDTH - 1 do
- Land[y, x]:= lfBasic;
-
-{$HINTS OFF}
-SetPoints(Template, pa);
-{$HINTS ON}
-for i:= 1 to Template.BezierizeCount do
- begin
- BezierizeEdge(pa, _0_5);
- RandomizePoints(pa);
- RandomizePoints(pa)
- end;
-for i:= 1 to Template.RandPassesCount do RandomizePoints(pa);
-BezierizeEdge(pa, _0_1);
-
-DrawEdge(pa, 0);
-
-with Template do
- for i:= 0 to pred(FillPointsCount) do
- with FillPoints^[i] do
- FillLand(x, y);
-
-DrawEdge(pa, lfBasic);
-
-MaxHedgehogs:= Template.MaxHedgehogs;
-hasGirders:= Template.hasGirders;
-playHeight:= Template.TemplateHeight;
-playWidth:= Template.TemplateWidth;
-leftX:= ((LAND_WIDTH - playWidth) div 2);
-rightX:= (playWidth + ((LAND_WIDTH - playWidth) div 2)) - 1;
-topY:= LAND_HEIGHT - playHeight;
-
-// force to only cavern even if a cavern map is invertable if cTemplateFilter = 4 ?
-if (cTemplateFilter = 4) or
- (Template.canInvert and (getrandom(2) = 0)) or
- (not Template.canInvert and Template.isNegative) then
- begin
- hasBorder:= true;
for y:= 0 to LAND_HEIGHT - 1 do
for x:= 0 to LAND_WIDTH - 1 do
- if (y < topY) or (x < leftX) or (x > rightX) then
- Land[y, x]:= 0
- else
- begin
- if Land[y, x] = 0 then
- Land[y, x]:= lfBasic
- else if Land[y, x] = lfBasic then
- Land[y, x]:= 0;
- end;
- end;
+ Land[y, x]:= lfBasic;
+ {$HINTS OFF}
+ SetPoints(Template, pa);
+ {$HINTS ON}
+ for i:= 1 to Template.BezierizeCount do
+ begin
+ BezierizeEdge(pa, _0_5);
+ RandomizePoints(pa);
+ RandomizePoints(pa)
+ end;
+ for i:= 1 to Template.RandPassesCount do RandomizePoints(pa);
+ BezierizeEdge(pa, _0_1);
+
+
+ DrawEdge(pa, 0);
+
+ with Template do
+ for i:= 0 to pred(FillPointsCount) do
+ with FillPoints^[i] do
+ FillLand(x, y);
+
+ DrawEdge(pa, lfBasic);
+
+ MaxHedgehogs:= Template.MaxHedgehogs;
+ hasGirders:= Template.hasGirders;
+ playHeight:= Template.TemplateHeight;
+ playWidth:= Template.TemplateWidth;
+ leftX:= ((LAND_WIDTH - playWidth) div 2);
+ rightX:= (playWidth + ((LAND_WIDTH - playWidth) div 2)) - 1;
+ topY:= LAND_HEIGHT - playHeight;
+
+ // HACK: force to only cavern even if a cavern map is invertable if cTemplateFilter = 4 ?
+ if (cTemplateFilter = 4) or
+ (Template.canInvert and (getrandom(2) = 0)) or
+ (not Template.canInvert and Template.isNegative) then
+ begin
+ hasBorder:= true;
+ for y:= 0 to LAND_HEIGHT - 1 do
+ for x:= 0 to LAND_WIDTH - 1 do
+ if (y < topY) or (x < leftX) or (x > rightX) then
+ Land[y, x]:= 0
+ else
+ begin
+ if Land[y, x] = 0 then
+ Land[y, x]:= lfBasic
+ else if Land[y, x] = lfBasic then
+ Land[y, x]:= 0;
+ end;
+ end;
+end;
+
+procedure GenDrawnMap;
+begin
+ uLandPainted.Draw;
+
+ MaxHedgehogs:= 48;
+ hasGirders:= true;
+ playHeight:= 2048;
+ playWidth:= 4096;
+ leftX:= ((LAND_WIDTH - playWidth) div 2);
+ rightX:= (playWidth + ((LAND_WIDTH - playWidth) div 2)) - 1;
+ topY:= LAND_HEIGHT - playHeight;
end;
function SelectTemplate: LongInt;
@@ -1083,6 +1044,9 @@
case cMapGen of
0: GenBlank(EdgeTemplates[SelectTemplate]);
1: GenMaze;
+ 2: GenDrawnMap;
+ else
+ OutError('Unknown mapgen', true);
end;
AddProgress();
@@ -1239,8 +1203,6 @@
AddProgress;
-{$IFDEF DEBUGFILE}LogLandDigest;{$ENDIF}
-
// check for land near top
c:= 0;
if (GameFlags and gfBorder) <> 0 then
@@ -1325,6 +1287,9 @@
case cMapGen of
0: GenBlank(EdgeTemplates[SelectTemplate]);
1: GenMaze;
+ 2: GenDrawnMap;
+ else
+ OutError('Unknown mapgen', true);
end;
lh:= LAND_HEIGHT div 128;
@@ -1348,8 +1313,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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uLandGraphics.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uLandObjects.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uLandPainted.pas Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,192 @@
+(*
+ * Hedgewars, a free turn based strategy game
+ * Copyright (c) 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
+ *)
+
+{$INCLUDE "options.inc"}
+
+unit uLandPainted;
+
+interface
+
+procedure LoadFromFile(fileName: shortstring);
+procedure Draw;
+procedure initModule;
+
+implementation
+uses uLandGraphics, uConsts, uUtils, SDLh, uCommands;
+
+type PointRec = packed record
+ X, Y: SmallInt;
+ flags: byte;
+ end;
+
+type
+ PPointEntry = ^PointEntry;
+ PointEntry = record
+ point: PointRec;
+ next: PPointEntry;
+ end;
+
+var pointsListHead, pointsListLast: PPointEntry;
+
+procedure DrawLineOnLand(X1, Y1, X2, Y2: LongInt);
+var eX, eY, dX, dY: LongInt;
+ i, sX, sY, x, y, d: LongInt;
+ b: boolean;
+ len: LongWord;
+begin
+ len:= 0;
+ if (X1 = X2) and (Y1 = Y2) then
+ begin
+ 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(len);
+ if (len mod 4) = 0 then FillRoundInLand(X, Y, 34, lfBasic)
+ end
+ end
+end;
+
+
+procedure LoadFromFile(fileName: shortstring);
+var
+ f: file of PointRec;
+ rec, prevRec: PointRec;
+begin
+ fileMode:= 0;
+
+ assignFile(f, fileName);
+ reset(f);
+
+ while not eof(f) do
+ begin
+ read(f, rec);
+ rec.X:= SDLNet_Read16(@rec.X);
+ rec.Y:= SDLNet_Read16(@rec.Y);
+
+ // FIXME: handle single point
+ if eof(f) or (rec.flags and $80 <> 0) then
+ else
+ DrawLineOnLand(prevRec.X, prevRec.Y, rec.X, rec.Y);
+
+ prevRec:= rec;
+ end;
+
+ closeFile(f);
+end;
+
+procedure chDraw(var s: shortstring);
+var rec: PointRec;
+ prec: ^PointRec;
+ pe: PPointEntry;
+ i, l: byte;
+begin
+ i:= 1;
+ l:= length(s);
+ while i < l do
+ begin
+ prec:= @s[i];
+ rec:= prec^;
+ rec.X:= SDLNet_Read16(@rec.X);
+ rec.Y:= SDLNet_Read16(@rec.Y);
+
+ pe:= new(PPointEntry);
+ if pointsListLast = nil then
+ pointsListHead:= pe
+ else
+ pointsListLast^.next:= pe;
+ pointsListLast:= pe;
+
+ pe^.point:= rec;
+ pe^.next:= nil;
+
+ inc(i, 5)
+ end;
+end;
+
+procedure Draw;
+var pe: PPointEntry;
+ prevPoint: PointRec;
+begin
+ pe:= pointsListHead;
+
+ while(pe <> nil) do
+ begin
+ if (pe^.point.flags and $80 <> 0) then
+ FillRoundInLand(pe^.point.X, pe^.point.Y, 34, lfBasic)
+ else
+ DrawLineOnLand(prevPoint.X, prevPoint.Y, pe^.point.X, pe^.point.Y);
+
+ prevPoint:= pe^.point;
+ pe:= pe^.next;
+ end;
+end;
+
+procedure initModule;
+begin
+ pointsListHead:= nil;
+ pointsListLast:= nil;
+
+ RegisterVariable('draw', vtCommand, @chDraw, false);
+end;
+
+end.
--- a/hedgewars/uLandTexture.pas Mon Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uLandTexture.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uLocale.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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);
-
- 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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uMisc.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 := 3000;
- 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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uMobile.pas Sun Dec 19 13:31:55 2010 -0500
@@ -30,9 +30,11 @@
procedure replayFinished; cdecl; external;
procedure updateVisualsNewTurn; cdecl; external;
function isApplePhone: Boolean; cdecl; external;
+function isAppleDeviceMuted: Boolean; cdecl; external;
procedure AudioServicesPlaySystemSound(num: LongInt); cdecl; external;
{$ENDIF}
function isPhone: Boolean; inline;
+function isDeviceMute: Boolean; inline;
procedure performRumble; inline;
procedure perfExt_AddProgress; inline;
procedure perfExt_FinishProgress; inline;
@@ -42,7 +44,7 @@
procedure perfExt_SaveFinishedSynching; inline;
implementation
-uses uTeams, uConsole;
+uses uVariables;
function isPhone: Boolean; inline;
begin
@@ -52,6 +54,14 @@
exit(false);
end;
+function isDeviceMute: Boolean; inline;
+begin
+{$IFDEF IPHONEOS}
+// exit(isAppleDeviceMuted());
+{$ENDIF}
+ exit(false);
+end;
+
procedure performRumble; inline;
begin
{$IFDEF IPHONEOS}
@@ -77,7 +87,9 @@
procedure perfExt_AmmoUpdate; // don't inline
begin
{$IFDEF IPHONEOS}
- if (CurrentTeam^.ExtDriven) or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then
+ if (CurrentTeam = nil) or
+ (CurrentTeam^.ExtDriven) or
+ (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then
exit(); // the other way around throws a compiler error
updateVisualsNewTurn();
{$ENDIF}
--- a/hedgewars/uRandom.pas Mon Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uRandom.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,450 @@
+{$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 DrawCircle(X, Y, Radius, Width: LongInt);
+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);
+begin
+ Tint(r, g, b, a);
+ DrawCircle(X, Y, Radius, Width);
+ Tint($FF, $FF, $FF, $FF);
+end;
+
+procedure DrawCircle(X, Y, Radius, Width: LongInt);
+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);
+ glVertexPointer(2, GL_FLOAT, 0, @CircleVertex[0]);
+ glDrawArrays(GL_LINE_LOOP, 0, 360);
+ 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 24) and $FF), ((c shr 16) and $FF), (c shr 8) and $FF, (c and $FF))
+end;
+
+end.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uRenderUtils.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uScript.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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;
@@ -79,6 +83,55 @@
// where L contains the state, returns the number of return values on the stack
// call lua_gettop(L) to receive number of parameters passed
+function lc_band(L: PLua_State): LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 2 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to band!');
+ lua_pushnil(L);
+ end
+ else lua_pushinteger(L, lua_tointeger(L, 2) and lua_tointeger(L, 1));
+ lc_band := 1;
+end;
+
+function lc_bor(L: PLua_State): LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 2 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to bor!');
+ lua_pushnil(L);
+ end
+ else lua_pushinteger(L, lua_tointeger(L, 2) or lua_tointeger(L, 1));
+ lc_bor := 1;
+end;
+
+function lc_bnot(L: PLua_State): LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 1 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to bnot!');
+ lua_pushnil(L);
+ end
+ else lua_pushinteger(L, not lua_tointeger(L, 1));
+ lc_bnot := 1;
+end;
+
+function lc_getinputmask(L : Plua_State) : LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 0 then
+ LuaError('Lua: Wrong number of parameters passed to GetInputMask!')
+ else lua_pushinteger(L, InputMask);
+ lc_getinputmask:= 1
+end;
+
+function lc_setinputmask(L : Plua_State) : LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 1 then
+ LuaError('Lua: Wrong number of parameters passed to SetInputMask!')
+ else InputMask:= lua_tointeger(L, 1);
+ lc_setinputmask:= 0
+end;
+
function lc_writelntoconsole(L : Plua_State) : LongInt; Cdecl;
begin
if lua_gettop(L) = 1 then
@@ -162,7 +215,7 @@
else begin
gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2),
HealthCrate, 0);
- lua_pushnumber(L, gear^.uid);
+ lua_pushinteger(L, gear^.uid);
end;
lc_spawnhealthcrate := 1;
end;
@@ -177,7 +230,7 @@
else begin
gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2),
AmmoCrate, lua_tointeger(L, 3));
- lua_pushnumber(L, gear^.uid);
+ lua_pushinteger(L, gear^.uid);
end;
lc_spawnammocrate := 1;
end;
@@ -192,7 +245,7 @@
else begin
gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2),
UtilityCrate, lua_tointeger(L, 3));
- lua_pushnumber(L, gear^.uid);
+ lua_pushinteger(L, gear^.uid);
end;
lc_spawnutilitycrate := 1;
end;
@@ -219,11 +272,124 @@
t:= lua_tointeger(L, 7);
gear:= AddGear(x, y, gt, s, dx, dy, t);
- lua_pushnumber(L, gear^.uid)
+ lua_pushinteger(L, gear^.uid)
end;
lc_addgear:= 1; // 1 return value
end;
+function lc_deletegear(L : Plua_State) : LongInt; Cdecl;
+var gear : PGear;
+begin
+ if lua_gettop(L) <> 1 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to DeleteGear!');
+ end
+ else
+ begin
+ gear:= GearByUID(lua_tointeger(L, 1));
+ if gear <> nil then DeleteGear(gear);
+ end;
+ lc_deletegear:= 0
+end;
+
+function lc_addvisualgear(L : Plua_State) : LongInt; Cdecl;
+var vg : PVisualGear;
+ x, y, s: LongInt;
+ c: Boolean;
+ vgt: TVisualGearType;
+begin
+ if lua_gettop(L) <> 5 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to AddVisualGear!');
+ lua_pushnil(L); // return value on stack (nil)
+ end
+ else
+ begin
+ x:= lua_tointeger(L, 1);
+ y:= lua_tointeger(L, 2);
+ vgt:= TVisualGearType(lua_tointeger(L, 3));
+ s:= lua_tointeger(L, 4);
+ c:= lua_toboolean(L, 5);
+
+ vg:= AddVisualGear(x, y, vgt, s, c);
+ if vg <> nil then lua_pushinteger(L, vg^.uid)
+ else lua_pushinteger(L, 0)
+ end;
+ lc_addvisualgear:= 1; // 1 return value
+end;
+
+function lc_deletevisualgear(L : Plua_State) : LongInt; Cdecl;
+var vg : PVisualGear;
+begin
+ if lua_gettop(L) <> 1 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to DeleteVisualGear!');
+ end
+ else
+ begin
+ vg:= VisualGearByUID(lua_tointeger(L, 1));
+ if vg <> nil then DeleteVisualGear(vg);
+ end;
+ lc_deletevisualgear:= 0
+end;
+
+function lc_getvisualgearvalues(L : Plua_State) : LongInt; Cdecl;
+var vg: PVisualGear;
+begin
+ if lua_gettop(L) <> 1 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to GetVisualGearValues!');
+ lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L);
+ lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L); lua_pushnil(L)
+ end
+ else
+ begin
+ vg:= VisualGearByUID(lua_tointeger(L, 1));
+ if vg <> nil then
+ begin
+ lua_pushinteger(L, round(vg^.X));
+ lua_pushinteger(L, round(vg^.Y));
+ lua_pushnumber(L, vg^.dX);
+ lua_pushnumber(L, vg^.dY);
+ lua_pushnumber(L, vg^.Angle);
+ lua_pushinteger(L, vg^.Frame);
+ lua_pushinteger(L, vg^.FrameTicks);
+ lua_pushinteger(L, vg^.State);
+ lua_pushinteger(L, vg^.Timer);
+ lua_pushinteger(L, vg^.Tint);
+ end
+ end;
+ lc_getvisualgearvalues:= 10;
+end;
+
+function lc_setvisualgearvalues(L : Plua_State) : LongInt; Cdecl;
+var vg : PVisualGear;
+begin
+ if lua_gettop(L) <> 11 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to SetVisualGearValues!');
+ lua_pushnil(L); // return value on stack (nil)
+ end
+ else
+ begin
+ vg:= VisualGearByUID(lua_tointeger(L, 1));
+ if vg <> nil then
+ begin
+ vg^.X:= lua_tointeger(L, 2);
+ vg^.Y:= lua_tointeger(L, 3);
+ vg^.dX:= lua_tonumber(L, 4);
+ vg^.dY:= lua_tonumber(L, 5);
+ vg^.Angle:= lua_tonumber(L, 6);
+ vg^.Frame:= lua_tointeger(L, 7);
+ if lua_tointeger(L, 8) <> 0 then vg^.FrameTicks:= lua_tointeger(L, 8); // find a better way to do this. maybe need to break all these up.
+ vg^.State:= lua_tointeger(L, 9);
+ vg^.Timer:= lua_tointeger(L, 10);
+ vg^.Tint:= lua_tointeger(L, 11);
+ end
+ end;
+ lc_setvisualgearvalues:= 0;
+end;
+
function lc_getfollowgear(L : Plua_State) : LongInt; Cdecl;
begin
if lua_gettop(L) <> 0 then
@@ -235,7 +401,7 @@
if FollowGear = nil then
lua_pushnil(L)
else
- lua_pushnumber(L, FollowGear^.uid);
+ lua_pushinteger(L, FollowGear^.uid);
lc_getfollowgear:= 1; // 1 return value
end;
@@ -299,13 +465,27 @@
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;
lc_gethoglevel := 1;
end;
+function lc_sethoglevel(L : Plua_State) : LongInt; Cdecl;
+var gear : PGear;
+begin
+ if lua_gettop(L) <> 2 then
+ LuaError('Lua: Wrong number of parameters passed to SetHogLevel!')
+ else
+ begin
+ gear:= GearByUID(lua_tointeger(L, 1));
+ if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
+ gear^.Hedgehog^.BotLevel:= lua_tointeger(L, 2);
+ end;
+ lc_sethoglevel:= 0
+end;
+
function lc_gethogclan(L : Plua_State) : LongInt; Cdecl;
var gear : PGear;
begin
@@ -319,7 +499,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);
@@ -327,6 +507,17 @@
lc_gethogclan:= 1
end;
+function lc_getclancolor(L : Plua_State) : LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 1 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to GetClanColor!');
+ lua_pushnil(L); // return value on stack (nil)
+ end
+ else lua_pushinteger(L, ClansArray[lua_tointeger(L, 1)]^.Color shl 8 or $FF);
+ lc_getclancolor:= 1
+end;
+
function lc_gethogteamname(L : Plua_State) : LongInt; Cdecl;
var gear : PGear;
begin
@@ -340,7 +531,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 +552,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);
@@ -381,7 +572,7 @@
begin
gear:= GearByUID(lua_tointeger(L, 1));
if gear <> nil then
- lua_pushnumber(L, gear^.Timer)
+ lua_pushinteger(L, gear^.Timer)
else
lua_pushnil(L);
end;
@@ -400,7 +591,7 @@
begin
gear:= GearByUID(lua_tointeger(L, 1));
if gear <> nil then
- lua_pushnumber(L, gear^.Health)
+ lua_pushinteger(L, gear^.Health)
else
lua_pushnil(L);
end;
@@ -419,7 +610,7 @@
begin
gear:= GearByUID(lua_tointeger(L, 1));
if gear <> nil then
- lua_pushnumber(L, hwRound(gear^.X))
+ lua_pushinteger(L, hwRound(gear^.X))
else
lua_pushnil(L);
end;
@@ -438,7 +629,7 @@
begin
gear:= GearByUID(lua_tointeger(L, 1));
if gear <> nil then
- lua_pushnumber(L, hwRound(gear^.Y))
+ lua_pushinteger(L, hwRound(gear^.Y))
else
lua_pushnil(L);
end;
@@ -467,28 +658,6 @@
lc_copypv:= 1
end;
-function lc_copypv2(L : Plua_State) : LongInt; Cdecl;
-var gears, geard : PGear;
-begin
- if lua_gettop(L) <> 2 then
- begin
- LuaError('Lua: Wrong number of parameters passed to CopyPV2!');
- end
- else
- begin
- gears:= GearByUID(lua_tointeger(L, 1));
- geard:= GearByUID(lua_tointeger(L, 2));
- if (gears <> nil) and (geard <> nil) then
- begin
- geard^.X:= gears^.X;
- geard^.Y:= gears^.Y;
- geard^.dX:= gears^.dX * 2;
- geard^.dY:= gears^.dY * 2;
- end
- end;
- lc_copypv2:= 1
-end;
-
function lc_followgear(L : Plua_State) : LongInt; Cdecl;
var gear : PGear;
begin
@@ -505,17 +674,17 @@
function lc_hogsay(L : Plua_State) : LongInt; Cdecl;
var gear : PGear;
vgear : PVisualGear;
+ s : LongWord;
begin
- if lua_gettop(L) <> 3 then
- begin
- LuaError('Lua: Wrong number of parameters passed to HogSay!');
- end
- else
+ if lua_gettop(L) = 4 then s:= lua_tointeger(L, 4)
+ else s:= 0;
+
+ if (lua_gettop(L) = 4) or (lua_gettop(L) = 3) then
begin
gear:= GearByUID(lua_tointeger(L, 1));
if gear <> nil then
begin
- vgear:= AddVisualGear(0, 0, vgtSpeechBubble);
+ vgear:= AddVisualGear(0, 0, vgtSpeechBubble, s, true);
if vgear <> nil then
begin
vgear^.Text:= lua_tostring(L, 2);
@@ -524,8 +693,25 @@
if (vgear^.FrameTicks < 1) or (vgear^.FrameTicks > 3) then vgear^.FrameTicks:= 1;
end;
end
+ end
+ else LuaError('Lua: Wrong number of parameters passed to HogSay!');
+ lc_hogsay:= 0
+end;
+
+function lc_addammo(L : Plua_State) : LongInt; Cdecl;
+var gear : PGear;
+begin
+ if lua_gettop(L) <> 2 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to AddAmmo!');
+ end
+ else
+ begin
+ gear:= GearByUID(lua_tointeger(L, 1));
+ if (gear <> nil) and (gear^.Hedgehog <> nil) then
+ AddAmmo(gear^.Hedgehog^, TAmmoType(lua_tointeger(L, 2)));
end;
- lc_hogsay:= 0
+ lc_addammo:= 0
end;
function lc_sethealth(L : Plua_State) : LongInt; Cdecl;
@@ -570,7 +756,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;
@@ -658,17 +844,25 @@
end;
function lc_playsound(L : Plua_State) : LongInt; Cdecl;
+var gear: PGear;
begin
- if lua_gettop(L) <> 1 then
- LuaError('Lua: Wrong number of parameters passed to PlaySound!')
- else
- PlaySound(TSound(lua_tointeger(L, 1)));
+ if lua_gettop(L) = 1 then
+ PlaySound(TSound(lua_tointeger(L, 1)))
+ else if lua_gettop(L) = 2 then
+ begin
+ gear:= GearByUID(lua_tointeger(L, 2));
+ if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
+ PlaySound(TSound(lua_tointeger(L, 1)),gear^.Hedgehog^.Team^.Voicepack)
+ end
+ else LuaError('Lua: Wrong number of parameters passed to PlaySound!');
lc_playsound:= 0;
end;
function lc_addteam(L : Plua_State) : LongInt; Cdecl;
+var np: LongInt;
begin
- if lua_gettop(L) <> 5 then
+ np:= lua_gettop(L);
+ if (np < 5) or (np > 6) then
begin
LuaError('Lua: Wrong number of parameters passed to AddTeam!');
//lua_pushnil(L)
@@ -679,6 +873,7 @@
ParseCommand('grave ' + lua_tostring(L, 3), true);
ParseCommand('fort ' + lua_tostring(L, 4), true);
ParseCommand('voicepack ' + lua_tostring(L, 5), true);
+ if (np = 6) then ParseCommand('flag ' + lua_tostring(L, 6), true);
CurrentTeam^.Binds:= DefaultBinds
// fails on x64
//lua_pushinteger(L, LongInt(CurrentTeam));
@@ -762,6 +957,45 @@
lc_setgearposition:= 0
end;
+function lc_getgearvelocity(L : Plua_State) : LongInt; Cdecl;
+var gear: PGear;
+begin
+ if lua_gettop(L) <> 1 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to GetGearVelocity!');
+ lua_pushnil(L);
+ lua_pushnil(L)
+ end
+ else
+ begin
+ gear:= GearByUID(lua_tointeger(L, 1));
+ if gear <> nil then
+ begin
+ lua_pushnumber(L, hwRound(gear^.dX * 1000) / 1000);
+ lua_pushnumber(L, hwRound(gear^.dY * 1000) / 1000)
+ end
+ end;
+ lc_getgearvelocity:= 2;
+end;
+
+function lc_setgearvelocity(L : Plua_State) : LongInt; Cdecl;
+var gear: PGear;
+begin
+ if lua_gettop(L) <> 3 then
+ LuaError('Lua: Wrong number of parameters passed to SetGearVelocity!')
+ else
+ begin
+ gear:= GearByUID(lua_tointeger(L, 1));
+ if gear <> nil then
+ begin
+ gear^.dX:= int2hwFloat(round(lua_tonumber(L, 2) * 1000)) / 1000;
+ gear^.dY:= int2hwFloat(round(lua_tonumber(L, 3) * 1000)) / 1000;
+ SetAllToActive;
+ end
+ end;
+ lc_setgearvelocity:= 0
+end;
+
function lc_setzoom(L : Plua_State) : LongInt; Cdecl;
begin
if lua_gettop(L) <> 1 then
@@ -821,6 +1055,33 @@
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;
+
+function lc_getdatapath(L : Plua_State) : LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 0 then
+ begin
+ LuaError('Lua: Wrong number of parameters passed to GetDataPath!');
+ lua_pushnil(L);
+ end
+ else
+ lua_pushstring(L, str2pchar(Pathz[ptData]));
+ lc_getdatapath:= 1
+end;
///////////////////
procedure ScriptPrintStack;
@@ -875,7 +1136,6 @@
end;
procedure ScriptOnGameInit;
-var s, t : ansistring;
begin
// not required if there is no script to run
if not ScriptLoaded then
@@ -901,12 +1161,6 @@
ScriptSetString('Map', '');
ScriptSetString('Theme', '');
-// import locale
-s:= cLocaleFName;
-t:= '';
-SplitByChar(s, t, '.');
-ScriptSetString('L', s);
-
ScriptCall('onGameInit');
// pop game variables
@@ -1084,9 +1338,11 @@
procedure initModule;
var at : TGearType;
+ vgt: TVisualGearType;
am : TAmmoType;
st : TSound;
he: THogEffect;
+ s, t : ansistring;
begin
// initialize lua
luaState:= lua_open;
@@ -1102,6 +1358,12 @@
ScriptSetInteger('LAND_WIDTH', LAND_WIDTH);
ScriptSetInteger('LAND_HEIGHT', LAND_HEIGHT);
+// import locale
+s:= cLocaleFName;
+t:= '';
+SplitByChar(s, t, '.');
+ScriptSetString('L', s);
+
// import game flags
ScriptSetInteger('gfForts', gfForts);
ScriptSetInteger('gfMultiWeapon', gfMultiWeapon);
@@ -1126,6 +1388,7 @@
ScriptSetInteger('gfResetWeps', gfResetWeps);
ScriptSetInteger('gfPerHogAmmo', gfPerHogAmmo);
ScriptSetInteger('gfDisableWind', gfDisableWind);
+ScriptSetInteger('gfMoreWind', gfMoreWind);
ScriptSetInteger('gmLeft', gmLeft);
ScriptSetInteger('gmRight', gmRight);
@@ -1153,6 +1416,9 @@
for at:= Low(TGearType) to High(TGearType) do
ScriptSetInteger(EnumToStr(at), ord(at));
+for vgt:= Low(TVisualGearType) to High(TVisualGearType) do
+ ScriptSetInteger(EnumToStr(vgt), ord(vgt));
+
// register sounds
for st:= Low(TSound) to High(TSound) do
ScriptSetInteger(EnumToStr(st), ord(st));
@@ -1165,7 +1431,17 @@
ScriptSetInteger(EnumToStr(he), ord(he));
// register functions
+lua_register(luaState, 'band', @lc_band);
+lua_register(luaState, 'bor', @lc_bor);
+lua_register(luaState, 'bnot', @lc_bnot);
+lua_register(luaState, 'GetInputMask', @lc_getinputmask);
+lua_register(luaState, 'SetInputMask', @lc_setinputmask);
lua_register(luaState, 'AddGear', @lc_addgear);
+lua_register(luaState, 'DeleteGear', @lc_deletegear);
+lua_register(luaState, 'AddVisualGear', @lc_addvisualgear);
+lua_register(luaState, 'DeleteVisualGear', @lc_deletevisualgear);
+lua_register(luaState, 'GetVisualGearValues', @lc_getvisualgearvalues);
+lua_register(luaState, 'SetVisualGearValues', @lc_setvisualgearvalues);
lua_register(luaState, 'SpawnHealthCrate', @lc_spawnhealthcrate);
lua_register(luaState, 'SpawnAmmoCrate', @lc_spawnammocrate);
lua_register(luaState, 'SpawnUtilityCrate', @lc_spawnutilitycrate);
@@ -1175,6 +1451,8 @@
lua_register(luaState, 'FindPlace', @lc_findplace);
lua_register(luaState, 'SetGearPosition', @lc_setgearposition);
lua_register(luaState, 'GetGearPosition', @lc_getgearposition);
+lua_register(luaState, 'SetGearVelocity', @lc_setgearvelocity);
+lua_register(luaState, 'GetGearVelocity', @lc_getgearvelocity);
lua_register(luaState, 'ParseCommand', @lc_parsecommand);
lua_register(luaState, 'ShowMission', @lc_showmission);
lua_register(luaState, 'HideMission', @lc_hidemission);
@@ -1183,16 +1461,19 @@
lua_register(luaState, 'PlaySound', @lc_playsound);
lua_register(luaState, 'AddTeam', @lc_addteam);
lua_register(luaState, 'AddHog', @lc_addhog);
+lua_register(luaState, 'AddAmmo', @lc_addammo);
lua_register(luaState, 'SetHealth', @lc_sethealth);
+lua_register(luaState, 'GetHealth', @lc_gethealth);
lua_register(luaState, 'SetEffect', @lc_seteffect);
lua_register(luaState, 'GetHogClan', @lc_gethogclan);
+lua_register(luaState, 'GetClanColor', @lc_getclancolor);
lua_register(luaState, 'GetHogTeamName', @lc_gethogteamname);
lua_register(luaState, 'GetHogName', @lc_gethogname);
lua_register(luaState, 'GetHogLevel', @lc_gethoglevel);
+lua_register(luaState, 'SetHogLevel', @lc_sethoglevel);
lua_register(luaState, 'GetX', @lc_getx);
lua_register(luaState, 'GetY', @lc_gety);
lua_register(luaState, 'CopyPV', @lc_copypv);
-lua_register(luaState, 'CopyPV2', @lc_copypv2);
lua_register(luaState, 'FollowGear', @lc_followgear);
lua_register(luaState, 'GetFollowGear', @lc_getfollowgear);
lua_register(luaState, 'SetState', @lc_setstate);
@@ -1200,7 +1481,6 @@
lua_register(luaState, 'SetTag', @lc_settag);
lua_register(luaState, 'SetTimer', @lc_settimer);
lua_register(luaState, 'GetTimer', @lc_gettimer);
-lua_register(luaState, 'GetHealth', @lc_gethealth);
lua_register(luaState, 'SetZoom', @lc_setzoom);
lua_register(luaState, 'GetZoom', @lc_getzoom);
lua_register(luaState, 'HogSay', @lc_hogsay);
@@ -1210,6 +1490,8 @@
lua_register(luaState, 'GetGearMessage', @lc_getgearmessage);
lua_register(luaState, 'SetGearMessage', @lc_setgearmessage);
lua_register(luaState, 'GetRandom', @lc_getrandom);
+lua_register(luaState, 'SetWind', @lc_setwind);
+lua_register(luaState, 'GetDataPath', @lc_getdatapath);
ScriptClearStack; // just to be sure stack is empty
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uSinTable.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uSound.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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, uMobile;
const chanTPU = 32;
var Volume: LongInt;
@@ -153,7 +147,8 @@
begin
defVoicepack^.chunks[i]:= nil;
// preload all the big sound files (>32k) that would otherwise lockup the game
- if (i in [sndBeeWater, sndBee, sndCake, sndHellishImpact1, sndHellish, sndHomerun, sndMolotov, sndMortar, sndRideOfTheValkyries, sndYoohoo])
+ if (i in [sndBeeWater, sndBee, sndCake, sndHellishImpact1, sndHellish, sndHomerun,
+ sndMolotov, sndMortar, sndRideOfTheValkyries, sndYoohoo])
and (Soundz[i].Path <> ptVoices) and (Soundz[i].FileName <> '') then
begin
s:= Pathz[Soundz[i].Path] + '/' + Soundz[i].FileName;
@@ -184,7 +179,7 @@
procedure PlaySound(snd: TSound; voicepack: PVoicepack; keepPlaying: boolean);
var s:shortstring;
begin
- if (not isSoundEnabled) or fastUntilLag then
+ if (not isSoundEnabled) or fastUntilLag or isDeviceMute() then
exit;
if keepPlaying and (lastChan[snd] <> -1) and (Mix_Playing(lastChan[snd]) <> 0) then
@@ -226,7 +221,7 @@
function LoopSound(snd: TSound; voicepack: PVoicepack): LongInt;
var s: shortstring;
begin
- if (not isSoundEnabled) or fastUntilLag then
+ if (not isSoundEnabled) or fastUntilLag or isDeviceMute() then
begin
LoopSound:= -1;
exit
@@ -323,8 +318,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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uStats.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uStore.pas Sun Dec 19 13:31:55 2010 -0500
@@ -20,53 +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 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;
@@ -77,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;
@@ -237,7 +120,7 @@
// overwrite flag for cpu teams and keep players from using it
if (Hedgehogs[0].Gear <> nil) and (Hedgehogs[0].BotLevel > 0) then
- Flag:= 'cpu'
+ if Flag = 'hedgewars' then Flag:= 'cpu'
else if Flag = 'cpu' then
Flag:= 'hedgewars';
@@ -478,370 +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 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
@@ -859,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
@@ -1325,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;
@@ -1576,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 Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uTeams.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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, uScript;
+
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
@@ -317,6 +248,7 @@
end;
perfExt_NewTurnBeginning();
+ScriptCall('onNewTurn');
end;
function AddTeam(TeamColor: Longword): PTeam;
@@ -380,6 +312,7 @@
if (not ExtDriven) and (Hedgehogs[0].BotLevel = 0) then
begin
LocalClan:= Clan^.ClanIndex;
+ LocalTeam:= t;
LocalAmmo:= Hedgehogs[0].AmmoStore
end;
th:= 0;
@@ -446,7 +379,7 @@
begin
MaxTeamHealth:= NewTeamHealthBarWidth;
RecountAllTeamsHealth;
- end else NewTeamHealthBarWidth:= (NewTeamHealthBarWidth * cTeamHealthWidth) div MaxTeamHealth
+ end else if NewTeamHealthBarWidth > 0 then NewTeamHealthBarWidth:= (NewTeamHealthBarWidth * cTeamHealthWidth) div MaxTeamHealth
end;
RecountClanHealth(team^.Clan);
@@ -461,7 +394,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,34 +508,22 @@
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;
TeamsCount:= 0;
ClansCount:= 0;
LocalClan:= -1;
+ LocalTeam:= -1;
LocalAmmo:= -1;
GameOver:= false
end;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uTextures.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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 Sun Dec 19 13:31:55 2010 -0500
@@ -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, gsSuspend);
+
+ 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 Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,348 @@
+{$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 : TVisualGearType) : 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;
+
+{$IFDEF DEBUGFILE}
+var 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 : TVisualGearType) : shortstring; overload;
+begin
+EnumToStr:= GetEnumName(TypeInfo(TVisualGearType), 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.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uVariables.pas Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,2254 @@
+{$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 = 5000;
+ cLogfileBase : shortstring = 'debug';
+//////////////////////////
+
+ alsoShutdownFrontend: boolean = false;
+
+ isCursorVisible : boolean;
+ isTerminated : boolean;
+ isInLag : boolean;
+ isPaused : boolean;
+
+ isSEBackup : boolean;
+ isInMultiShoot : boolean;
+ isSpeed : boolean;
+ isFirstFrame : boolean;
+
+ fastUntilLag : boolean;
+
+ GameState : TGameState;
+ GameType : TGameType;
+ InputMask : LongWord;
+ 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
+ LocalTeam: LongInt; // last non-bot, non-extdriven clan first team
+ LocalAmmo: LongInt; // last non-bot, non-extdriven clan's first team's ammo index, updated to next upcoming hog for per-hog-ammo
+ 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;
+
+ InputMask := $FFFFFFFF;
+ 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 := 3000;
+ 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 := 5000;
+end;
+
+end.
--- a/hedgewars/uVisualGears.pas Mon Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uVisualGears.pas Sun Dec 19 13:31:55 2010 -0500
@@ -20,49 +20,23 @@
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);
procedure DeleteVisualGear(Gear: PVisualGear);
+function VisualGearByUID(uid : Longword) : PVisualGear;
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"}
@@ -117,22 +91,27 @@
@doStepExplosion,
@doStepBigExplosion,
@doStepChunk,
- @doStepNote
+ @doStepNote,
+ @doStepLineTrail,
+ @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,
@@ -147,14 +126,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
@@ -316,6 +297,13 @@
Frame:= random(4);
FrameTicks:= random(2000) + 1500;
end;
+ vgtBulletHit: begin
+ dx:= 0;
+ dy:= 0;
+ FrameTicks:= 350;
+ Frame:= 7;
+ Angle := 0;
+ end;
end;
if State <> 0 then gear^.State:= State;
@@ -369,7 +357,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;
@@ -385,12 +373,14 @@
procedure DrawVisualGears(Layer: LongWord);
var Gear: PVisualGear;
+ tinted: boolean;
+ tmp: real;
begin
Gear:= VisualGearsList;
case Layer of
0: while Gear <> nil do
begin
- Tint(Gear^.Tint);
+ if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
case Gear^.Kind of
vgtFlake: if vobVelocity = 0 then
DrawSprite(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
@@ -398,14 +388,23 @@
DrawRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);
vgtCloud: DrawSprite(sprCloud, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
end;
+ if Gear^.Tint <> $FFFFFFFF then Tint($FF,$FF,$FF,$FF);
Gear:= Gear^.NextGear
end;
1: while Gear <> nil do
begin
- Tint(Gear^.Tint);
+ tinted:= false;
+ if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
case Gear^.Kind of
vgtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
vgtEvilTrace: if Gear^.State < 8 then DrawSprite(sprEvilTrace, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State);
+ vgtLineTrail: DrawLine(Gear^.X, Gear^.Y, Gear^.dX, Gear^.dY, 1.0, $FF, min(Gear^.Timer, $C0), min(Gear^.Timer, $80), min(Gear^.Timer, $FF));
+ vgtSpeechBubble: if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then
+ begin
+ tinted:= true;
+ Tint($FF, $FF, $FF, $66);
+ DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
+ end
end;
if (cReducedQuality and rqFancyBoom) = 0 then
case Gear^.Kind of
@@ -414,19 +413,25 @@
vgtDust: DrawSprite(sprDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
vgtFeather: begin
if Gear^.FrameTicks < 255 then
+ begin
Tint($FF, $FF, $FF, Gear^.FrameTicks);
+ tinted:= true
+ end;
DrawRotatedF(sprFeather, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
end;
end;
+ if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
Gear:= Gear^.NextGear
end;
2: while Gear <> nil do
begin
- Tint(Gear^.Tint);
+ tinted:= false;
+ if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
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))));
+ tinted:= true;
+ 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;
@@ -441,25 +446,33 @@
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));
+ tinted:= true;
+ 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
+ tinted:= true;
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;
vgtShell: begin
if Gear^.FrameTicks < $FF then
+ begin
Tint($FF, $FF, $FF, Gear^.FrameTicks);
+ tinted:= true
+ end;
DrawRotatedF(sprShell, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
end;
vgtEgg: begin
if Gear^.FrameTicks < $FF then
+ begin
Tint($FF, $FF, $FF, Gear^.FrameTicks);
+ tinted:= true
+ end;
DrawRotatedF(sprEgg, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
end;
vgtSplash: DrawSprite(sprSplash, round(Gear^.X) + WorldDx - 40, round(Gear^.Y) + WorldDy - 58, 19 - (Gear^.FrameTicks div 37));
@@ -469,22 +482,48 @@
Tint($FF, $FF, $FF, Gear^.FrameTicks div 2)
else
Tint($FF, $FF, $FF, $80);
+ tinted:= true;
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));
+ tinted:= true;
+ 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);
vgtNote: DrawRotatedF(sprNote, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
+ vgtBulletHit: DrawRotatedF(sprBulletHit, round(Gear^.X) + WorldDx - 0, round(Gear^.Y) + WorldDy - 0, 7 - (Gear^.FrameTicks div 50), 1, Gear^.Angle);
end;
case Gear^.Kind of
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);
+ vgtSpeechBubble: if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team = CurrentTeam)) or (Gear^.State = 2)) 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: if gear^.Angle = 1 then
+ begin
+ tmp:= Gear^.State / 100;
+ DrawTexture(round(Gear^.X-24*tmp) + WorldDx, round(Gear^.Y-24*tmp) + WorldDy, SpritesData[sprVampiric].Texture, tmp)
+ end
+ else DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer);
end;
+ if (Gear^.Tint <> $FFFFFFFF) or tinted then Tint($FF,$FF,$FF,$FF);
Gear:= Gear^.NextGear
end
+ end;
+end;
+
+function VisualGearByUID(uid : Longword) : PVisualGear;
+var vg: PVisualGear;
+begin
+VisualGearByUID:= nil;
+vg:= VisualGearsList;
+while vg <> nil do
+ begin
+ if vg^.uid = uid then
+ begin
+ VisualGearByUID:= vg;
+ exit
+ end;
+ vg:= vg^.NextGear
end
end;
--- a/hedgewars/uWorld.pas Mon Dec 06 03:07:03 2010 +0100
+++ b/hedgewars/uWorld.pas Sun Dec 19 13:31:55 2010 -0500
@@ -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;
Binary file misc/hedgewars.png has changed
--- a/project_files/HedgewarsMobile/Classes/AboutViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/AboutViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -91,6 +91,37 @@
// do nothing
}
+-(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+ return 95;
+}
+
+-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section {
+ NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
+ char *fullver;
+ short int proto = 20;
+ HW_versionInfo(&proto, &fullver);
+
+ NSString *footerString = [[NSString alloc] initWithFormat:
+ @"You are running Hedgewars-iOS %@ based on Hedgewars version %s (protocol %d)",
+ version, fullver, proto];
+
+ UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 50)];
+ footer.backgroundColor = [UIColor clearColor];
+
+ UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width*80/100, 90)];
+ label.center = CGPointMake(self.tableView.frame.size.width/2, 45);
+ label.textAlignment = UITextAlignmentCenter;
+ label.font = [UIFont systemFontOfSize:16];
+ label.textColor = [UIColor lightGrayColor];
+ label.numberOfLines = 5;
+ label.text = footerString;
+
+ label.backgroundColor = [UIColor clearColor];
+ [footer addSubview:label];
+ [label release];
+ return [footer autorelease];
+}
+
#pragma mark -
#pragma mark Memory Management
-(void) didReceiveMemoryWarning {
--- a/project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -27,7 +27,7 @@
#define BTNS_PER_ROW 9
#define DEFAULT_DESCRIPTION IS_IPAD() ? \
- NSLocalizedString(@"Hold your finger on a weapon to see what it does...",@"") : \
+ NSLocalizedString(@"Hold your finger on a weapon to see what it does.\nYou can move this window anywhere on the screen.",@"") : \
NSLocalizedString(@"Hold your finger on a weapon to see what it does.\nTap anywhere to dismiss.",@"")
@implementation AmmoMenuViewController
@@ -40,11 +40,6 @@
#pragma mark -
#pragma mark view handling
-(void) viewDidLoad {
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(updateAmmoVisuals)
- name:@"updateAmmoVisuals"
- object:nil];
-
self.view.frame = CGRectMake(0, 0, 480, 320);
self.view.backgroundColor = [UIColor blackColor];
self.view.layer.borderColor = [[UIColor whiteColor] CGColor];
@@ -344,7 +339,6 @@
}
-(void) viewDidUnload {
- [[NSNotificationCenter defaultCenter] removeObserver:self];
self.imagesArray = nil;
self.buttonsArray = nil;
self.nameLabel = nil;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/Appirater.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,105 @@
+/*
+ This file is part of Appirater.
+
+ Copyright (c) 2010, Arash Payan
+ All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ */
+/*
+ * Appirater.h
+ * appirater
+ *
+ * Created by Arash Payan on 9/5/09.
+ * http://arashpayan.com
+ * Copyright 2010 Arash Payan. All rights reserved.
+ */
+
+#import <Foundation/Foundation.h>
+
+extern NSString *const kAppiraterLaunchDate;
+extern NSString *const kAppiraterLaunchCount;
+extern NSString *const kAppiraterCurrentVersion;
+extern NSString *const kAppiraterRatedCurrentVersion;
+extern NSString *const kAppiraterDeclinedToRate;
+
+/*
+ Place your Apple generated software id here.
+ */
+#define APPIRATER_APP_ID 391234866
+
+/*
+ Your app's name.
+ */
+#define APPIRATER_APP_NAME [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleNameKey]
+
+/*
+ This is the message your users will see once they've passed the day+launches
+ threshold.
+ */
+#define APPIRATER_MESSAGE [NSString stringWithFormat:@"If you enjoy using %@, would you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!", APPIRATER_APP_NAME]
+
+/*
+ This is the title of the message alert that users will see.
+ */
+#define APPIRATER_MESSAGE_TITLE [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
+
+/*
+ The text of the button that rejects reviewing the app.
+ */
+#define APPIRATER_CANCEL_BUTTON NSLocalizedString(@"No thanks",@"")
+
+/*
+ Text of button that will send user to app review page.
+ */
+#define APPIRATER_RATE_BUTTON [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
+
+/*
+ Text for button to remind the user to review later.
+ */
+#define APPIRATER_RATE_LATER NSLocalizedString(@"Remind me later",@"")
+
+/*
+ Users will need to have the same version of your app installed for this many
+ days before they will be prompted to rate it.
+ */
+#define DAYS_UNTIL_PROMPT 5 // double
+
+/*
+ Users will need to launch the same version of the app this many times before
+ they will be prompted to rate it.
+ */
+#define LAUNCHES_UNTIL_PROMPT 10 // integer
+
+/*
+ 'YES' will show the Appirater alert everytime. Useful for testing how your message
+ looks and making sure the link to your app's review page works.
+ */
+#define APPIRATER_DEBUG NO // bool
+
+@interface Appirater : NSObject <UIAlertViewDelegate> {
+
+}
+
++(void) appLaunched;
+
+@end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/Appirater.m Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,207 @@
+/*
+ This file is part of Appirater.
+
+ Copyright (c) 2010, Arash Payan
+ All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ */
+/*
+ * Appirater.m
+ * appirater
+ *
+ * Created by Arash Payan on 9/5/09.
+ * http://arashpayan.com
+ * Copyright 2010 Arash Payan. All rights reserved.
+ */
+
+#import "Appirater.h"
+#import <SystemConfiguration/SCNetworkReachability.h>
+#import <netinet/in.h>
+
+NSString *const kAppiraterLaunchDate = @"kAppiraterLaunchDate";
+NSString *const kAppiraterLaunchCount = @"kAppiraterLaunchCount";
+NSString *const kAppiraterCurrentVersion = @"kAppiraterCurrentVersion";
+NSString *const kAppiraterRatedCurrentVersion = @"kAppiraterRatedCurrentVersion";
+NSString *const kAppiraterDeclinedToRate = @"kAppiraterDeclinedToRate";
+
+NSString *templateReviewURL = @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=APP_ID&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software";
+
+@interface Appirater (hidden)
+
+-(BOOL) connectedToNetwork;
+
+@end
+
+@implementation Appirater (hidden)
+
+-(BOOL) connectedToNetwork {
+ // Create zero addy
+ struct sockaddr_in zeroAddress;
+ bzero(&zeroAddress, sizeof(zeroAddress));
+ zeroAddress.sin_len = sizeof(zeroAddress);
+ zeroAddress.sin_family = AF_INET;
+
+ // Recover reachability flags
+ SCNetworkReachabilityRef defaultRouteReachability = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&zeroAddress);
+ SCNetworkReachabilityFlags flags;
+
+ BOOL didRetrieveFlags = SCNetworkReachabilityGetFlags(defaultRouteReachability, &flags);
+ CFRelease(defaultRouteReachability);
+
+ if (!didRetrieveFlags) {
+ NSLog(@"Error. Could not recover network reachability flags");
+ return NO;
+ }
+
+ BOOL isReachable = flags & kSCNetworkFlagsReachable;
+ BOOL needsConnection = flags & kSCNetworkFlagsConnectionRequired;
+ BOOL nonWiFi = flags & kSCNetworkReachabilityFlagsTransientConnection;
+
+ NSURL *testURL = [NSURL URLWithString:@"http://www.apple.com/"];
+ NSURLRequest *testRequest = [NSURLRequest requestWithURL:testURL cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:20.0];
+ NSURLConnection *testConnection = [[NSURLConnection alloc] initWithRequest:testRequest delegate:self];
+
+ return ((isReachable && !needsConnection) || nonWiFi) ? (testConnection ? YES : NO) : NO;
+}
+
+@end
+
+
+@implementation Appirater
+
++(void) appLaunched {
+ Appirater *appirater = [[Appirater alloc] init];
+ [NSThread detachNewThreadSelector:@selector(appLaunchedHandler) toTarget:appirater withObject:nil];
+}
+
+-(void) appLaunchedHandler {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ if (APPIRATER_DEBUG) {
+ [self performSelectorOnMainThread:@selector(showPrompt) withObject:nil waitUntilDone:NO];
+ return;
+ }
+
+ BOOL willShowPrompt = NO;
+
+ // get the app's version
+ NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleVersionKey];
+
+ // get the version number that we've been tracking
+ NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
+ NSString *trackingVersion = [userDefaults stringForKey:kAppiraterCurrentVersion];
+ if (trackingVersion == nil) {
+ trackingVersion = version;
+ [userDefaults setObject:version forKey:kAppiraterCurrentVersion];
+ }
+
+ if (APPIRATER_DEBUG)
+ DLog(@"APPIRATER Tracking version: %@", trackingVersion);
+
+ if ([trackingVersion isEqualToString:version]) {
+ // get the launch date
+ NSTimeInterval timeInterval = [userDefaults doubleForKey:kAppiraterLaunchDate];
+ if (timeInterval == 0) {
+ timeInterval = [[NSDate date] timeIntervalSince1970];
+ [userDefaults setDouble:timeInterval forKey:kAppiraterLaunchDate];
+ }
+
+ NSTimeInterval secondsSinceLaunch = [[NSDate date] timeIntervalSinceDate:[NSDate dateWithTimeIntervalSince1970:timeInterval]];
+ double secondsUntilPrompt = 60 * 60 * 24 * DAYS_UNTIL_PROMPT;
+
+ // get the launch count
+ int launchCount = [userDefaults integerForKey:kAppiraterLaunchCount];
+ launchCount++;
+ [userDefaults setInteger:launchCount forKey:kAppiraterLaunchCount];
+ if (APPIRATER_DEBUG)
+ NSLog(@"APPIRATER Launch count: %d", launchCount);
+
+ // have they previously declined to rate this version of the app?
+ BOOL declinedToRate = [userDefaults boolForKey:kAppiraterDeclinedToRate];
+
+ // have they already rated the app?
+ BOOL ratedApp = [userDefaults boolForKey:kAppiraterRatedCurrentVersion];
+
+ if (secondsSinceLaunch > secondsUntilPrompt &&
+ launchCount > LAUNCHES_UNTIL_PROMPT &&
+ !declinedToRate &&
+ !ratedApp) {
+ if ([self connectedToNetwork]) { // check if they can reach the app store
+ willShowPrompt = YES;
+ [self performSelectorOnMainThread:@selector(showPrompt) withObject:nil waitUntilDone:NO];
+ }
+ }
+ } else {
+ // it's a new version of the app, so restart tracking
+ [userDefaults setObject:version forKey:kAppiraterCurrentVersion];
+ [userDefaults setDouble:[[NSDate date] timeIntervalSince1970] forKey:kAppiraterLaunchDate];
+ [userDefaults setInteger:1 forKey:kAppiraterLaunchCount];
+ [userDefaults setBool:NO forKey:kAppiraterRatedCurrentVersion];
+ [userDefaults setBool:NO forKey:kAppiraterDeclinedToRate];
+ }
+
+ [userDefaults synchronize];
+ if (!willShowPrompt)
+ [self autorelease];
+
+ [pool release];
+}
+
+-(void) showPrompt {
+ UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:APPIRATER_MESSAGE_TITLE
+ message:APPIRATER_MESSAGE
+ delegate:self
+ cancelButtonTitle:APPIRATER_CANCEL_BUTTON
+ otherButtonTitles:APPIRATER_RATE_BUTTON, APPIRATER_RATE_LATER, nil];
+ [alertView show];
+ [alertView release];
+}
+
+-(void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger) buttonIndex {
+ NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
+
+ switch (buttonIndex) {
+ case 0:
+ // they don't want to rate it
+ [userDefaults setBool:YES forKey:kAppiraterDeclinedToRate];
+ break;
+ case 1:
+ // they want to rate it
+ [[UIApplication sharedApplication] openURL:
+ [NSURL URLWithString:[templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", APPIRATER_APP_ID]]]];
+
+ [userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion];
+ break;
+ case 2:
+ // remind them later
+ break;
+ default:
+ break;
+ }
+
+ [userDefaults synchronize];
+
+ [self release];
+}
+
+@end
--- a/project_files/HedgewarsMobile/Classes/CGPointUtils.c Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/CGPointUtils.c Sun Dec 19 13:31:55 2010 -0500
@@ -32,3 +32,29 @@
CGFloat rads = acos(((a*c) + (b*d)) / ((sqrt(a*a + b*b)) * (sqrt(c*c + d*d))));
return radiansToDegrees(rads);
}
+
+CGFloat CGPointDot(CGPoint a,CGPoint b) {
+ return a.x*b.x+a.y*b.y;
+}
+
+CGFloat CGPointLen(CGPoint a) {
+ return sqrtf(a.x*a.x+a.y*a.y);
+}
+
+CGPoint CGPointSub(CGPoint a,CGPoint b) {
+ CGPoint c = {a.x-b.x,a.y-b.y};
+ return c;
+}
+
+CGFloat CGPointDist(CGPoint a,CGPoint b) {
+ CGPoint c = CGPointSub(a,b);
+ return CGPointLen(c);
+}
+
+CGPoint CGPointNorm(CGPoint a) {
+ CGFloat m = sqrtf(a.x*a.x+a.y*a.y);
+ CGPoint c;
+ c.x = a.x/m;
+ c.y = a.y/m;
+ return c;
+}
--- a/project_files/HedgewarsMobile/Classes/CGPointUtils.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/CGPointUtils.h Sun Dec 19 13:31:55 2010 -0500
@@ -21,3 +21,9 @@
CGFloat distanceBetweenPoints (CGPoint first, CGPoint second);
CGFloat angleBetweenPoints(CGPoint first, CGPoint second);
CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint line2End);
+
+CGFloat CGPointDot(CGPoint a, CGPoint b);
+CGFloat CGPointLen(CGPoint a);
+CGPoint CGPointSub(CGPoint a, CGPoint b);
+CGFloat CGPointDist(CGPoint a, CGPoint b);
+CGPoint CGPointNorm(CGPoint a);
--- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Sun Dec 19 13:31:55 2010 -0500
@@ -25,6 +25,7 @@
#define SETTINGS_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/settings.plist"]
#define DEBUG_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/hw-game.log"]
+#define HEDGEHOG_FILE() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/Images/hedgehog.png"]
#define TEAMS_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Teams/"]
#define WEAPONS_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Weapons/"]
@@ -52,17 +53,16 @@
#define UICOLOR_HW_YELLOW_TEXT [UIColor colorWithRed:(CGFloat)0xF0/255 green:(CGFloat)0xD0/255 blue:0 alpha:1]
#define UICOLOR_HW_DARKBLUE [UIColor colorWithRed:(CGFloat)0x0F/255 green:0 blue:(CGFloat)0x42/255 alpha:1]
#define UICOLOR_HW_ALPHABLUE [UIColor colorWithRed:(CGFloat)0x0F/255 green:0 blue:(CGFloat)0x42/255 alpha:0.58f]
+#define UICOLOR_HW_ALMOSTBLACK (IS_NOT_POWERFUL()) ? [UIColor blackColor] : [UIColor colorWithRed:0 green:0 blue:0 alpha:0.6]
#define IS_DUALHEAD() ([[UIScreen class] respondsToSelector:@selector(screens)] && [[UIScreen screens] count] > 1)
#define IS_IPAD() (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_NOT_POWERFUL() ([modelType() hasPrefix:@"iPhone1"] || [modelType() hasPrefix:@"iPod1,1"] || [modelType() hasPrefix:@"iPod2,1"])
+#define IS_NOT_VERY_POWERFUL() ([modelType() hasPrefix:@"iPad1"] || [modelType() hasPrefix:@"iPhone2"] || [modelType() hasPrefix:@"iPod3"] )
#define DEFAULT_NETGAME_PORT 46631
-void createTeamNamed (NSString *nameWithoutExt);
-void createWeaponNamed (NSString *nameWithoutExt, int type);
-void createSchemeNamed (NSString *nameWithoutExt);
void print_free_memory (void);
void playSound (NSString *snd);
void popError (const char *title, const char *message);
@@ -73,3 +73,12 @@
NSArray *getAvailableColors (void);
UILabel *createBlueLabel (NSString *title, CGRect frame);
UILabel *createLabelWithParams (NSString *title, CGRect frame, CGFloat borderWidth, UIColor *borderColor, UIColor *backgroundColor);
+
+CGSize PSPNGSizeFromMetaData (NSString *aFileName);
+
+@interface NSString (extra)
+
+-(NSString *) MD5hash;
+
+@end
+
--- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Sun Dec 19 13:31:55 2010 -0500
@@ -25,178 +25,13 @@
#import <mach/mach.h>
#import <mach/mach_host.h>
#import <QuartzCore/QuartzCore.h>
-#import "AudioToolbox/AudioToolbox.h"
+#import <AudioToolbox/AudioToolbox.h>
+#import <CommonCrypto/CommonDigest.h>
#import "PascalImports.h"
-void createTeamNamed (NSString *nameWithoutExt) {
- NSString *teamsDirectory = TEAMS_DIRECTORY();
-
- if (![[NSFileManager defaultManager] fileExistsAtPath: teamsDirectory]) {
- [[NSFileManager defaultManager] createDirectoryAtPath:teamsDirectory
- withIntermediateDirectories:NO
- attributes:nil
- error:NULL];
- }
-
- NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: HW_getMaxNumberOfHogs()];
-
- for (int i = 0; i < HW_getMaxNumberOfHogs(); i++) {
- NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i];
- NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithInt:0],@"level",
- hogName,@"hogname", @"NoHat",@"hat", nil];
- [hogName release];
- [hedgehogs addObject:hog];
- [hog release];
- }
-
- NSDictionary *theTeam = [[NSDictionary alloc] initWithObjectsAndKeys:@"0",@"hash",
- @"Statue",@"grave", @"Plane",@"fort", @"Default",@"voicepack",
- @"hedgewars",@"flag", hedgehogs,@"hedgehogs", nil];
- [hedgehogs release];
-
- NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", teamsDirectory, nameWithoutExt];
-
- [theTeam writeToFile:teamFile atomically:YES];
- [teamFile release];
- [theTeam release];
-}
-
-void createWeaponNamed (NSString *nameWithoutExt, int type) {
- NSString *weaponsDirectory = WEAPONS_DIRECTORY();
-
- if (![[NSFileManager defaultManager] fileExistsAtPath: weaponsDirectory]) {
- [[NSFileManager defaultManager] createDirectoryAtPath:weaponsDirectory
- withIntermediateDirectories:NO
- attributes:nil
- error:NULL];
- }
-
- NSDictionary *theWeapon = nil;
- switch (type) {
- case 0: //default
- theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
- @"9391929422199121032235111001201000000211110101011",@"ammostore_initialqt",
- @"0405040541600655546554464776576666666155510101117",@"ammostore_probability",
- @"0000000000000205500000040007004000000000200000000",@"ammostore_delay",
- @"1311110312111111123114111111111111111211111101111",@"ammostore_crate", nil];
- break;
- case 1: //crazy
- theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
- @"9999999999999999992999999999999999299999999909999",@"ammostore_initialqt",
- @"1111110111111111111111111111111111111111111101111",@"ammostore_probability",
- @"0000000000000000000000000000000000000000000000000",@"ammostore_delay",
- @"1311110312111111123114111111111111111211110101111",@"ammostore_crate", nil];
- break;
- case 2: //pro mode
- theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
- @"9090009000000000000009000000000000000000000000000",@"ammostore_initialqt",
- @"0000000000000000000000000000000000000000000000000",@"ammostore_probability",
- @"0000000000000205500000040007004000000000200000000",@"ammostore_delay",
- @"1111111111111111111111111111111111111111100101111",@"ammostore_crate", nil];
- break;
- case 3: //shoppa
- theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
- @"0000009900000000000000000000000000000000000000000",@"ammostore_initialqt",
- @"4444410044244402210112121222422000000002000400010",@"ammostore_probability",
- @"0000000000000000000000000000000000000000000000000",@"ammostore_delay",
- @"1111111111111111111111111111111111111111101101111",@"ammostore_crate", nil];
- break;
- case 4: //clean slate
- theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
- @"1010009000010000011000000000000000000000000000001",@"ammostore_initialqt",
- @"0405040541600655546554464776576666666155510101117",@"ammostore_probability",
- @"0000000000000205500000040007004000000000200000000",@"ammostore_delay",
- @"1311110312111111123114111111111111111211111101111",@"ammostore_crate", nil];
- break;
- case 5: //minefield
- theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
- @"0000009900090000000300000000000000000000000000000",@"ammostore_initialqt",
- @"0000000000000000000000000000000000000000000000000",@"ammostore_probability",
- @"0000000000000205500000040007004000000000200000000",@"ammostore_delay",
- @"1111111111111111111111111111111111111111111101111",@"ammostore_crate", nil];
- break;
- default:
- NSLog(@"Nope");
- break;
- }
-
- NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt];
-
- [theWeapon writeToFile:weaponFile atomically:YES];
- [weaponFile release];
- [theWeapon release];
-}
-
-void createSchemeNamed (NSString *nameWithoutExt) {
- NSString *schemesDirectory = SCHEMES_DIRECTORY();
-
- if (![[NSFileManager defaultManager] fileExistsAtPath: schemesDirectory]) {
- [[NSFileManager defaultManager] createDirectoryAtPath:schemesDirectory
- withIntermediateDirectories:NO
- attributes:nil
- error:NULL];
- }
-
- NSMutableArray *basicArray = [[NSMutableArray alloc] initWithObjects:
- [NSNumber numberWithInt:100], //initialhealth
- [NSNumber numberWithInt:45], //turntime
- [NSNumber numberWithInt:100], //damagemodifier
- [NSNumber numberWithInt:15], //suddendeathtimeout
- [NSNumber numberWithInt:47], //waterrise
- [NSNumber numberWithInt:5], //healthdecrease
- [NSNumber numberWithInt:5], //cratedrops
- [NSNumber numberWithInt:35], //healthprob
- [NSNumber numberWithInt:25], //healthamount
- [NSNumber numberWithInt:3], //minestime
- [NSNumber numberWithInt:4], //minesnumber
- [NSNumber numberWithInt:0], //dudmines
- [NSNumber numberWithInt:2], //explosives
- nil];
-
- NSMutableArray *gamemodArray= [[NSMutableArray alloc] initWithObjects:
- [NSNumber numberWithBool:NO], //fortmode
- [NSNumber numberWithBool:NO], //divideteam
- [NSNumber numberWithBool:NO], //solidland
- [NSNumber numberWithBool:NO], //addborder
- [NSNumber numberWithBool:NO], //lowgravity
- [NSNumber numberWithBool:NO], //lasersight
- [NSNumber numberWithBool:NO], //invulnerable
- [NSNumber numberWithBool:NO], //resethealth
- [NSNumber numberWithBool:NO], //vampirism
- [NSNumber numberWithBool:NO], //karma
- [NSNumber numberWithBool:NO], //artillery
- [NSNumber numberWithBool:YES], //randomorder
- [NSNumber numberWithBool:NO], //king
- [NSNumber numberWithBool:NO], //placehedgehogs
- [NSNumber numberWithBool:NO], //clansharesammo
- [NSNumber numberWithBool:NO], //disablegirders
- [NSNumber numberWithBool:NO], //disablelandobjects
- [NSNumber numberWithBool:NO], //aisurvival
- [NSNumber numberWithBool:NO], //infattack
- [NSNumber numberWithBool:NO], //resetweaps
- [NSNumber numberWithBool:NO], //perhogammo
- nil];
-
- NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
- basicArray,@"basic",
- gamemodArray,@"gamemod",
- nil];
- [gamemodArray release];
- [basicArray release];
-
- NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt];
-
- [theScheme writeToFile:schemeFile atomically:YES];
- [schemeFile release];
- [theScheme release];
-}
-
BOOL inline rotationManager (UIInterfaceOrientation interfaceOrientation) {
- if (IS_IPAD())
- return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
- (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
- else
- return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
+ return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
+ (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
NSInteger inline randomPort () {
@@ -305,3 +140,63 @@
return theLabel;
}
+
+// this routine checks for the PNG size without loading it in memory
+// https://github.com/steipete/PSFramework/blob/master/PSFramework%20Version%200.3/PhotoshopFramework/PSMetaDataFunctions.m
+CGSize PSPNGSizeFromMetaData (NSString *aFileName) {
+ // File Name to C String.
+ const char *fileName = [aFileName UTF8String];
+ // source file
+ FILE *infile = fopen(fileName, "rb");
+ if (infile == NULL) {
+ DLog(@"Can't open the file: %@", aFileName);
+ return CGSizeZero;
+ }
+
+ // Bytes Buffer.
+ unsigned char buffer[30];
+ // Grab Only First Bytes.
+ fread(buffer, 1, 30, infile);
+ // Close File.
+ fclose(infile);
+
+ // PNG Signature.
+ unsigned char png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
+
+ // Compare File signature.
+ if ((int)(memcmp(&buffer[0], &png_signature[0], 8))) {
+ DLog(@"The file (%@) is not a PNG file", aFileName);
+ return CGSizeZero;
+ }
+
+ // Calc Sizes. Isolate only four bytes of each size (width, height).
+ int width[4];
+ int height[4];
+ for (int d = 16; d < (16 + 4); d++) {
+ width[d-16] = buffer[d];
+ height[d-16] = buffer[d+4];
+ }
+
+ // Convert bytes to Long (Integer)
+ long resultWidth = (width[0] << (int)24) | (width[1] << (int)16) | (width[2] << (int)8) | width[3];
+ long resultHeight = (height[0] << (int)24) | (height[1] << (int)16) | (height[2] << (int)8) | height[3];
+
+ // Return Size.
+ return CGSizeMake(resultWidth,resultHeight);
+}
+
+@implementation NSString (extra)
+
+-(NSString *)MD5hash {
+ const char *cStr = [self UTF8String];
+ unsigned char result[16];
+ CC_MD5( cStr, strlen(cStr), result );
+ return [NSString stringWithFormat:
+ @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+ result[0], result[1], result[2], result[3], result[4], result[5],
+ result[6], result[7], result[8], result[9], result[10], result[11],
+ result[12], result[13], result[14], result[15]];
+}
+
+
+@end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/CreationChamber.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,26 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@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.
+ *
+ * File created on 12/11/2010.
+ */
+
+
+#import <Foundation/Foundation.h>
+
+void createTeamNamed (NSString *nameWithoutExt);
+void createWeaponNamed (NSString *nameWithoutExt, int type);
+void createSchemeNamed (NSString *nameWithoutExt);
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/CreationChamber.m Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,203 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@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.
+ *
+ * File created on 12/11/2010.
+ */
+
+
+#import "CreationChamber.h"
+
+void createTeamNamed (NSString *nameWithoutExt) {
+ NSString *teamsDirectory = TEAMS_DIRECTORY();
+
+ if (![[NSFileManager defaultManager] fileExistsAtPath: teamsDirectory]) {
+ [[NSFileManager defaultManager] createDirectoryAtPath:teamsDirectory
+ withIntermediateDirectories:NO
+ attributes:nil
+ error:NULL];
+ }
+
+ NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: HW_getMaxNumberOfHogs()];
+
+ for (int i = 0; i < HW_getMaxNumberOfHogs(); i++) {
+ NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i];
+ NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys:
+ [NSNumber numberWithInt:0],@"level",
+ hogName,@"hogname",
+ @"NoHat",@"hat",
+ nil];
+ [hogName release];
+ [hedgehogs addObject:hog];
+ [hog release];
+ }
+
+ NSDictionary *theTeam = [[NSDictionary alloc] initWithObjectsAndKeys:
+ @"0",@"hash",
+ @"Statue",@"grave",
+ @"Plane",@"fort",
+ @"Default",@"voicepack",
+ @"hedgewars",@"flag",
+ hedgehogs,@"hedgehogs",
+ nil];
+ [hedgehogs release];
+
+ NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", teamsDirectory, nameWithoutExt];
+
+ [theTeam writeToFile:teamFile atomically:YES];
+ [teamFile release];
+ [theTeam release];
+}
+
+void createWeaponNamed (NSString *nameWithoutExt, int type) {
+ NSString *weaponsDirectory = WEAPONS_DIRECTORY();
+
+ if (![[NSFileManager defaultManager] fileExistsAtPath: weaponsDirectory]) {
+ [[NSFileManager defaultManager] createDirectoryAtPath:weaponsDirectory
+ withIntermediateDirectories:NO
+ attributes:nil
+ error:NULL];
+ }
+
+ NSDictionary *theWeapon = nil;
+ switch (type) {
+ case 0: //default
+ theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
+ @"93919294221991210322351110012010000002111101010111",@"ammostore_initialqt",
+ @"04050405416006555465544647765766666661555101011154",@"ammostore_probability",
+ @"00000000000002055000000400070040000000002000000006",@"ammostore_delay",
+ @"13111103121111111231141111111111111112111111011111",@"ammostore_crate", nil];
+ break;
+ case 1: //crazy
+ theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
+ @"99999999999999999929999999999999992999999999099999",@"ammostore_initialqt",
+ @"11111101111111111111111111111111111111111111011111",@"ammostore_probability",
+ @"00000000000000000000000000000000000000000000000000",@"ammostore_delay",
+ @"13111103121111111231141111111111111112111101011111",@"ammostore_crate", nil];
+ break;
+ case 2: //pro mode
+ theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
+ @"90900090000000000000090000000000000000000000000000",@"ammostore_initialqt",
+ @"00000000000000000000000000000000000000000000000000",@"ammostore_probability",
+ @"00000000000002055000000400070040000000002000000000",@"ammostore_delay",
+ @"11111111111111111111111111111111111111111001011111",@"ammostore_crate", nil];
+ break;
+ case 3: //shoppa
+ theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
+ @"00000099000000000000000000000000000000000000000000",@"ammostore_initialqt",
+ @"44444100442444022101121212224220000000020004000100",@"ammostore_probability",
+ @"00000000000000000000000000000000000000000000000000",@"ammostore_delay",
+ @"11111111111111111111111111111111111111111011011111",@"ammostore_crate", nil];
+ break;
+ case 4: //clean slate
+ theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
+ @"10100090000100000110000000000000000000000000000010",@"ammostore_initialqt",
+ @"04050405416006555465544647765766666661555101011154",@"ammostore_probability",
+ @"00000000000002055000000400070040000000002000000000",@"ammostore_delay",
+ @"13111103121111111231141111111111111112111111011111",@"ammostore_crate", nil];
+ break;
+ case 5: //minefield
+ theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
+ @"00000099000900000003000000000000000000000000000000",@"ammostore_initialqt",
+ @"00000000000000000000000000000000000000000000000000",@"ammostore_probability",
+ @"00000000000002055000000400070040000000002000000000",@"ammostore_delay",
+ @"11111111111111111111111111111111111111111111011111",@"ammostore_crate", nil];
+ break;
+ case 6: //thinking with portals
+ theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
+ @"90000090020000000021000000000000001100000900000000",@"ammostore_initialqt",
+ @"04050405416006555465544647765766666661555101011154",@"ammostore_probability",
+ @"00000000000002055000000400070040000000002000000006",@"ammostore_delay",
+ @"13111103121111111231141111111111111112111111011111",@"ammostore_crate", nil];
+ break;
+ default:
+ NSLog(@"Nope");
+ break;
+ }
+
+ NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt];
+
+ [theWeapon writeToFile:weaponFile atomically:YES];
+ [weaponFile release];
+ [theWeapon release];
+}
+
+void createSchemeNamed (NSString *nameWithoutExt) {
+ NSString *schemesDirectory = SCHEMES_DIRECTORY();
+
+ if (![[NSFileManager defaultManager] fileExistsAtPath: schemesDirectory]) {
+ [[NSFileManager defaultManager] createDirectoryAtPath:schemesDirectory
+ withIntermediateDirectories:NO
+ attributes:nil
+ error:NULL];
+ }
+
+ NSMutableArray *basicArray = [[NSMutableArray alloc] initWithObjects:
+ [NSNumber numberWithInt:100], //initialhealth
+ [NSNumber numberWithInt:45], //turntime
+ [NSNumber numberWithInt:3], //minestime
+ [NSNumber numberWithInt:100], //damagemodifier
+ [NSNumber numberWithInt:15], //suddendeathtimeout
+ [NSNumber numberWithInt:47], //waterrise
+ [NSNumber numberWithInt:5], //healthdecrease
+ [NSNumber numberWithInt:100], //ropelength
+ [NSNumber numberWithInt:5], //cratedrops
+ [NSNumber numberWithInt:35], //healthprob
+ [NSNumber numberWithInt:25], //healthamount
+ [NSNumber numberWithInt:4], //minesnumber
+ [NSNumber numberWithInt:0], //dudmines
+ [NSNumber numberWithInt:2], //explosives
+ nil];
+
+ NSMutableArray *gamemodArray= [[NSMutableArray alloc] initWithObjects:
+ [NSNumber numberWithBool:NO], //fortmode
+ [NSNumber numberWithBool:NO], //divideteam
+ [NSNumber numberWithBool:NO], //solidland
+ [NSNumber numberWithBool:NO], //addborder
+ [NSNumber numberWithBool:NO], //lowgravity
+ [NSNumber numberWithBool:NO], //lasersight
+ [NSNumber numberWithBool:NO], //invulnerable
+ [NSNumber numberWithBool:NO], //resethealth
+ [NSNumber numberWithBool:NO], //vampirism
+ [NSNumber numberWithBool:NO], //karma
+ [NSNumber numberWithBool:NO], //artillery
+ [NSNumber numberWithBool:YES], //randomorder
+ [NSNumber numberWithBool:NO], //king
+ [NSNumber numberWithBool:NO], //placehedgehogs
+ [NSNumber numberWithBool:NO], //clansharesammo
+ [NSNumber numberWithBool:NO], //disablegirders
+ [NSNumber numberWithBool:NO], //disablelandobjects
+ [NSNumber numberWithBool:NO], //aisurvival
+ [NSNumber numberWithBool:NO], //infattack
+ [NSNumber numberWithBool:NO], //resetweaps
+ [NSNumber numberWithBool:NO], //perhogammo
+ [NSNumber numberWithBool:NO], //nowind
+ [NSNumber numberWithBool:NO], //morewind
+ nil];
+
+ NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
+ basicArray,@"basic",
+ gamemodArray,@"gamemod",
+ nil];
+ [gamemodArray release];
+ [basicArray release];
+
+ NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt];
+
+ [theScheme writeToFile:schemeFile atomically:YES];
+ [schemeFile release];
+ [theScheme release];
+}
--- a/project_files/HedgewarsMobile/Classes/EditableCellView.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/EditableCellView.m Sun Dec 19 13:31:55 2010 -0500
@@ -37,6 +37,7 @@
textField.returnKeyType = UIReturnKeyDone;
textField.adjustsFontSizeToFitWidth = YES;
textField.userInteractionEnabled = YES;
+ textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
[textField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
[self.contentView addSubview:textField];
@@ -76,8 +77,6 @@
skew +=2;
}
- // sometimes the bold property gets lost
- textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
textField.frame = CGRectMake(boundsX+offset+10, skew+10, 300, [UIFont labelFontSize] + 4);
}
--- a/project_files/HedgewarsMobile/Classes/FlagsViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/FlagsViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -20,6 +20,7 @@
#import "FlagsViewController.h"
+#import <QuartzCore/QuartzCore.h>
#import "CommodityFunctions.h"
@implementation FlagsViewController
@@ -99,6 +100,7 @@
UIImage *flagSprite = [[UIImage alloc] initWithContentsOfFile:flagFile];
[flagFile release];
cell.imageView.image = flagSprite;
+ cell.imageView.layer.borderWidth = 0.3;
[flagSprite release];
cell.textLabel.text = [[source objectAtIndex:row] stringByDeletingPathExtension];
--- a/project_files/HedgewarsMobile/Classes/FortsViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/FortsViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -23,6 +23,8 @@
#import "CommodityFunctions.h"
#import "UIImageExtra.h"
+#define IMGNUM_PER_FORT 4
+
@implementation FortsViewController
@synthesize teamDictionary, fortArray, lastIndexPath;
@@ -41,7 +43,7 @@
NSMutableArray *filteredContents = [[NSMutableArray alloc] initWithCapacity:([directoryContents count] / 3)];
// we need to remove the double entries and the L.png suffix
for (int i = 0; i < [directoryContents count]; i++) {
- if (i % 3 == 1) {
+ if (i % IMGNUM_PER_FORT == 3) {
NSString *currentName = [directoryContents objectAtIndex:i];
NSString *correctName = [currentName substringToIndex:([currentName length] - 5)];
[filteredContents addObject:correctName];
@@ -51,13 +53,13 @@
[filteredContents release];
// statically set row height instead of using delegate method for performance reasons
- self.tableView.rowHeight = 200;
+ self.tableView.rowHeight = 128;
self.title = NSLocalizedString(@"Choose team fort",@"");
}
-- (void)viewWillAppear:(BOOL)animated {
+-(void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.tableView reloadData];
[self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
@@ -79,10 +81,9 @@
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
+ if (cell == nil)
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
reuseIdentifier:CellIdentifier] autorelease];
- }
NSString *fortName = [fortArray objectAtIndex:[indexPath row]];
cell.textLabel.text = fortName;
@@ -151,7 +152,6 @@
[teamDictionary release];
[lastIndexPath release];
[fortArray release];
-// [fortSprites release];
[super dealloc];
}
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -38,12 +38,7 @@
}
-(IBAction) buttonPressed:(id) sender {
- // works even if it's not actually a button
- UIButton *theButton;
- if (IS_IPAD())
- theButton = [[(NSNotification *)sender userInfo] objectForKey:@"sender"];
- else
- theButton = (UIButton *)sender;
+ UIButton *theButton = (UIButton *)sender;
switch (theButton.tag) {
case 0:
@@ -157,7 +152,6 @@
int hogs = 0;
for (NSDictionary *teamData in teamConfigViewController.listOfSelectedTeams)
hogs += [[teamData objectForKey:@"number"] intValue];
-
if (hogs > self.mapConfigViewController.maxHogs) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many hogs",@"")
message:NSLocalizedString(@"The map is too small for that many hogs",@"")
@@ -172,7 +166,7 @@
// play if there aren't too many teams
if ([self.teamConfigViewController.listOfSelectedTeams count] > HW_getMaxNumberOfTeams()) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many teams",@"")
- message:NSLocalizedString(@"Max six teams are allowed in the same game",@"")
+ message:NSLocalizedString(@"You exceeded the maximum number of tems allowed in a game",@"")
delegate:nil
cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
otherButtonTitles:nil];
@@ -193,7 +187,7 @@
return NO;
}
- // play if the gameflags are set correctly (divideteam works only with 2 teams
+ // play if the gameflags are set correctly (divideteam works only with 2 teams)
NSString *schemePath = [[NSString alloc] initWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),self.schemeWeaponConfigViewController.selectedScheme];
NSArray *gameFlags = [[NSDictionary dictionaryWithContentsOfFile:schemePath] objectForKey:@"gamemod"];
[schemePath release];
@@ -232,41 +226,17 @@
[NSNumber numberWithInt:self.interfaceOrientation],@"orientation",
nil];
- // finally launch game and remove this controller
- DLog(@"sending config %@", gameDictionary);
-
- if ([[gameDictionary allKeys] count] == 11) {
- NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys:gameDictionary,@"game_dictionary", @"",@"savefile",
- [NSNumber numberWithBool:NO],@"netgame", nil];
- // let's hide all the views while the game is on
+ NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys:gameDictionary,@"game_dictionary", @"",@"savefile",
+ [NSNumber numberWithBool:NO],@"netgame", nil];
+ if (IS_IPAD())
+ [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
+ else {
+ // this causes a sporadic crash on the ipad but without this rotation doesn't work on iphone
UIViewController *dummy = [[UIViewController alloc] init];
[self presentModalViewController:dummy animated:NO];
[[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
[self dismissModalViewControllerAnimated:NO];
[dummy release];
- } else {
- DLog(@"gameconfig data not complete!!");
- [self.parentViewController dismissModalViewControllerAnimated:YES];
-
- // present an alert to the user, with an image on the ipad (too big for the iphone)
- NSString *msg = NSLocalizedString(@"Something went wrong with your configuration. Please try again.",@"");
- if (IS_IPAD())
- msg = [msg stringByAppendingString:@"\n\n\n\n\n\n\n\n"]; // this makes space for the image
-
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Whoops"
- message:msg
- delegate:nil
- cancelButtonTitle:@"Ok"
- otherButtonTitles:nil];
-
- if (IS_IPAD()) {
- UIImageView *deniedImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"denied.png"]];
- deniedImg.frame = CGRectMake(25, 80, 240, 160);
- [alert addSubview:deniedImg];
- [deniedImg release];
- }
- [alert show];
- [alert release];
}
}
@@ -312,12 +282,6 @@
self.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width);
if (IS_IPAD()) {
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(buttonPressed:)
- name:@"buttonPressed"
- object:nil];
- srandom(time(NULL));
-
// load other controllers
if (self.mapConfigViewController == nil)
self.mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil];
@@ -358,6 +322,7 @@
self.teamConfigViewController.view.frame = CGRectMake(348, 200, 328, 480);
self.schemeWeaponConfigViewController.view.frame = CGRectMake(10, 70, 300, 600);
+ self.mapConfigViewController.parentController = self;
} else {
// this is the visible controller
if (self.mapConfigViewController == nil)
@@ -367,6 +332,7 @@
[self.view addSubview:self.schemeWeaponConfigViewController.view];
}
[self.view addSubview:self.mapConfigViewController.view];
+ self.mapConfigViewController.externalController = schemeWeaponConfigViewController;
[super viewDidLoad];
}
@@ -420,7 +386,6 @@
}
-(void) viewDidUnload {
- [[NSNotificationCenter defaultCenter] removeObserver:self];
self.imgContainer = nil;
self.mapConfigViewController = nil;
self.teamConfigViewController = nil;
--- a/project_files/HedgewarsMobile/Classes/GameSetup.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/GameSetup.h Sun Dec 19 13:31:55 2010 -0500
@@ -28,6 +28,7 @@
NSInteger ipcPort; // Port on which engine will listen
TCPsocket csd; // Client socket descriptor
+ TCPsocket esd; // External socket descriptor
NSString *savePath;
BOOL isNetGame;
--- a/project_files/HedgewarsMobile/Classes/GameSetup.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/GameSetup.m Sun Dec 19 13:31:55 2010 -0500
@@ -21,7 +21,6 @@
#import "GameSetup.h"
#import "SDL_uikitappdelegate.h"
-#import "SDL_net.h"
#import "PascalImports.h"
#import "CommodityFunctions.h"
#import "OverlayViewController.h"
@@ -165,7 +164,6 @@
[schemePath release];
NSArray *basicArray = [schemeDictionary objectForKey:@"basic"];
NSArray *gamemodArray = [schemeDictionary objectForKey:@"gamemod"];
- int i = 0;
int result = 0;
int mask = 0x00000004;
@@ -184,18 +182,23 @@
NSArray *mods = [[NSArray alloc] initWithContentsOfFile:path];
[path release];
+ int i = 0;
// initial health
- result = [[basicArray objectAtIndex:0] intValue];
+ result = [[basicArray objectAtIndex:i++] intValue];
// turn time
- NSInteger tentativeTurntime = [[basicArray objectAtIndex:1] intValue];
+ NSInteger tentativeTurntime = [[basicArray objectAtIndex:i++] intValue];
if (tentativeTurntime >= 100)
tentativeTurntime = 9999;
NSString *turnTime = [[NSString alloc] initWithFormat:@"e$turntime %d",tentativeTurntime * 1000];
[self sendToEngine:turnTime];
[turnTime release];
- for (i = 2; i < [basicArray count]; i++) {
+ NSString *minesTime = [[NSString alloc] initWithFormat:@"e$turntime %d",[[basicArray objectAtIndex:i++] intValue] * 1000];
+ [self sendToEngine:minesTime];
+ [minesTime release];
+
+ for (; i < [basicArray count]; i++) {
NSDictionary *basicDict = [mods objectAtIndex:i];
NSString *command = [basicDict objectForKey:@"command"];
NSInteger value = [[basicArray objectAtIndex:i] intValue];
@@ -212,13 +215,7 @@
}
#pragma mark -
-#pragma mark Thread/Network relevant code
-// select one of GameSetup method and execute it in a seprate thread
--(void) startThread:(NSString *)selector {
- SEL usage = NSSelectorFromString(selector);
- [NSThread detachNewThreadSelector:usage toTarget:self withObject:nil];
-}
-
+#pragma mark Network relevant code
-(void) dumpRawData:(const uint8_t*)buffer ofSize:(uint8_t) length {
// is it performant to reopen the stream every time?
NSOutputStream *os = [[NSOutputStream alloc] initToFileAtPath:self.savePath append:YES];
@@ -230,7 +227,7 @@
}
// wrapper that computes the length of the message and then sends the command string, saving the command on a file
--(int) sendToEngine: (NSString *)string {
+-(int) sendToEngine:(NSString *)string {
uint8_t length = [string length];
[self dumpRawData:(const uint8_t *)[string UTF8String] ofSize:length];
@@ -239,7 +236,7 @@
}
// wrapper that computes the length of the message and then sends the command string, skipping file writing
--(int) sendToEngineNoSave: (NSString *)string {
+-(int) sendToEngineNoSave:(NSString *)string {
uint8_t length = [string length];
SDLNet_TCP_Send(csd, &length, 1);
@@ -348,7 +345,7 @@
[self dumpRawData:buffer ofSize:msgSize];
sscanf((char *)buffer, "%*s %d", &eProto);
- short int netProto = 0;
+ short int netProto;
char *versionStr;
HW_versionInfo(&netProto, &versionStr);
@@ -364,11 +361,35 @@
case 'r':
DLog(@"Winning team: %s", &buffer[2]);
break;
+ case 'D':
+ DLog(@"Best Shot: %s", &buffer[2]);
+ break;
case 'k':
DLog(@"Best Hedgehog: %s", &buffer[2]);
break;
+ case 'K':
+ DLog(@"Hogs Killed: %s", &buffer[2]);
+ break;
+ case 'H':
+ //something about team health
+ break;
+ case 'T':
+ // local team stats
+ break;
+ case 'P':
+ // player postion
+ break;
+ case 's':
+ DLog(@"Most self damage: %s", &buffer[2]);
+ break;
+ case 'S':
+ DLog(@"Most friendly fire: %s", &buffer[2]);
+ break;
+ case 'B':
+ DLog(@"Most turn skipped by: %s", &buffer[2]);
+ break;
default:
- // TODO: losta stats stuff
+ DLog(@"Unhandled stat message, see statsPage.cpp");
break;
}
break;
@@ -384,7 +405,7 @@
break;
}
}
- DLog(@"Engine exited, closing server");
+ DLog(@"Engine exited, ending thread");
// wait a little to let the client close cleanly
[NSThread sleepForTimeInterval:2];
// Close the client socket
@@ -424,19 +445,19 @@
NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", height];
const char **gameArgs = (const char**) malloc(sizeof(char *) * 10);
NSInteger tmpQuality;
+ BOOL enhanced = [[self.systemSettings objectForKey:@"enhanced"] boolValue];
NSString *modelId = modelType();
- if ([modelId hasPrefix:@"iPhone1"] || // = iPhone or iPhone 3G
- [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"]) // = iPod Touch or iPod Touch 2G
- tmpQuality = 0x00000001 | 0x00000002 | 0x00000008 | 0x00000040; // rqLowRes | rqBlurryLand | rqSimpleRope | rqKillFlakes
- else if ([modelId hasPrefix:@"iPhone2"] || // = iPhone 3GS
- [modelId hasPrefix:@"iPod3"]) // = iPod Touch 3G
- tmpQuality = 0x00000002 | 0x00000040; // rqBlurryLand | rqKillFlakes
- else if ([modelId hasPrefix:@"iPad1"]) // = iPad
- tmpQuality = 0x00000002; // rqBlurryLand
- else // = everything else
- tmpQuality = 0; // full quality
- if (IS_IPAD() == NO) // = disable tooltips on phone
+ if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"]) // = iPhone and iPhone 3G or iPod Touch or iPod Touch 2G
+ tmpQuality = 0x00000001 | 0x00000002 | 0x00000008 | 0x00000040; // rqLowRes | rqBlurryLand | rqSimpleRope | rqKillFlakes
+ else if ([modelId hasPrefix:@"iPhone2"] || [modelId hasPrefix:@"iPod3"]) // = iPhone 3GS or iPod Touch 3G
+ tmpQuality = 0x00000002 | 0x00000040; // rqBlurryLand | rqKillFlakes
+ else if ([modelId hasPrefix:@"iPad1"] || enhanced == NO) // = iPad 1G or not enhanced mode
+ tmpQuality = 0x00000002; // rqBlurryLand
+ else // = everything else
+ tmpQuality = 0; // full quality
+
+ if (IS_IPAD() == NO) // = disable tooltips on phone
tmpQuality = tmpQuality | 0x00000400;
// prevents using an empty nickname
--- a/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -76,7 +76,13 @@
case 30: //alternateSwitch
[self.settingsDictionary setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"alternate"];
break;
- case 60: //getReady
+ case 70: //enhanced graphics
+ [self.settingsDictionary setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"enhanced"];
+ break;
+ case 80: //nomultitasking
+ [self.settingsDictionary setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"multitasking"];
+ break;
+ case 60: //classic menu
[self.settingsDictionary setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"menu"];
break;
default:
@@ -88,8 +94,10 @@
-(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue {
if (tagValue == 40)
[self.settingsDictionary setObject:textString forKey:@"username"];
- else
- [self.settingsDictionary setObject:textString forKey:@"password"];
+ else {
+ [self.settingsDictionary setObject:[NSNumber numberWithInt:[textString length]] forKey:@"password_length"];
+ [self.settingsDictionary setObject:[textString MD5hash] forKey:@"password"];
+ }
}
#pragma mark -
@@ -98,7 +106,7 @@
return 3;
}
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger )section {
switch (section) {
case 0: // user and pass
return 1; // set 2 here for the password field
@@ -107,10 +115,10 @@
return 2;
break;
case 2: // other stuff
- if (IS_IPAD())
- return 2;
+ if (IS_IPAD() == YES)
+ return 4;
else
- return 1;
+ return 3;
break;
default:
DLog(@"Nope");
@@ -156,7 +164,7 @@
editableCell.minimumCharacters = 0;
editableCell.delegate = self;
editableCell.textField.font = [UIFont systemFontOfSize:[UIFont systemFontSize]];
- editableCell.textField.textColor = [UIColor lightGrayColor];
+ editableCell.textField.textColor = [UIColor blackColor];
}
if (row == 0) {
@@ -166,11 +174,19 @@
editableCell.textField.secureTextEntry = NO;
editableCell.tag = 40;
} else {
+ // create a dummy password for setting some visual content for the password
+ int pwdLength = [[self.settingsDictionary objectForKey:@"password_length"] intValue];
+ char *dummyStr = (char *)malloc(sizeof(char)*pwdLength);
+ for (int i = 0; i < pwdLength; i++)
+ dummyStr[i] = i;
+ NSString *dummy = [[NSString alloc] initWithBytes:dummyStr length:pwdLength encoding:NSASCIIStringEncoding];
+ free(dummyStr);
editableCell.titleLabel.text = NSLocalizedString(@"Password","from the settings table");
editableCell.textField.placeholder = NSLocalizedString(@"Insert your password",@"");
- editableCell.textField.text = [self.settingsDictionary objectForKey:@"password"];
+ editableCell.textField.text = dummy;
editableCell.textField.secureTextEntry = YES;
editableCell.tag = 50;
+ [dummy release];
}
editableCell.accessoryView = nil;
@@ -208,16 +224,34 @@
}
switchContent = (UISwitch *)cell.accessoryView;
- if (row == 0) {
- cell.textLabel.text = NSLocalizedString(@"Alternate Damage", @"");
- cell.detailTextLabel.text = NSLocalizedString(@"Damage popups will notify you on every single hit", @"");
- switchContent.on = [[self.settingsDictionary objectForKey:@"alternate"] boolValue];
- switchContent.tag = 30;
- } else {
- cell.textLabel.text = NSLocalizedString(@"Classic Ammo Menu", @"");
- cell.detailTextLabel.text = NSLocalizedString(@"Select which style of ammo menu you prefer",@"");
- switchContent.on = [[self.settingsDictionary objectForKey:@"menu"] boolValue];
- switchContent.tag = 60;
+ switch (row) {
+ case 0:
+ cell.textLabel.text = NSLocalizedString(@"Alternate Damage", @"");
+ cell.detailTextLabel.text = NSLocalizedString(@"Damage popups will notify you on every single hit", @"");
+ switchContent.on = [[self.settingsDictionary objectForKey:@"alternate"] boolValue];
+ switchContent.tag = 30;
+ break;
+ case 1:
+ cell.textLabel.text = NSLocalizedString(@"Enanched Graphics Mode", @"");
+ cell.detailTextLabel.text = NSLocalizedString(@"The game will use more memory so it could crash!", @"");
+ switchContent.on = [[self.settingsDictionary objectForKey:@"enhanced"] boolValue];
+ switchContent.tag = 70;
+ break;
+ case 2:
+ cell.textLabel.text = NSLocalizedString(@"Multitasking Enabled", @"");
+ cell.detailTextLabel.text = NSLocalizedString(@"Disable it in case of issues when returing in game", @"");
+ switchContent.on = [[self.settingsDictionary objectForKey:@"multitasking"] boolValue];
+ switchContent.tag = 80;
+ break;
+ case 3:
+ cell.textLabel.text = NSLocalizedString(@"Classic Ammo Menu", @"");
+ cell.detailTextLabel.text = NSLocalizedString(@"Select which style of ammo menu you prefer",@"");
+ switchContent.on = [[self.settingsDictionary objectForKey:@"menu"] boolValue];
+ switchContent.tag = 60;
+ break;
+ default:
+ DLog(@"Nope");
+ break;
}
break;
default:
--- a/project_files/HedgewarsMobile/Classes/HelpPageViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/HelpPageViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -47,11 +47,6 @@
[super viewDidLoad];
}
-
--(void) scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view {
- [self.view removeFromSuperview];
-}
-
-(void) viewDidUnload {
[super viewDidUnload];
self.scrollView = nil;
--- a/project_files/HedgewarsMobile/Classes/HogButtonView.h Mon Dec 06 03:07:03 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Hedgewars-iOS, a Hedgewars port for iOS devices
- * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@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.
- *
- * File created on 20/04/2010.
- */
-
-
-#import <UIKit/UIKit.h>
-
-
-@interface HogButtonView : UIButton {
- NSInteger numberOfHogs;
- UIImage *singleHog;
- NSMutableDictionary *ownerDictionary;
-}
-
-@property (nonatomic,retain) UIImage *singleHog;
-@property (nonatomic) NSInteger numberOfHogs;
-@property (nonatomic,retain) NSMutableDictionary *ownerDictionary;
-
--(void) drawManyHogs:(NSInteger) hogs;
--(void) addOne;
-
-@end
--- a/project_files/HedgewarsMobile/Classes/HogButtonView.m Mon Dec 06 03:07:03 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Hedgewars-iOS, a Hedgewars port for iOS devices
- * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@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.
- *
- * File created on 20/04/2010.
- */
-
-
-#import "HogButtonView.h"
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-#import "PascalImports.h"
-
-@implementation HogButtonView
-@synthesize singleHog, numberOfHogs, ownerDictionary;
-
--(id) initWithFrame:(CGRect)frame {
- if ((self = [super initWithFrame:frame])) {
- self.backgroundColor = [UIColor clearColor];
-
- NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
- UIImage *normalHogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
- [normalHogFile release];
-
- self.singleHog = normalHogSprite;
- [normalHogSprite release];
- [self addTarget:self action:@selector(addOne) forControlEvents:UIControlEventTouchUpInside];
- }
- return self;
-}
-
--(void) addOne {
- playSound(@"clickSound");
- self.highlighted = NO;
- NSInteger number = self.numberOfHogs;
- number++;
- [self drawManyHogs:number];
-}
-
--(void) drawManyHogs:(NSInteger) hogs {
- if (numberOfHogs != hogs) {
- if (hogs <= HW_getMaxNumberOfHogs() && hogs >= 1)
- numberOfHogs = hogs;
- else {
- if (hogs > HW_getMaxNumberOfHogs())
- numberOfHogs = 1;
- else
- numberOfHogs = HW_getMaxNumberOfHogs();
- }
- [ownerDictionary setObject:[NSNumber numberWithInt:numberOfHogs] forKey:@"number"];
-
- UIImage *teamHogs = [[[UIImage alloc] init] autorelease];
- for (int i = 0; i < numberOfHogs; i++) {
- teamHogs = [singleHog mergeWith:teamHogs
- atPoint:CGPointMake(8, 0)
- ofSize:CGSizeMake(88, 32)];
- }
- [self setImage:teamHogs forState:UIControlStateNormal];
- }
-}
-
--(void) dealloc {
- [ownerDictionary release];
- [singleHog release];
- [super dealloc];
-}
-
-
-@end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/HoldTableViewCell.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,39 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@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.
+ *
+ * File created on 03/07/2010.
+ */
+
+
+#import <UIKit/UIKit.h>
+
+@protocol HoldTableViewCellDelegate <NSObject>
+
+-(void) holdAction:(NSString *)content;
+
+@end
+
+@interface HoldTableViewCell : UITableViewCell {
+ id<HoldTableViewCellDelegate> delegate;
+ NSTimeInterval time;
+}
+
+@property (nonatomic,assign) id<HoldTableViewCellDelegate> delegate;
+
+-(void) holdAction;
+
+@end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/HoldTableViewCell.m Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,70 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@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.
+ *
+ * File created on 03/07/2010.
+ */
+
+
+#import "HoldTableViewCell.h"
+#import "CGPointUtils.h"
+
+@implementation HoldTableViewCell
+@synthesize delegate;
+
+#define SWIPE_DRAG_HORIZ_MIN 10
+#define SWIPE_DRAG_VERT_MAX 40
+
+-(id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+ if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
+ delegate = nil;
+ }
+ return self;
+}
+
+-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
+ UITouch *touch = [[event allTouches] anyObject];
+
+ time = touch.timestamp;
+ [self performSelector:@selector(holdAction) withObject:nil afterDelay:0.25];
+
+ [super touchesBegan:touches withEvent:event];
+}
+
+-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
+ UITouch *touch = [[event allTouches] anyObject];
+
+ if ( touch.timestamp - time < 0.25 ) {
+ [NSObject cancelPreviousPerformRequestsWithTarget:self
+ selector:@selector(holdAction)
+ object:nil];
+
+ [super touchesEnded:touches withEvent:event];
+ } else
+ [super touchesCancelled:touches withEvent:event];
+}
+
+-(void) holdAction {
+ if (self.delegate != nil && [self.delegate respondsToSelector:@selector(holdAction:)])
+ [self.delegate holdAction:self.textLabel.text];
+}
+
+-(void) dealloc {
+ self.delegate = nil;
+ [super dealloc];
+}
+
+@end
--- a/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -185,7 +185,7 @@
#pragma mark -
#pragma mark actionSheet methods
-(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
- if (IS_IPAD()){
+ if (IS_IPAD() == NO){
CGRect screen = [[UIScreen mainScreen] bounds];
[UIView beginAnimations:@"table width less" context:NULL];
[UIView setAnimationDuration:0.2];
--- a/project_files/HedgewarsMobile/Classes/LevelViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/LevelViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -144,6 +144,7 @@
[self.tableView deleteSections:sections withRowAnimation:UITableViewRowAnimationFade];
level = 0;
}
+ [sections release];
DLog(@"New level is %d",level);
for (NSMutableDictionary *hog in hogs)
@@ -151,8 +152,6 @@
[self.tableView reloadData];
[[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-
- [sections release];
}
@@ -166,8 +165,10 @@
if (newRow != oldRow) {
NSMutableArray *hogs = [self.teamDictionary objectForKey:@"hedgehogs"];
+ NSInteger level = newRow + 1;
for (NSMutableDictionary *hog in hogs)
- [hog setObject:[NSNumber numberWithInt:newRow+1] forKey:@"level"];
+ [hog setObject:[NSNumber numberWithInt:level] forKey:@"level"];
+ DLog(@"New level is %d",level);
// tell our boss to write this new stuff on disk
[[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
@@ -176,7 +177,6 @@
self.lastIndexPath = indexPath;
[self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
}
- [self.navigationController popViewControllerAnimated:YES];
}
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
--- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -20,13 +20,14 @@
#import "MainMenuViewController.h"
-#import "CommodityFunctions.h"
+#import "CreationChamber.h"
#import "SDL_uikitappdelegate.h"
#import "PascalImports.h"
#import "GameConfigViewController.h"
#import "SplitViewRootController.h"
#import "AboutViewController.h"
#import "SavedGamesViewController.h"
+#import "ServerSetup.h"
@implementation MainMenuViewController
@synthesize gameConfigViewController, settingsViewController, aboutViewController, savedGamesViewController;
@@ -35,95 +36,71 @@
return rotationManager(interfaceOrientation);
}
-// using a different thread for audio 'cos it's slow
--(void) initAudioThread {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- // do somthing in the future
- [pool release];
-}
-
// check if some configuration files are already set; if they are present it means that the current copy must be updated
-(void) createNecessaryFiles {
- NSError *err = nil;
- NSString *directoryToCheck, *fileToCheck, *fileToUpdate;
- NSString *resDir = [[NSBundle mainBundle] resourcePath];
+ NSString *resourcesDir = [[NSBundle mainBundle] resourcePath];
DLog(@"Creating necessary files");
- // create an empty saves directory by deleting the previous one (saves are incompatible between releases)
+ // SAVES - just delete and overwrite
if ([[NSFileManager defaultManager] fileExistsAtPath:SAVES_DIRECTORY()])
[[NSFileManager defaultManager] removeItemAtPath:SAVES_DIRECTORY() error:NULL];
[[NSFileManager defaultManager] createDirectoryAtPath:SAVES_DIRECTORY() withIntermediateDirectories:NO attributes:nil error:NULL];
- // if the settings file is already present, we merge current preferences with the update
- fileToCheck = [NSString stringWithFormat:@"%@/Settings/settings.plist",resDir];
+ // SETTINGS FILE - merge when present
+ NSString *baseSettingsFile = [[NSString alloc] initWithFormat:@"%@/Settings/settings.plist",resourcesDir];
if ([[NSFileManager defaultManager] fileExistsAtPath:SETTINGS_FILE()]) {
NSDictionary *settings = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()];
- NSMutableDictionary *update = [[NSMutableDictionary alloc] initWithContentsOfFile:fileToCheck];
+ NSMutableDictionary *update = [[NSMutableDictionary alloc] initWithContentsOfFile:baseSettingsFile];
+ // the order of what adds what is important
[update addEntriesFromDictionary:settings];
[settings release];
[update writeToFile:SETTINGS_FILE() atomically:YES];
[update release];
} else
- [[NSFileManager defaultManager] copyItemAtPath:fileToCheck toPath:SETTINGS_FILE() error:&err];
-
- // TODO: scrap this and always copy the bundled files; update exisising ones in some way
- // if the teams are already present we merge the old teams, else we copy new teams
- directoryToCheck = [NSString stringWithFormat:@"%@/Settings/Teams",resDir];
- if ([[NSFileManager defaultManager] fileExistsAtPath:TEAMS_DIRECTORY()]) {
- for (NSString *str in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:directoryToCheck error:&err]) {
- fileToCheck = [NSString stringWithFormat:@"%@/%@",TEAMS_DIRECTORY(),str];
- fileToUpdate = [NSString stringWithFormat:@"%@/Settings/Teams/%@",resDir,str];
- if ([[NSFileManager defaultManager] fileExistsAtPath:fileToCheck]) {
- NSDictionary *team = [[NSDictionary alloc] initWithContentsOfFile:fileToCheck];
- NSMutableDictionary *update = [[NSMutableDictionary alloc] initWithContentsOfFile:fileToUpdate];
- [update addEntriesFromDictionary:team];
- [team release];
- [update writeToFile:fileToCheck atomically:YES];
- [update release];
- } else
- [[NSFileManager defaultManager] copyItemAtPath:fileToUpdate toPath:fileToCheck error:&err];
+ [[NSFileManager defaultManager] copyItemAtPath:baseSettingsFile toPath:SETTINGS_FILE() error:NULL];
+ [baseSettingsFile release];
+
+ // TEAMS - update exisiting teams with new format
+ if ([[NSFileManager defaultManager] fileExistsAtPath:TEAMS_DIRECTORY()] == NO) {
+ [[NSFileManager defaultManager] createDirectoryAtPath:TEAMS_DIRECTORY()
+ withIntermediateDirectories:YES
+ attributes:nil
+ error:NULL];
+ // we copy teams only the first time because it's unlikely that newer ones are going to be added
+ NSString *baseTeamsDir = [[NSString alloc] initWithFormat:@"%@/Settings/Teams/",resourcesDir];
+ for (NSString *str in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:baseTeamsDir error:NULL]) {
+ NSString *sourceFile = [baseTeamsDir stringByAppendingString:str];
+ NSString *destinationFile = [TEAMS_DIRECTORY() stringByAppendingString:str];
+ [[NSFileManager defaultManager] removeItemAtPath:destinationFile error:NULL];
+ [[NSFileManager defaultManager] copyItemAtPath:sourceFile toPath:destinationFile error:NULL];
}
- } else
- [[NSFileManager defaultManager] copyItemAtPath:directoryToCheck toPath:TEAMS_DIRECTORY() error:&err];
+ [baseTeamsDir release];
+ }
+ // merge not needed as format rarely changes
+
+ // SCHEMES - always overwrite and delete custom ones
+ if ([[NSFileManager defaultManager] fileExistsAtPath:SCHEMES_DIRECTORY()] == YES)
+ [[NSFileManager defaultManager] removeItemAtPath:SCHEMES_DIRECTORY() error:NULL];
+ NSString *baseSchemesDir = [[NSString alloc] initWithFormat:@"%@/Settings/Schemes/",resourcesDir];
+ [[NSFileManager defaultManager] copyItemAtPath:baseSchemesDir toPath:SCHEMES_DIRECTORY() error:NULL];
- // TODO: scrap this and always copy the bundled files; update exisising ones in some way
- // the same holds for schemes (but they're dictionaries containing arrays)
- directoryToCheck = [NSString stringWithFormat:@"%@/Settings/Schemes",resDir];
- if ([[NSFileManager defaultManager] fileExistsAtPath:SCHEMES_DIRECTORY()]) {
- for (NSString *str in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:directoryToCheck error:nil]) {
- fileToCheck = [NSString stringWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),str];
- fileToUpdate = [NSString stringWithFormat:@"%@/Settings/Schemes/%@",resDir,str];
- if ([[NSFileManager defaultManager] fileExistsAtPath:fileToCheck]) {
- NSDictionary *scheme = [[NSDictionary alloc] initWithContentsOfFile:fileToCheck];
- NSDictionary *update = [[NSDictionary alloc] initWithContentsOfFile:fileToUpdate];
- if ([[update objectForKey:@"basic"] count] > [[scheme objectForKey:@"basic"] count] ||
- [[update objectForKey:@"gamemod"] count] > [[scheme objectForKey:@"gamemod"] count])
- [update writeToFile:fileToCheck atomically:YES];
- [update release];
- [scheme release];
- } else
- [[NSFileManager defaultManager] copyItemAtPath:fileToUpdate toPath:fileToCheck error:&err];
- }
- } else
- [[NSFileManager defaultManager] copyItemAtPath:directoryToCheck toPath:SCHEMES_DIRECTORY() error:&err];
-
- // weapons are autoupdated at runtime but it's better to update then every new version
+
+ // WEAPONS - always overwrite
if ([[NSFileManager defaultManager] fileExistsAtPath:WEAPONS_DIRECTORY()] == NO)
[[NSFileManager defaultManager] createDirectoryAtPath:WEAPONS_DIRECTORY()
withIntermediateDirectories:YES
attributes:nil
- error:&err];
+ error:NULL];
createWeaponNamed(@"Default", 0);
createWeaponNamed(@"Crazy", 1);
- createWeaponNamed(@"Pro mode", 2);
+ createWeaponNamed(@"Pro Mode", 2);
createWeaponNamed(@"Shoppa", 3);
- createWeaponNamed(@"Clean slate", 4);
+ createWeaponNamed(@"Clean Slate", 4);
createWeaponNamed(@"Minefield", 5);
+ createWeaponNamed(@"Thinking with Portals", 6);
+ // merge not needed because weapons not present in the set are 0ed by GameSetup
- if (err != nil)
- DLog(@"%@", err);
- else
- DLog(@"Success");
+ DLog(@"Success");
}
#pragma mark -
@@ -148,6 +125,15 @@
[userDefaults synchronize];
[self createNecessaryFiles];
}
+
+ ServerSetup *setup = [[ServerSetup alloc] init];
+ if ([setup isNetworkReachable]) {
+ DLog(@"network is reachable");
+ [NSThread detachNewThreadSelector:@selector(serverProtocol)
+ toTarget:setup
+ withObject:nil];
+ }
+ [setup release];
}
@@ -204,11 +190,11 @@
if (nil == self.aboutViewController) {
AboutViewController *about = [[AboutViewController alloc] initWithNibName:@"AboutViewController" bundle:nil];
about.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
- about.modalPresentationStyle = UIModalPresentationFormSheet;
+ if ([about respondsToSelector:@selector(setModalPresentationStyle:)])
+ about.modalPresentationStyle = UIModalPresentationFormSheet;
self.aboutViewController = about;
[about release];
}
-
[self presentModalViewController:self.aboutViewController animated:YES];
#endif
break;
@@ -216,7 +202,8 @@
if (nil == self.savedGamesViewController) {
SavedGamesViewController *savedgames = [[SavedGamesViewController alloc] initWithNibName:@"SavedGamesViewController" bundle:nil];
savedgames.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
- savedgames.modalPresentationStyle = UIModalPresentationPageSheet;
+ if ([savedgames respondsToSelector:@selector(setModalPresentationStyle:)])
+ savedgames.modalPresentationStyle = UIModalPresentationPageSheet;
self.savedGamesViewController = savedgames;
[savedgames release];
}
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.h Sun Dec 19 13:31:55 2010 -0500
@@ -22,10 +22,13 @@
#import <UIKit/UIKit.h>
#import "MapPreviewButtonView.h"
+@class SchemeWeaponConfigViewController;
+@class GameConfigViewController;
+
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, MapPreviewViewDelegate> {
- NSInteger oldValue; //slider
- NSInteger oldPage; //segmented control
- BOOL busy;
+ NSInteger oldValue; // for the slider
+ NSInteger oldPage; // for the segmented control
+ BOOL busy; // for the preview button
// objects read (mostly) by parent view
NSInteger maxHogs;
@@ -48,6 +51,10 @@
// internal objects
NSIndexPath *lastIndexPath;
NSArray *dataSourceArray;
+
+ // controller for mission state
+ SchemeWeaponConfigViewController *externalController;
+ GameConfigViewController *parentController;
}
@@ -71,6 +78,10 @@
@property (nonatomic,retain) NSIndexPath *lastIndexPath;
@property (nonatomic,retain) NSArray *dataSourceArray;
+@property (nonatomic,assign) SchemeWeaponConfigViewController *externalController;
+@property (nonatomic,assign) GameConfigViewController *parentController;
+
+
-(IBAction) buttonPressed:(id) sender;
-(IBAction) mapButtonPressed;
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -23,13 +23,16 @@
#import "PascalImports.h"
#import "CommodityFunctions.h"
#import "UIImageExtra.h"
+#import "SchemeWeaponConfigViewController.h"
+#import "GameConfigViewController.h"
#define scIndex self.segmentedControl.selectedSegmentIndex
#define isRandomness() (segmentedControl.selectedSegmentIndex == 0 || segmentedControl.selectedSegmentIndex == 2)
@implementation MapConfigViewController
@synthesize previewButton, maxHogs, seedCommand, templateFilterCommand, mapGenCommand, mazeSizeCommand, themeCommand, staticMapCommand,
- missionCommand, tableView, maxLabel, sizeLabel, segmentedControl, slider, lastIndexPath, dataSourceArray, busy;
+ missionCommand, tableView, maxLabel, sizeLabel, segmentedControl, slider, lastIndexPath, dataSourceArray, busy,
+ externalController, parentController;
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@@ -72,7 +75,7 @@
// perform as if user clicked on an entry
[self tableView:self.tableView didSelectRowAtIndexPath:theIndex];
if (IS_NOT_POWERFUL() == NO)
- [self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionNone animated:YES];
+ [self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
}
-(void) turnOffWidgets {
@@ -136,6 +139,7 @@
cell.textLabel.adjustsFontSizeToFitWidth = YES;
cell.textLabel.minimumFontSize = 7;
cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT;
+ cell.textLabel.backgroundColor = [UIColor clearColor];
if (isRandomness()) {
UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/icon.png",THEMES_DIRECTORY(),labelString]];
@@ -151,7 +155,7 @@
} else
cell.accessoryView = nil;
- cell.backgroundColor = [UIColor blackColor];
+ cell.backgroundColor = UICOLOR_HW_ALMOSTBLACK;
return cell;
}
@@ -320,16 +324,17 @@
mission = @"";
[self sliderChanged:nil];
self.slider.enabled = YES;
+ [externalController fillSections];
break;
case 1: // Map
- case 3: // Mission
mapgen = @"e$mapgen 0";
// dummy values, these are set by -updatePreview -> -didSelectRowAtIndexPath -> -setDetailsForStaticMap
staticmap = @"map Bamboo";
mission = @"";
self.slider.enabled = NO;
self.sizeLabel.text = NSLocalizedString(@"No filter",@"");
+ [externalController fillSections];
break;
case 2: // Maze
@@ -338,6 +343,17 @@
mission = @"";
[self sliderChanged:nil];
self.slider.enabled = YES;
+ [externalController fillSections];
+ break;
+
+ case 3: // Mission
+ mapgen = @"e$mapgen 0";
+ // dummy values, these are set by -updatePreview -> -didSelectRowAtIndexPath -> -setDetailsForStaticMap
+ staticmap = @"map Bamboo";
+ mission = @"";
+ self.slider.enabled = NO;
+ self.sizeLabel.text = NSLocalizedString(@"No filter",@"");
+ [externalController emptySections];
break;
default:
@@ -350,28 +366,13 @@
self.staticMapCommand = staticmap;
self.missionCommand = mission;
- // nice animation for updating the table when appropriate (on iphone)
- /*
- if (IS_IPAD() == NO)
- if (((oldPage == 0 || oldPage == 2) && (newPage == 1 || newPage == 3)) ||
- ((oldPage == 1 || oldPage == 3) && (newPage == 0 || newPage == 2)) ||
- ((oldPage == 1 && newPage == 3) || (oldPage == 3 || newPage == 1))) {
- self.tableView.frame = CGRectMake(480, 0, 185, 276);
- [UIView beginAnimations:@"moving in table" context:NULL];
- self.tableView.frame = CGRectMake(295, 0, 185, 276);
- [UIView commitAnimations];
- }
- */
-
[self.tableView reloadData];
[self updatePreview];
oldPage = newPage;
}
-(IBAction) buttonPressed:(id) sender {
- [[NSNotificationCenter defaultCenter] postNotificationName:@"buttonPressed"
- object:nil
- userInfo:[NSDictionary dictionaryWithObject:sender forKey:@"sender"]];
+ [self.parentController buttonPressed:sender];
}
#pragma mark -
@@ -385,13 +386,36 @@
[string release];
// remove a trailing "" element
[themeArray removeLastObject];
- NSArray *mapArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL];
- NSArray *missionArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MISSIONS_DIRECTORY() error:NULL];
+
+ // remove images that are too big for certain devices without loading the whole image
+ NSArray *mapArrayFull = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL];
+ NSMutableArray *mapArray = [[NSMutableArray alloc] init];
+ for (NSString *str in mapArrayFull) {
+ CGSize imgSize = PSPNGSizeFromMetaData([MAPS_DIRECTORY() stringByAppendingFormat:@"%@/map.png",str]);
+ if (IS_NOT_POWERFUL() && imgSize.height > 1024.0f)
+ continue;
+ if (IS_NOT_VERY_POWERFUL() && imgSize.height > 1280.0f)
+ continue;
+ [mapArray addObject:str];
+ }
+ NSArray *missionArrayFull = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MISSIONS_DIRECTORY() error:NULL];
+ NSMutableArray *missionArray = [[NSMutableArray alloc] init];
+ for (NSString *str in missionArrayFull) {
+ CGSize imgSize = PSPNGSizeFromMetaData([MISSIONS_DIRECTORY() stringByAppendingFormat:@"%@/map.png",str]);
+ if (IS_NOT_POWERFUL() && imgSize.height > 1024.0f)
+ continue;
+ if (IS_NOT_VERY_POWERFUL() && imgSize.height > 1280.0f)
+ continue;
+ [missionArray addObject:str];
+ }
NSArray *array = [[NSArray alloc] initWithObjects:themeArray,mapArray,themeArray,missionArray,nil];
+ [missionArray release];
+ [themeArray release];
+ [mapArray release];
+
self.dataSourceArray = array;
[array release];
- [themeArray release];
}
-(void) viewDidLoad {
@@ -426,7 +450,7 @@
if ([self.tableView respondsToSelector:@selector(setBackgroundView:)])
[self.tableView setBackgroundView:nil];
- self.view.backgroundColor = [UIColor clearColor];
+ self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.separatorColor = UICOLOR_HW_YELLOW_BODER;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
@@ -468,16 +492,16 @@
-(void) didReceiveMemoryWarning {
self.dataSourceArray = nil;
+ [super didReceiveMemoryWarning];
- self.previewButton = nil;
- self.tableView = nil;
- self.maxLabel = nil;
- self.sizeLabel = nil;
- self.segmentedControl = nil;
- self.slider = nil;
+ if (self.view.superview == nil) {
+ self.tableView = nil;
+ self.maxLabel = nil;
+ self.sizeLabel = nil;
+ self.slider = nil;
+ }
MSG_MEMCLEAN();
- [super didReceiveMemoryWarning];
}
-(void) dealloc {
--- a/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m Sun Dec 19 13:31:55 2010 -0500
@@ -53,11 +53,12 @@
#pragma mark -
#pragma mark image wrappers
-(void) setBackgroundImageRounded:(UIImage *)image forState:(UIControlState)state {
- [self setBackgroundImage:[image makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal];
+ // TODO:http://stackoverflow.com/questions/4272476/setbackgroundimage-behaviour-changed-on-ipad-4-2
+ [self setBackgroundImage:[image makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:state];
}
-(void) setImageRounded:(UIImage *)image forState:(UIControlState)state {
- [self setImage:[image makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal];
+ [self setImage:[image makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:state];
}
-(void) setImageRoundedForNormalState:(UIImage *)image {
--- a/project_files/HedgewarsMobile/Classes/ObjcExports.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/ObjcExports.h Sun Dec 19 13:31:55 2010 -0500
@@ -25,8 +25,12 @@
#define REPLAYBLACKVIEW_TAG 9955
#define ACTIVITYINDICATOR_TAG 987654
+@class AmmoMenuViewController;
+
void objcExportsInit();
BOOL isGameRunning();
void setGameRunning(BOOL value);
NSInteger cachedGrenadeTime();
+void clearView();
void setGrenadeTime(NSInteger value);
+void setAmmoMenuInstance(AmmoMenuViewController *instance);
--- a/project_files/HedgewarsMobile/Classes/ObjcExports.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/ObjcExports.m Sun Dec 19 13:31:55 2010 -0500
@@ -20,6 +20,8 @@
#import "ObjcExports.h"
+#import "AmmoMenuViewController.h"
+#import "AudioToolbox/AudioToolbox.h"
#pragma mark -
#pragma mark internal variables
@@ -29,6 +31,10 @@
BOOL savedGame;
// cache the grenade time
NSInteger grenadeTime;
+// the reference to the newMenu instance
+AmmoMenuViewController *amvc_instance;
+// the audiosession must be initialized before using properties
+BOOL gAudioSessionInited = NO;
#pragma mark -
#pragma mark functions called like oop
@@ -54,6 +60,10 @@
grenadeTime = value;
}
+void inline setAmmoMenuInstance(AmmoMenuViewController *instance) {
+ amvc_instance = instance;
+}
+
#pragma mark -
#pragma mark functions called by pascal code
void startSpinning() {
@@ -86,6 +96,7 @@
}
void clearView() {
+ // don't use any engine calls here as this function is called every time the ammomenu is opened
UIWindow *theWindow = (IS_DUALHEAD()) ? [SDLUIKitDelegate sharedAppDelegate].uiwindow : [[UIApplication sharedApplication] keyWindow];
UIButton *theButton = (UIButton *)[theWindow viewWithTag:CONFIRMATION_TAG];
UISegmentedControl *theSegment = (UISegmentedControl *)[theWindow viewWithTag:GRENADE_TAG];
@@ -141,5 +152,41 @@
}
void updateVisualsNewTurn(void) {
- [[NSNotificationCenter defaultCenter] postNotificationName:@"updateAmmoVisuals" object:nil];
+ DLog(@"updating visuals");
+ [amvc_instance updateAmmoVisuals];
}
+
+/*
+// http://stackoverflow.com/questions/287543/how-to-programatically-sense-the-iphone-mute-switch
+BOOL isAppleDeviceMuted(void) {
+ if (!gAudioSessionInited) {
+ AudioSessionInterruptionListener inInterruptionListener = NULL;
+ OSStatus error;
+ if ((error = AudioSessionInitialize(NULL, NULL, inInterruptionListener, NULL)))
+ DLog(@"*** Error *** error in AudioSessionInitialize: %d", error);
+ else
+ gAudioSessionInited = YES;
+ }
+ UInt32 propertySize = sizeof(CFStringRef);
+ BOOL muteResult = NO;
+
+ // this checks if there is volume
+ Float32 volume;
+ OSStatus n = AudioSessionGetProperty(kAudioSessionProperty_CurrentHardwareOutputVolume, &propertySize, &volume);
+ if (n != 0)
+ DLog( @"AudioSessionGetProperty 'volume': %d", n );
+ BOOL volumeResult = (volume == 0.0f);
+
+ // this checks if the device is muted
+ CFStringRef state;
+ n = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &propertySize, &state);
+ if (n != 0)
+ DLog( @"AudioSessionGetProperty 'audioRoute': %d", n );
+ else {
+ NSString *result = (NSString *)state;
+ muteResult = ([result length] == 0);
+ releaseAndNil(result);
+ }
+ return volumeResult || muteResult;
+}
+*/
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.h Sun Dec 19 13:31:55 2010 -0500
@@ -51,6 +51,10 @@
// stuff initialized externally
BOOL isNetGame;
BOOL useClassicMenu;
+ NSInteger initialOrientation;
+
+ // the containing window
+ UIWindow *containerWindow;
// dual head support
NSInteger initialScreenCount;
@@ -63,6 +67,8 @@
@property (nonatomic,retain) AmmoMenuViewController *amvc;
@property (assign) BOOL isNetGame;
@property (assign) BOOL useClassicMenu;
+@property (assign) NSInteger initialOrientation;
+@property (assign) UIWindow *containerWindow;
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -38,19 +38,25 @@
#define removeConfirmationInput() [[self.view viewWithTag:CONFIRMATION_TAG] removeFromSuperview];
@implementation OverlayViewController
-@synthesize popoverController, popupMenu, helpPage, amvc, isNetGame, useClassicMenu;
+@synthesize popoverController, popupMenu, helpPage, amvc, isNetGame, useClassicMenu, initialOrientation, containerWindow;
#pragma mark -
#pragma mark rotation
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+ // don't rotate until the game is running for performance and synchronization with the sdlview
+ if (isGameRunning() == NO)
+ return (interfaceOrientation == (UIInterfaceOrientation) self.initialOrientation);
return rotationManager(interfaceOrientation);
}
// pause the game and remove objc menus so that animation is smoother
-(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation) toInterfaceOrientation duration:(NSTimeInterval) duration{
+ if (isGameRunning() == NO)
+ return;
+
+ HW_pause();
[self dismissPopover];
- if (HW_isPaused() == NO)
- HW_pause();
+
if (self.amvc.isVisible && IS_DUALHEAD() == NO) {
[self.amvc disappear];
wasVisible = YES;
@@ -75,16 +81,21 @@
// now restore previous state
-(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation) fromInterfaceOrientation {
+ if (isGameRunning() == NO)
+ return;
+
if (wasVisible || IS_DUALHEAD())
[self.amvc appearInView:self.view];
- if (HW_isPaused() == YES)
- HW_pause();
+ HW_pauseToggle();
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
}
// while in dual head the above rotation functions are not called
-(void) dualHeadRotation:(NSNotification *)notification {
+ if (isGameRunning() == NO)
+ return;
+
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
[UIView beginAnimations:@"rotation" context:NULL];
@@ -191,6 +202,8 @@
name:UIScreenDidDisconnectNotification
object:nil];
}
+
+ self.containerWindow = [[UIApplication sharedApplication] keyWindow];
// present the overlay
[UIView beginAnimations:@"showing overlay" context:NULL];
@@ -208,8 +221,7 @@
otherButtonTitles:nil];
[alert show];
[alert release];
- if (HW_isPaused() == NO)
- HW_pause();
+ HW_pause();
}
}
@@ -383,6 +395,7 @@
break;
case 10:
playSound(@"clickSound");
+ clearView();
HW_pause();
if (self.amvc.isVisible && IS_DUALHEAD() == NO) {
doDim();
@@ -393,12 +406,13 @@
break;
case 11:
playSound(@"clickSound");
+ clearView();
removeConfirmationInput();
if (IS_DUALHEAD() || self.useClassicMenu == NO) {
if (self.amvc == nil)
self.amvc = [[AmmoMenuViewController alloc] init];
-
+ setAmmoMenuInstance(amvc);
if (self.amvc.isVisible) {
doDim();
[self.amvc disappear];
@@ -409,6 +423,7 @@
}
}
} else {
+ setAmmoMenuInstance(nil);
HW_ammoMenu();
}
break;
@@ -480,7 +495,7 @@
if (YES == isPopoverVisible) {
isPopoverVisible = NO;
if (HW_isPaused())
- HW_pause();
+ HW_pauseToggle();
if (IS_IPAD()) {
[(InGameMenuViewController *)[[self popoverController] contentViewController] removeChat];
@@ -494,11 +509,25 @@
#pragma mark -
#pragma mark Custom touch event handling
+-(BOOL) shouldIgnoreTouch:(NSSet *)allTouches {
+ if (isGameRunning() == NO)
+ return YES;
+
+ // ignore activity near the dpad and buttons
+ CGPoint touchPoint = [[[allTouches allObjects] objectAtIndex:0] locationInView:self.view];
+ CGSize screen = [[UIScreen mainScreen] bounds].size;
+
+ if ((touchPoint.x < 160 && touchPoint.y > screen.width - 155 ) ||
+ (touchPoint.x > screen.height - 135 && touchPoint.y > screen.width - 140))
+ return YES;
+ return NO;
+}
+
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
NSSet *allTouches = [event allTouches];
UITouch *first, *second;
- if (isGameRunning() == NO)
+ if ([self shouldIgnoreTouch:allTouches] == YES)
return;
// hide in-game menu
@@ -537,9 +566,9 @@
NSSet *allTouches = [event allTouches];
CGPoint currentPosition = [[[allTouches allObjects] objectAtIndex:0] locationInView:self.view];
- if (isGameRunning() == NO)
+ if ([self shouldIgnoreTouch:allTouches] == YES)
return;
-
+
switch ([allTouches count]) {
case 1:
// if we're in the menu we just click in the point
@@ -629,9 +658,9 @@
int x, y, dx, dy;
UITouch *touch, *first, *second;
- if (isGameRunning() == NO)
+ if ([self shouldIgnoreTouch:allTouches] == YES)
return;
-
+
switch ([allTouches count]) {
case 1:
touch = [[allTouches allObjects] objectAtIndex:0];
--- a/project_files/HedgewarsMobile/Classes/PascalImports.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/PascalImports.h Sun Dec 19 13:31:55 2010 -0500
@@ -63,16 +63,20 @@
void HW_chat(void);
void HW_chatEnd(void);
void HW_tab(void);
+
void HW_pause(void);
+ void HW_pauseToggle(void);
+ BOOL HW_isPaused(void);
void HW_terminate(BOOL andCloseFrontend);
+ void HW_suspend(void);
+ void HW_resume(void);
void HW_setCursor(int x, int y);
void HW_getCursor(int *x, int *y);
BOOL HW_isAmmoMenuOpen(void);
BOOL HW_isAmmoMenuNotAllowed(void);
- BOOL HW_isPaused(void);
BOOL HW_isWeaponRequiringClick(void);
BOOL HW_isWeaponTimerable(void);
BOOL HW_isWeaponSwitch(void);
--- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.h Sun Dec 19 13:31:55 2010 -0500
@@ -23,9 +23,11 @@
#import <UIKit/UIKit.h>
@class MainMenuViewController;
+@class OverlayViewController;
@interface SDLUIKitDelegate:NSObject<UIApplicationDelegate> {
MainMenuViewController *mainViewController;
+ OverlayViewController *overlayController;
UIWindow *uiwindow;
UIWindow *secondWindow;
BOOL isInGame;
@@ -33,6 +35,7 @@
@property (assign) BOOL isInGame;
@property (nonatomic,retain) MainMenuViewController *mainViewController;
+@property (nonatomic,retain) OverlayViewController *overlayController;
@property (nonatomic,retain) UIWindow *uiwindow;
@property (nonatomic,retain) UIWindow *secondWindow;
--- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m Sun Dec 19 13:31:55 2010 -0500
@@ -24,15 +24,17 @@
#import "SDL_uikitopenglview.h"
#import "SDL_uikitwindow.h"
#import "SDL_events_c.h"
-#import "../SDL_sysvideo.h"
#import "jumphack.h"
#import "SDL_video.h"
#import "SDL_mixer.h"
#import "PascalImports.h"
+#import "ObjcExports.h"
#import "CommodityFunctions.h"
#import "GameSetup.h"
#import "MainMenuViewController.h"
#import "OverlayViewController.h"
+#import "Appirater.h"
+#include <unistd.h>
#ifdef main
#undef main
@@ -40,16 +42,15 @@
#define BLACKVIEW_TAG 17935
#define SECONDBLACKVIEW_TAG 48620
-#define VALGRIND "/opt/valgrind/bin/valgrind"
+#define VALGRIND "/opt/fink/bin/valgrind"
int main (int argc, char *argv[]) {
#ifdef VALGRIND_REXEC
// Using the valgrind build config, rexec ourself in valgrind
// from http://landonf.bikemonkey.org/code/iphone/iPhone_Simulator_Valgrind.20081224.html
if (argc < 2 || (argc >= 2 && strcmp(argv[1], "-valgrind") != 0))
- execl(VALGRIND, VALGRIND, "--leak-check=full", argv[0], "-valgrind", NULL);
+ execl(VALGRIND, VALGRIND, "--leak-check=full", "--dsymutil=yes", argv[0], "-valgrind", NULL);
#endif
-
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"SDLUIKitDelegate");
[pool release];
@@ -57,7 +58,7 @@
}
@implementation SDLUIKitDelegate
-@synthesize mainViewController, uiwindow, secondWindow, isInGame;
+@synthesize mainViewController, overlayController, uiwindow, secondWindow, isInGame;
// convenience method
+(SDLUIKitDelegate *)sharedAppDelegate {
@@ -77,6 +78,7 @@
-(void) dealloc {
[mainViewController release];
+ [overlayController release];
[uiwindow release];
[secondWindow release];
[super dealloc];
@@ -119,15 +121,21 @@
// pull out useful configuration info from various files
GameSetup *setup = [[GameSetup alloc] initWithDictionary:gameDictionary];
NSNumber *isNetGameNum = [gameDictionary objectForKey:@"netgame"];
-
- if ([isNetGameNum boolValue] == NO)
- [setup startThread:@"engineProtocol"];
+
+ [NSThread detachNewThreadSelector:@selector(engineProtocol)
+ toTarget:setup
+ withObject:nil];
+
const char **gameArgs = [setup getSettings:[gameDictionary objectForKey:@"savefile"]];
NSNumber *menuStyle = [NSNumber numberWithBool:setup.menuStyle];
[setup release];
// since the sdlwindow is not yet created, we add the overlayController with a delay
- NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:isNetGameNum,@"net",menuStyle,@"menu",nil];
+ NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
+ isNetGameNum,@"net",
+ menuStyle,@"menu",
+ [[gameDictionary objectForKey:@"game_dictionary"] objectForKey:@"orientation"],@"orientation",
+ nil];
[self performSelector:@selector(displayOverlayLater:) withObject:dict afterDelay:1];
// this is the pascal fuction that starts the game (wrapped around isInGame)
@@ -153,23 +161,21 @@
// overlay with controls, become visible later, with a transparency effect
-(void) displayOverlayLater:(id) object {
NSDictionary *dict = (NSDictionary *)object;
- OverlayViewController *overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
- overlayController.isNetGame = [[dict objectForKey:@"net"] boolValue];
- overlayController.useClassicMenu = [[dict objectForKey:@"menu"] boolValue];
+ self.overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
+ self.overlayController.isNetGame = [[dict objectForKey:@"net"] boolValue];
+ self.overlayController.useClassicMenu = [[dict objectForKey:@"menu"] boolValue];
+ self.overlayController.initialOrientation = [[dict objectForKey:@"orientation"] intValue];
UIWindow *gameWindow;
if (IS_DUALHEAD())
gameWindow = self.uiwindow;
else
gameWindow = [[UIApplication sharedApplication] keyWindow];
- [gameWindow addSubview:overlayController.view];
- //[[[gameWindow subviews] objectAtIndex:0] addSubview:overlayController.view];
- // don't release a controller according to http://developer.apple.com/library/ios/#qa/qa2010/qa1688.html
- //[overlayController release];
+ [gameWindow addSubview:self.overlayController.view];
}
// override the direct execution of SDL_main to allow us to implement the frontend (or even using a nib)
--(void) applicationDidFinishLaunching:(UIApplication *)application {
+-(BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[application setStatusBarHidden:YES];
self.uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
@@ -200,6 +206,9 @@
[titleView release];
[self.secondWindow makeKeyAndVisible];
}
+
+ [Appirater appLaunched];
+ return YES;
}
-(void) applicationWillTerminate:(UIApplication *)application {
@@ -219,40 +228,35 @@
}
-(void) applicationWillResignActive:(UIApplication *)application {
- if (self.isInGame) {
- HW_pause();
-
- // Send every window on every screen a MINIMIZED event.
- SDL_VideoDevice *_this = SDL_GetVideoDevice();
- if (!_this)
- return;
-
- int i;
- for (i = 0; i < _this->num_displays; i++) {
- const SDL_VideoDisplay *display = &_this->displays[i];
- SDL_Window *window;
- for (window = display->windows; window != nil; window = window->next)
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
+ UIDevice* device = [UIDevice currentDevice];
+ if ([device respondsToSelector:@selector(isMultitaskingSupported)] &&
+ device.multitaskingSupported &&
+ self.isInGame) {
+ // let's try to be permissive with multitasking here...
+ NSDictionary *settings = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()];
+ if ([[settings objectForKey:@"multitasking"] boolValue])
+ HW_suspend();
+ else {
+ // so the game returns to the configuration view
+ if (isGameRunning())
+ HW_terminate(NO);
+ else {
+ // while screen is loading you can't call HW_terminate() so we close the app
+ SDL_SendQuit();
+ HW_terminate(YES);
+ longjmp(*(jump_env()), 1);
+ }
}
+ [settings release];
}
}
-(void) applicationDidBecomeActive:(UIApplication *)application {
- if (self.isInGame) {
- HW_pause();
-
- // Send every window on every screen a RESTORED event.
- SDL_VideoDevice *_this = SDL_GetVideoDevice();
- if (!_this)
- return;
-
- int i;
- for (i = 0; i < _this->num_displays; i++) {
- const SDL_VideoDisplay *display = &_this->displays[i];
- SDL_Window *window;
- for (window = display->windows; window != nil; window = window->next)
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0);
- }
+ UIDevice* device = [UIDevice currentDevice];
+ if ([device respondsToSelector:@selector(isMultitaskingSupported)] &&
+ device.multitaskingSupported &&
+ self.isInGame) {
+ HW_resume();
}
}
--- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -111,7 +111,11 @@
cancelButtonTitle:cancelStr
destructiveButtonTitle:confirmStr
otherButtonTitles:nil];
- [actionSheet showInView:self.view];
+
+ if (IS_IPAD())
+ [actionSheet showFromBarButtonItem:(UIBarButtonItem *)sender animated:YES];
+ else
+ [actionSheet showInView:self.view];
[actionSheet release];
}
@@ -170,7 +174,7 @@
label.font = [UIFont systemFontOfSize:16];
label.textColor = [UIColor lightGrayColor];
label.numberOfLines = 5;
- label.text = NSLocalizedString(@"Games are automatically saved and can be resumed by selecting an entry above.\nYou can modify this list by pressing the 'Edit' button.\nNotice that completed games are deleted, so make backups.",@"");
+ label.text = NSLocalizedString(@"Games are automatically saved and can be resumed by selecting an entry above.\nYou can modify this list by pressing the 'Edit' button.\nCompleted games are removed at the end of the match.",@"");
label.backgroundColor = [UIColor clearColor];
[footer addSubview:label];
--- a/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -20,7 +20,7 @@
#import "SchemeSettingsViewController.h"
-#import "CommodityFunctions.h"
+#import "CreationChamber.h"
#import "SingleSchemeViewController.h"
@implementation SchemeSettingsViewController
@@ -81,12 +81,14 @@
createSchemeNamed([fileName stringByDeletingPathExtension]);
[self.listOfSchemes addObject:fileName];
- [fileName release];
// order the array alphabetically, so schemes will keep their position
[self.listOfSchemes sortUsingSelector:@selector(compare:)];
+ [self.tableView reloadData];
- [self.tableView reloadData];
+ NSInteger index = [self.listOfSchemes indexOfObject:fileName];
+ [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
+ [fileName release];
}
#pragma mark -
--- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.h Sun Dec 19 13:31:55 2010 -0500
@@ -31,13 +31,20 @@
NSString *selectedScheme;
NSString *selectedWeapon;
+
+ UISwitch *syncSwitch;
+ BOOL hideSections;
}
-@property (nonatomic, retain) NSArray *listOfSchemes;
-@property (nonatomic, retain) NSArray *listOfWeapons;
+@property (nonatomic,retain) NSArray *listOfSchemes;
+@property (nonatomic,retain) NSArray *listOfWeapons;
@property (nonatomic,retain) NSIndexPath *lastIndexPath_sc;
@property (nonatomic,retain) NSIndexPath *lastIndexPath_we;
@property (nonatomic,retain) NSString *selectedScheme;
@property (nonatomic,retain) NSString *selectedWeapon;
+@property (nonatomic,retain) UISwitch *syncSwitch;
+
+-(void) fillSections;
+-(void) emptySections;
@end
--- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -23,8 +23,10 @@
#import "CommodityFunctions.h"
#import "SDL_uikitappdelegate.h"
+#define LABEL_TAG 57423
+
@implementation SchemeWeaponConfigViewController
-@synthesize listOfSchemes, listOfWeapons, lastIndexPath_sc, lastIndexPath_we, selectedScheme, selectedWeapon;
+@synthesize listOfSchemes, listOfWeapons, lastIndexPath_sc, lastIndexPath_we, selectedScheme, selectedWeapon, syncSwitch;
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return rotationManager(interfaceOrientation);
@@ -45,7 +47,7 @@
if (IS_IPAD())
[self.tableView setBackgroundView:nil];
else {
- UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"backgroundCenter.png"];
+ UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"background~iphone.png"];
UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage];
[backgroundImage release];
[self.tableView setBackgroundView:background];
@@ -81,27 +83,33 @@
#pragma mark -
#pragma mark Table view data source
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
- return 2;
+ if (hideSections)
+ return 0;
+ else
+ return 3;
}
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0)
return [self.listOfSchemes count];
+ else if (section == 1)
+ return [self.listOfWeapons count];
else
- return [self.listOfWeapons count];
+ return 1;
}
// Customize the appearance of table view cells.
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
NSInteger row = [indexPath row];
+ NSInteger section = [indexPath section];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
cell.accessoryView = nil;
- if ([indexPath section] == 0) {
+ if (0 == section) {
cell.textLabel.text = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension];
NSString *str = [NSString stringWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),[self.listOfSchemes objectAtIndex:row]];
NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:str];
@@ -113,7 +121,7 @@
[checkbox release];
self.lastIndexPath_sc = indexPath;
}
- } else {
+ } else if (1 == section) {
cell.textLabel.text = [[self.listOfWeapons objectAtIndex:row] stringByDeletingPathExtension];
NSString *str = [NSString stringWithFormat:@"%@/%@",WEAPONS_DIRECTORY(),[self.listOfWeapons objectAtIndex:row]];
NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:str];
@@ -125,9 +133,20 @@
[checkbox release];
self.lastIndexPath_we = indexPath;
}
+ } else {
+ if (self.syncSwitch == nil) {
+ UISwitch *theSwitch = [[UISwitch alloc] init];
+ [theSwitch setOn:YES];
+ self.syncSwitch = theSwitch;
+ [theSwitch release];
+ }
+ cell.textLabel.text = IS_IPAD() ? NSLocalizedString(@"Sync Schemes",@"") : NSLocalizedString(@"Sync Schemes and Weapons",@"");
+ cell.detailTextLabel.text = IS_IPAD() ? nil : NSLocalizedString(@"Choosing a Scheme will select its associated Weapon",@"");
+ cell.detailTextLabel.adjustsFontSizeToFitWidth = YES;
+ cell.accessoryView = self.syncSwitch;
}
-
- cell.backgroundColor = [UIColor blackColor];
+
+ cell.backgroundColor = UICOLOR_HW_ALMOSTBLACK;
cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT;
cell.detailTextLabel.textColor = [UIColor whiteColor];
return cell;
@@ -142,8 +161,11 @@
NSString *text;
if (section == 0)
text = NSLocalizedString(@"Schemes",@"");
+ else if (section == 1)
+ text = NSLocalizedString(@"Weapons",@"");
else
- text = NSLocalizedString(@"Weapons",@"");
+ text = NSLocalizedString(@"Options",@"");
+
UILabel *theLabel = createBlueLabel(text, frame);
theLabel.center = CGPointMake(self.view.frame.size.width/2, 20);
@@ -177,6 +199,17 @@
if ([indexPath section] == 0) {
self.lastIndexPath_sc = indexPath;
self.selectedScheme = [self.listOfSchemes objectAtIndex:newRow];
+ if (self.syncSwitch.on) {
+ for (NSString *str in self.listOfWeapons) {
+ if ([str isEqualToString:self.selectedScheme]) {
+ int index = [self.listOfSchemes indexOfObject:str];
+ self.selectedWeapon = str;
+ self.lastIndexPath_we = [NSIndexPath indexPathForRow:index inSection:1];
+ [self.tableView reloadData];
+ break;
+ }
+ }
+ }
} else {
self.lastIndexPath_we = indexPath;
self.selectedWeapon = [self.listOfWeapons objectAtIndex:newRow];
@@ -187,6 +220,45 @@
[aTableView deselectRowAtIndexPath:indexPath animated:YES];
}
+-(void) fillSections {
+ if (hideSections == YES) {
+ hideSections = NO;
+ NSRange range;
+ range.location = 0;
+ range.length = 3;
+ NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:range];
+ [self.tableView insertSections:sections withRowAnimation:UITableViewRowAnimationFade];
+ self.selectedScheme = @"Default.plist";
+ self.selectedWeapon = @"Default.plist";
+
+ self.tableView.scrollEnabled = YES;
+
+ [[self.view viewWithTag:LABEL_TAG] removeFromSuperview];
+ }
+}
+
+-(void) emptySections {
+ hideSections = YES;
+ NSRange range;
+ range.location = 0;
+ range.length = 3;
+ NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:range];
+ [self.tableView deleteSections:sections withRowAnimation:UITableViewRowAnimationFade];
+ self.selectedScheme = @"Default.plist";
+ self.selectedWeapon = @"Default.plist";
+
+ self.tableView.scrollEnabled = NO;
+
+ CGRect frame = CGRectMake(0, 0, self.view.frame.size.width * 80/100, 60);
+ UILabel *theLabel = createBlueLabel(NSLocalizedString(@"Missions don't need further configuration",@""), frame);
+ theLabel.center = CGPointMake(self.view.frame.size.width/2, self.view.frame.size.height/2);
+ theLabel.numberOfLines = 2;
+ theLabel.tag = LABEL_TAG;
+
+ [self.view addSubview:theLabel];
+ [theLabel release];
+}
+
#pragma mark -
#pragma mark Memory management
-(void) didReceiveMemoryWarning {
@@ -195,6 +267,7 @@
self.lastIndexPath_we = nil;
self.listOfSchemes = nil;
self.listOfWeapons = nil;
+ self.syncSwitch = nil;
MSG_MEMCLEAN();
}
[super didReceiveMemoryWarning];
@@ -207,6 +280,7 @@
self.lastIndexPath_we = nil;
self.selectedScheme = nil;
self.selectedWeapon = nil;
+ self.syncSwitch = nil;
MSG_DIDUNLOAD();
[super viewDidUnload];
}
@@ -219,6 +293,7 @@
[lastIndexPath_we release];
[selectedScheme release];
[selectedWeapon release];
+ [syncSwitch release];
[super dealloc];
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/ServerSetup.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,35 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@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.
+ *
+ * File created on 16/12/2010.
+ */
+
+
+#import <Foundation/Foundation.h>
+#import "SDL_net.h"
+
+@interface ServerSetup : NSObject {
+ NSDictionary *systemSettings;
+
+ TCPsocket sd; // External socket descriptor
+}
+
+@property (nonatomic, retain) NSDictionary *systemSettings;
+
+-(BOOL) isNetworkReachable;
+
+@end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/ServerSetup.m Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,221 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@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.
+ *
+ * File created on 10/01/2010.
+ */
+
+
+#import "ServerSetup.h"
+#import "PascalImports.h"
+#import "CommodityFunctions.h"
+#import <SystemConfiguration/SCNetworkReachability.h>
+#import <netinet/in.h>
+
+#define BUFFER_SIZE 256
+
+@implementation ServerSetup
+@synthesize systemSettings;
+
+-(id) init {
+ if (self = [super init]) {
+ NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()];
+ self.systemSettings = dict;
+ [dict release];
+ }
+ return self;
+}
+
+-(void) dealloc {
+
+ [super dealloc];
+}
+
+// reusing appirater method
+-(BOOL) isNetworkReachable {
+ // Create zero addy
+ struct sockaddr_in zeroAddress;
+ bzero(&zeroAddress, sizeof(zeroAddress));
+ zeroAddress.sin_len = sizeof(zeroAddress);
+ zeroAddress.sin_family = AF_INET;
+
+ // Recover reachability flags
+ SCNetworkReachabilityRef defaultRouteReachability = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&zeroAddress);
+ SCNetworkReachabilityFlags flags;
+
+ BOOL didRetrieveFlags = SCNetworkReachabilityGetFlags(defaultRouteReachability, &flags);
+ CFRelease(defaultRouteReachability);
+
+ if (!didRetrieveFlags) {
+ NSLog(@"Error. Could not recover network reachability flags");
+ return NO;
+ }
+
+ BOOL isReachable = flags & kSCNetworkFlagsReachable;
+ BOOL needsConnection = flags & kSCNetworkFlagsConnectionRequired;
+ BOOL nonWiFi = flags & kSCNetworkReachabilityFlagsTransientConnection;
+
+ NSURL *testURL = [NSURL URLWithString:@"http://www.apple.com/"];
+ NSURLRequest *testRequest = [NSURLRequest requestWithURL:testURL
+ cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
+ timeoutInterval:20.0];
+ NSURLConnection *testConnection = [[NSURLConnection alloc] initWithRequest:testRequest delegate:self];
+
+ return ((isReachable && !needsConnection) || nonWiFi) ? (testConnection ? YES : NO) : NO;
+}
+
+-(int) sendToServer:(NSString *)command {
+ NSString *message = [[NSString alloc] initWithFormat:@"%@\n\n",command];
+ int result = SDLNet_TCP_Send(sd, [message UTF8String], [message length]);
+ [message release];
+ return result;
+}
+
+-(int) sendToServer:(NSString *)command withArgument:(NSString *)argument {
+ NSString *message = [[NSString alloc] initWithFormat:@"%@\n%@\n\n",command,argument];
+ int result = SDLNet_TCP_Send(sd, [message UTF8String], [message length]);
+ [message release];
+ return result;
+}
+
+-(void) serverProtocol {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ IPaddress ip;
+ BOOL clientQuit = NO;
+ char *buffer = (char *)malloc(sizeof(char)*BUFFER_SIZE);
+ int dim = BUFFER_SIZE;
+ uint8_t msgSize;
+
+ if (SDLNet_Init() < 0) {
+ DLog(@"SDLNet_Init: %s", SDLNet_GetError());
+ clientQuit = YES;
+ }
+
+ // Resolving the host using NULL make network interface to listen
+ if (SDLNet_ResolveHost(&ip, "netserver.hedgewars.org", DEFAULT_NETGAME_PORT) < 0 && !clientQuit) {
+ DLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError());
+ clientQuit = YES;
+ }
+
+ // Open a connection with the IP provided (listen on the host's port)
+ if (!(sd = SDLNet_TCP_Open(&ip)) && !clientQuit) {
+ DLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), DEFAULT_NETGAME_PORT);
+ clientQuit = YES;
+ }
+
+ DLog(@"Found server on port %d", DEFAULT_NETGAME_PORT);
+ while (!clientQuit) {
+ int index = 0;
+ BOOL exitBufferLoop = NO;
+ memset(buffer, '\0', dim);
+
+ while (exitBufferLoop != YES) {
+ msgSize = SDLNet_TCP_Recv(sd, &buffer[index], 2);
+
+ // exit in case of error
+ if (msgSize <= 0) {
+ DLog(@"SDLNet_TCP_Recv: %s", SDLNet_GetError());
+ clientQuit = YES;
+ break;
+ }
+
+ // update index position and check for End-Of-Message
+ index += msgSize;
+ if (strncmp(&buffer[index-2], "\n\n", 2) == 0) {
+ exitBufferLoop = YES;
+ }
+
+ // if message is too big allocate new space
+ if (index >= dim) {
+ dim += BUFFER_SIZE;
+ buffer = (char *)realloc(buffer, dim);
+ if (buffer == NULL) {
+ clientQuit = YES;
+ break;
+ }
+ }
+ }
+
+ NSString *bufferedMessage = [[NSString alloc] initWithBytes:buffer length:index-2 encoding:NSASCIIStringEncoding];
+ NSArray *listOfCommands = [bufferedMessage componentsSeparatedByString:@"\n"];
+ [bufferedMessage release];
+ NSString *command = [listOfCommands objectAtIndex:0];
+ DLog(@"size = %d, %@", index-2, listOfCommands);
+ if ([command isEqualToString:@"PING"]) {
+ if ([listOfCommands count] > 1)
+ [self sendToServer:@"PONG" withArgument:[listOfCommands objectAtIndex:1]];
+ else
+ [self sendToServer:@"PONG"];
+ DLog(@"PONG");
+ }
+ else if ([command isEqualToString:@"NICK"]) {
+ //what is this for?
+ }
+ else if ([command isEqualToString:@"PROTO"]) {
+ //what is this for?
+ }
+ else if ([command isEqualToString:@"ROOM"]) {
+ //TODO: stub
+ }
+ else if ([command isEqualToString:@"LOBBY:LEFT"]) {
+ //TODO: stub
+ }
+ else if ([command isEqualToString:@"LOBBY:JOINED"]) {
+ //TODO: stub
+ }
+ else if ([command isEqualToString:@"ASKPASSWORD"]) {
+ NSString *pwd = [self.systemSettings objectForKey:@"password"];
+ [self sendToServer:@"PASSWORD" withArgument:pwd];
+ }
+ else if ([command isEqualToString:@"CONNECTED"]) {
+ short int netProto;
+ char *versionStr;
+ HW_versionInfo(&netProto, &versionStr);
+ NSString *nick = [self.systemSettings objectForKey:@"username"];
+ [self sendToServer:@"NICK" withArgument:nick];
+ [self sendToServer:@"PROTO" withArgument:[NSString stringWithFormat:@"%d",netProto]];
+ }
+ else if ([command isEqualToString:@"SERVER_MESSAGE"]) {
+ DLog(@"%@", [listOfCommands objectAtIndex:1]);
+ }
+ else if ([command isEqualToString:@"WARNING"]) {
+ if ([listOfCommands count] > 1)
+ DLog(@"Server warning - %@", [listOfCommands objectAtIndex:1]);
+ else
+ DLog(@"Server warning - unknown");
+ }
+ else if ([command isEqualToString:@"ERROR"]) {
+ DLog(@"Server error - %@", [listOfCommands objectAtIndex:1]);
+ }
+ else if ([command isEqualToString:@"BYE"]) {
+ //TODO: handle "Reconnected too fast"
+ DLog(@"Server disconnected, reason: %@", [listOfCommands objectAtIndex:1]);
+ clientQuit = YES;
+ }
+ else {
+ DLog(@"Unknown/Unsupported message received: %@", command);
+ }
+ }
+ DLog(@"Server closed connection, ending thread");
+
+ free(buffer);
+ SDLNet_TCP_Close(sd);
+ SDLNet_Quit();
+
+ [pool release];
+}
+
+@end
--- a/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -153,6 +153,7 @@
if (row == 0) {
editableCell.textField.text = self.schemeName;
+ editableCell.textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
} else {
editableCell.minimumCharacters = 0;
editableCell.textField.font = [UIFont systemFontOfSize:[UIFont labelFontSize]];
--- a/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -20,6 +20,7 @@
#import "SingleTeamViewController.h"
+#import <QuartzCore/QuartzCore.h>
#import "HogHatViewController.h"
#import "GravesViewController.h"
#import "VoicesViewController.h"
@@ -263,6 +264,7 @@
accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.png",
FLAGS_DIRECTORY(),[teamDictionary objectForKey:@"flag"]]];
cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(27, 19)];
+ cell.imageView.layer.borderWidth = 0.3;
[accessoryImage release];
break;
case 4: // level
--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -150,6 +150,7 @@
if (row == 0) {
editableCell.textField.text = self.weaponName;
+ editableCell.textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
} else {
editableCell.minimumCharacters = 0;
editableCell.textField.font = [UIFont systemFontOfSize:[UIFont labelFontSize]];
--- a/project_files/HedgewarsMobile/Classes/SplitViewRootController.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SplitViewRootController.h Sun Dec 19 13:31:55 2010 -0500
@@ -25,8 +25,12 @@
@interface SplitViewRootController: UIViewController {
MasterViewController *activeController;
+ UINavigationController *rightNavController;
+ UISplitViewController *splitViewRootController;
}
@property (nonatomic,retain) MasterViewController *activeController;
+@property (nonatomic,retain) UINavigationController *rightNavController;
+@property (nonatomic,retain) UISplitViewController *splitViewRootController;
@end
--- a/project_files/HedgewarsMobile/Classes/SplitViewRootController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SplitViewRootController.m Sun Dec 19 13:31:55 2010 -0500
@@ -24,7 +24,7 @@
#import "CommodityFunctions.h"
@implementation SplitViewRootController
-@synthesize activeController;
+@synthesize activeController, rightNavController, splitViewRootController;
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return rotationManager(interfaceOrientation);
@@ -49,7 +49,7 @@
self.activeController = rightController;
[rightController release];
}
- UINavigationController *rightNavController = [[UINavigationController alloc] initWithRootViewController:self.activeController];
+ self.rightNavController = [[UINavigationController alloc] initWithRootViewController:self.activeController];
if (IS_IPAD()) {
MasterViewController *leftController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
@@ -57,18 +57,18 @@
UINavigationController *leftNavController = [[UINavigationController alloc] initWithRootViewController:leftController];
[leftController release];
- UISplitViewController *splitViewRootController = [[UISplitViewController alloc] init];
- splitViewRootController.delegate = nil;
- splitViewRootController.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
- splitViewRootController.viewControllers = [NSArray arrayWithObjects: leftNavController, rightNavController, nil];
+ self.splitViewRootController = [[UISplitViewController alloc] init];
+ self.splitViewRootController.delegate = nil;
+ self.splitViewRootController.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
+ self.splitViewRootController.viewControllers = [NSArray arrayWithObjects: leftNavController, self.rightNavController, nil];
[leftNavController release];
- [rightNavController release];
+ [self.rightNavController release];
// add view to main controller
- [self.view addSubview:splitViewRootController.view];
+ [self.view addSubview:self.splitViewRootController.view];
} else {
- rightNavController.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
- [self.view addSubview:rightNavController.view];
+ self.rightNavController.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
+ [self.view addSubview:self.rightNavController.view];
}
[super viewDidLoad];
@@ -76,12 +76,16 @@
-(void) viewDidUnload {
self.activeController = nil;
+ self.rightNavController = nil;
+ self.splitViewRootController = nil;
MSG_DIDUNLOAD();
[super viewDidUnload];
}
-(void) dealloc {
- [self.activeController release];
+ [activeController release];
+ [rightNavController release];
+ [splitViewRootController release];
[super dealloc];
}
--- a/project_files/HedgewarsMobile/Classes/SupportViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SupportViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -39,6 +39,7 @@
NSLocalizedString(@"Join us on Facebook",@""),
NSLocalizedString(@"Follow on Twitter",@""),
NSLocalizedString(@"Visit website",@""),
+ NSLocalizedString(@"Chat with us in IRC",@""),
nil];
self.waysToSupport = array;
[array release];
@@ -87,6 +88,9 @@
case 2:
imgString = @"Icon-Small.png";
break;
+ case 3:
+ imgString = @"irc.png";
+ break;
default:
DLog(@"No way");
break;
@@ -117,6 +121,9 @@
case 2:
urlString = @"http://www.hedgewars.org";
break;
+ case 3:
+ urlString = @"http://webchat.freenode.net/?channels=hedgewars";
+ break;
default:
DLog(@"No way");
break;
--- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.h Sun Dec 19 13:31:55 2010 -0500
@@ -20,11 +20,14 @@
#import <UIKit/UIKit.h>
-
+#import "HoldTableViewCell.h"
-@interface TeamConfigViewController : UITableViewController {
+@interface TeamConfigViewController : UITableViewController <HoldTableViewCellDelegate> {
+ NSInteger selectedTeamsCount;
+ NSInteger allTeamsCount;
+
+ NSMutableArray *listOfSelectedTeams;
NSMutableArray *listOfTeams;
- NSMutableArray *listOfSelectedTeams;
NSArray *cachedContentsOfDir;
}
--- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -21,16 +21,11 @@
#import "TeamConfigViewController.h"
#import "CommodityFunctions.h"
-#import "HogButtonView.h"
#import "SquareButtonView.h"
@implementation TeamConfigViewController
@synthesize listOfTeams, listOfSelectedTeams, cachedContentsOfDir;
-#define NUMBERBUTTON_TAG 123456
-#define SQUAREBUTTON_TAG 654321
-#define LABEL_TAG 456123
-
#pragma mark -
#pragma mark View lifecycle
-(void) viewDidLoad {
@@ -43,15 +38,14 @@
if (IS_IPAD())
[self.tableView setBackgroundView:nil];
else {
- UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"backgroundCenter.png"];
+ UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"background~iphone.png"];
UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage];
[backgroundImage release];
[self.tableView setBackgroundView:background];
[background release];
}
- } else {
+ } else
self.view.backgroundColor = [UIColor blackColor];
- }
self.tableView.separatorColor = UICOLOR_HW_YELLOW_BODER;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
@@ -79,8 +73,11 @@
NSMutableArray *emptyArray = [[NSMutableArray alloc] initWithObjects:nil];
self.listOfSelectedTeams = emptyArray;
[emptyArray release];
-
- cachedContentsOfDir = [[NSArray alloc] initWithArray:contentsOfDir copyItems:YES];
+
+ selectedTeamsCount = [self.listOfSelectedTeams count];
+ allTeamsCount = [self.listOfTeams count];
+
+ self.cachedContentsOfDir = [[NSArray alloc] initWithArray:contentsOfDir copyItems:YES];
}
[self.tableView reloadData];
}
@@ -89,6 +86,49 @@
return rotationManager(interfaceOrientation);
}
+-(NSInteger) filterNumberOfHogs:(NSInteger) hogs {
+ NSInteger numberOfHogs;
+ if (hogs <= HW_getMaxNumberOfHogs() && hogs >= 1)
+ numberOfHogs = hogs;
+ else {
+ if (hogs > HW_getMaxNumberOfHogs())
+ numberOfHogs = 1;
+ else
+ numberOfHogs = HW_getMaxNumberOfHogs();
+ }
+ return numberOfHogs;
+}
+
+-(UIImage *)drawHogsRepeated:(NSInteger) manyTimes {
+ UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:HEDGEHOG_FILE()];
+ CGFloat screenScale = getScreenScale();
+ int w = hogSprite.size.width * screenScale;
+ int h = hogSprite.size.height * screenScale;
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ CGContextRef context = CGBitmapContextCreate(NULL, w * 3, h, 8, 4 * w * 3, colorSpace, kCGImageAlphaPremultipliedFirst);
+
+ // draw the two images in the current context
+ for (int i = 0; i < manyTimes; i++)
+ CGContextDrawImage(context, CGRectMake(i*8*screenScale, 0, w, h), [hogSprite CGImage]);
+ [hogSprite release];
+
+ // Create bitmap image info from pixel data in current context
+ CGImageRef imageRef = CGBitmapContextCreateImage(context);
+
+ // Create a new UIImage object
+ UIImage *resultImage;
+ if ([self respondsToSelector:@selector(imageWithCGImage:scale:orientation:)])
+ resultImage = [UIImage imageWithCGImage:imageRef scale:screenScale orientation:UIImageOrientationUp];
+ else
+ resultImage = [UIImage imageWithCGImage:imageRef];
+
+ // Release colorspace, context and bitmap information
+ CGColorSpaceRelease(colorSpace);
+ CGContextRelease(context);
+ CFRelease(imageRef);
+
+ return resultImage;
+}
#pragma mark -
#pragma mark Table view data source
@@ -98,9 +138,9 @@
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0)
- return [listOfSelectedTeams count] ;
+ return selectedTeamsCount;
else
- return [listOfTeams count];
+ return allTeamsCount;
}
// Customize the appearance of table view cells.
@@ -113,47 +153,36 @@
if (section == 0) {
cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier0];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease];
-
- UIButton *numberButton = [[HogButtonView alloc] initWithFrame:CGRectMake(12, 5, 88, 32)];
- numberButton.tag = NUMBERBUTTON_TAG;
- [cell addSubview:numberButton];
- [numberButton release];
-
- SquareButtonView *squareButton = [[SquareButtonView alloc] initWithFrame:CGRectMake(12+88+6, 5, 36, 36)];
- squareButton.tag = SQUAREBUTTON_TAG;
- [cell addSubview:squareButton];
- [squareButton release];
+ cell = [[[HoldTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease];
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(12+88+6+36, 10, 103, 25)];
- label.textAlignment = UITextAlignmentLeft;
- label.minimumFontSize = 11;
- label.adjustsFontSizeToFitWidth = YES;
- label.baselineAdjustment = UIBaselineAdjustmentAlignCenters;
- label.backgroundColor = [UIColor clearColor];
- label.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
- label.textColor = UICOLOR_HW_YELLOW_TEXT;
- label.tag = LABEL_TAG;
- [cell.contentView addSubview:label];
- [label release];
+ SquareButtonView *squareButton = [[SquareButtonView alloc] initWithFrame:CGRectMake(0, 0, 36, 36)];
+ cell.accessoryView = squareButton;
+ [squareButton release];
}
NSMutableDictionary *selectedRow = [listOfSelectedTeams objectAtIndex:[indexPath row]];
-
- UILabel *cellLabel = (UILabel *)[cell viewWithTag:LABEL_TAG];
- cellLabel.text = [[selectedRow objectForKey:@"team"] stringByDeletingPathExtension];
+ cell.textLabel.text = [[selectedRow objectForKey:@"team"] stringByDeletingPathExtension];
+ cell.textLabel.backgroundColor = [UIColor clearColor];
- HogButtonView *numberButton = (HogButtonView *)[cell viewWithTag:NUMBERBUTTON_TAG];
- [numberButton drawManyHogs:[[selectedRow objectForKey:@"number"] intValue]];
- numberButton.ownerDictionary = selectedRow;
+ SquareButtonView *squareButton = (SquareButtonView *)cell.accessoryView;
+ [squareButton selectColor:[[selectedRow objectForKey:@"color"] intValue]];
+ NSNumber *hogNumber = [selectedRow objectForKey:@"number"];
+ [squareButton setTitle:[hogNumber stringValue] forState:UIControlStateNormal];
+ squareButton.ownerDictionary = selectedRow;
- SquareButtonView *squareButton = (SquareButtonView *)[cell viewWithTag:SQUAREBUTTON_TAG];
- [squareButton selectColor:[[selectedRow objectForKey:@"color"] intValue]];
- squareButton.ownerDictionary = selectedRow;
+ cell.imageView.image = [self drawHogsRepeated:[hogNumber intValue]];
+ ((HoldTableViewCell *)cell).delegate = self;
+ } else {
+ cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier1];
+ if (cell == nil)
+ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease];
+
+ cell.textLabel.text = [[[listOfTeams objectAtIndex:[indexPath row]] objectForKey:@"team"] stringByDeletingPathExtension];
+ cell.textLabel.backgroundColor = [UIColor clearColor];
- NSString *teamPath = [NSString stringWithFormat:@"%@/%@",TEAMS_DIRECTORY(),[selectedRow objectForKey:@"team"]];
+ NSString *teamPath = [NSString stringWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),cell.textLabel.text];
NSDictionary *firstHog = [[[NSDictionary dictionaryWithContentsOfFile:teamPath] objectForKey:@"hedgehogs"] objectAtIndex:0];
- if ([[firstHog objectForKey:@"level"] intValue]> 0) {
+ if ([[firstHog objectForKey:@"level"] intValue] != 0) {
NSString *filePath = [NSString stringWithFormat:@"%@/cyborg.png",HATS_DIRECTORY()];
UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:filePath andCutAt:CGRectMake(0, 2, 32, 32)];
UIImageView *spriteView = [[UIImageView alloc] initWithImage:sprite];
@@ -163,18 +192,12 @@
[spriteView release];
} else
cell.accessoryView = nil;
- } else {
- cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier1];
- if (cell == nil)
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease];
+ }
- cell.textLabel.text = [[[listOfTeams objectAtIndex:[indexPath row]] objectForKey:@"team"] stringByDeletingPathExtension];
- cell.accessoryView = nil;
- }
-
cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT;
- cell.backgroundColor = [UIColor blackColor];
-
+ cell.backgroundColor = UICOLOR_HW_ALMOSTBLACK;
+ cell.selectionStyle = UITableViewCellSelectionStyleNone;
+
return cell;
}
@@ -185,7 +208,7 @@
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
CGRect frame = CGRectMake(0, 0, self.view.frame.size.width * 80/100, 30);
NSString *text;
- if (section == 0)
+ if (section == 0)
text = NSLocalizedString(@"Playing Teams",@"");
else
text = NSLocalizedString(@"Available Teams",@"");
@@ -198,22 +221,83 @@
return theView;
}
+-(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+ return IS_IPAD() ? 40 : 20;
+}
+
+-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section {
+ NSInteger height = IS_IPAD() ? 40 : 20;
+ UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, height)];
+ footer.backgroundColor = [UIColor clearColor];
+
+ UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width*80/100, height)];
+ label.center = CGPointMake(self.tableView.frame.size.width/2, height/2);
+ label.textAlignment = UITextAlignmentCenter;
+ label.font = [UIFont italicSystemFontOfSize:12];
+ label.textColor = [UIColor whiteColor];
+ label.numberOfLines = 2;
+ if (section == 0)
+ label.text = NSLocalizedString(@"Tap to add hogs or change color, touch and hold to remove a team.",@"");
+ else
+ label.text = NSLocalizedString(@"The robot badge indicates an AI-controlled team.",@"");
+
+ label.backgroundColor = [UIColor clearColor];
+ [footer addSubview:label];
+ [label release];
+ return [footer autorelease];
+}
+
+
#pragma mark -
#pragma mark Table view delegate
-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger row = [indexPath row];
NSInteger section = [indexPath section];
- if (section == 0) {
- [self.listOfTeams addObject:[self.listOfSelectedTeams objectAtIndex:row]];
- [self.listOfSelectedTeams removeObjectAtIndex:row];
- } else {
+ if (section == 1 && [self.listOfTeams count] > row) {
[self.listOfSelectedTeams addObject:[self.listOfTeams objectAtIndex:row]];
[self.listOfTeams removeObjectAtIndex:row];
+
+ NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:selectedTeamsCount inSection:0];
+ allTeamsCount--;
+ selectedTeamsCount++;
+ [aTableView beginUpdates];
+ [aTableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationRight];
+ [aTableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationRight];
+ [aTableView endUpdates];
}
- [aTableView reloadData];
+ if (section == 0 && [self.listOfSelectedTeams count] > row) {
+ NSMutableDictionary *selectedRow = [self.listOfSelectedTeams objectAtIndex:row];
+ UITableViewCell *cell = [aTableView cellForRowAtIndexPath:indexPath];
+ SquareButtonView *squareButton = (SquareButtonView *)cell.accessoryView;
+
+ NSInteger increaseNumber = [[selectedRow objectForKey:@"number"] intValue] + 1;
+ NSNumber *newNumber = [NSNumber numberWithInt:[self filterNumberOfHogs:increaseNumber]];
+ [squareButton setTitle:[newNumber stringValue] forState:UIControlStateNormal];
+ [selectedRow setObject:newNumber forKey:@"number"];
+
+ cell.imageView.image = [self drawHogsRepeated:[newNumber intValue]];
+ }
}
+-(void) holdAction:(NSString *)content {
+ NSInteger row;
+ for (row = 0; row < [self.listOfSelectedTeams count]; row++) {
+ NSDictionary *dict = [self.listOfSelectedTeams objectAtIndex:row];
+ if ([content isEqualToString:[[dict objectForKey:@"team"] stringByDeletingPathExtension]])
+ break;
+ }
+
+ [self.listOfTeams addObject:[self.listOfSelectedTeams objectAtIndex:row]];
+ [self.listOfSelectedTeams removeObjectAtIndex:row];
+
+ [self.tableView beginUpdates];
+ [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:row inSection:0]] withRowAnimation:UITableViewRowAnimationLeft];
+ [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:allTeamsCount inSection:1]] withRowAnimation:UITableViewRowAnimationLeft];
+ allTeamsCount++;
+ selectedTeamsCount--;
+ [self.tableView endUpdates];
+}
#pragma mark -
#pragma mark Memory management
--- a/project_files/HedgewarsMobile/Classes/TeamSettingsViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/TeamSettingsViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -20,8 +20,8 @@
#import "TeamSettingsViewController.h"
+#import "CreationChamber.h"
#import "SingleTeamViewController.h"
-#import "CommodityFunctions.h"
@implementation TeamSettingsViewController
@synthesize listOfTeams;
@@ -85,12 +85,14 @@
createTeamNamed([fileName stringByDeletingPathExtension]);
[self.listOfTeams addObject:fileName];
- [fileName release];
// order the array alphabetically, so teams will keep their position
[self.listOfTeams sortUsingSelector:@selector(compare:)];
+ [self.tableView reloadData];
- [self.tableView reloadData];
+ NSInteger index = [self.listOfTeams indexOfObject:fileName];
+ [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
+ [fileName release];
}
#pragma mark -
--- a/project_files/HedgewarsMobile/Classes/UIImageExtra.h Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.h Sun Dec 19 13:31:55 2010 -0500
@@ -23,10 +23,11 @@
@interface UIImage (extra)
-
+
+CGFloat getScreenScale(void);
+
-(UIImage *)scaleToSize:(CGSize) size;
-(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint;
--(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint ofSize:(CGSize) resultingSize;
-(id) initWithContentsOfFile:(NSString *)path andCutAt:(CGRect) rect;
-(UIImage *)cutAt:(CGRect) rect;
-(UIImage *)convertToGrayScale;
--- a/project_files/HedgewarsMobile/Classes/UIImageExtra.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.m Sun Dec 19 13:31:55 2010 -0500
@@ -24,11 +24,21 @@
@implementation UIImage (extra)
+CGFloat getScreenScale(void) {
+ if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
+ return [UIScreen mainScreen].scale;
+ else
+ return 1.0f;
+}
+
-(UIImage *)scaleToSize:(CGSize) size {
DLog(@"warning - this is a very expensive operation, you should avoid using it");
// Create a bitmap graphics context; this will also set it as the current context
- UIGraphicsBeginImageContext(size);
+ if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
+ UIGraphicsBeginImageContextWithOptions(size, NO, getScreenScale());
+ else
+ UIGraphicsBeginImageContext(size);
// Draw the scaled image in the current context
[self drawInRect:CGRectMake(0, 0, size.width, size.height)];
@@ -44,17 +54,13 @@
}
-(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint {
- // create a contex of size of the background image
- return [self mergeWith:secondImage atPoint:secondImagePoint ofSize:self.size];
-}
-
--(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint ofSize:(CGSize) resultingSize {
if (secondImage == nil) {
DLog(@"Warning, secondImage == nil");
return self;
}
- int w = resultingSize.width;
- int h = resultingSize.height;
+ CGFloat screenScale = getScreenScale();
+ int w = self.size.width * screenScale;
+ int h = self.size.height * screenScale;
if (w == 0 || h == 0) {
DLog(@"Can have 0 dimesions");
@@ -66,14 +72,18 @@
CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst);
// draw the two images in the current context
- CGContextDrawImage(context, CGRectMake(0, 0, self.size.width, self.size.height), [self CGImage]);
- CGContextDrawImage(context, CGRectMake(secondImagePoint.x, secondImagePoint.y, secondImage.size.width, secondImage.size.height), [secondImage CGImage]);
+ CGContextDrawImage(context, CGRectMake(0, 0, self.size.width*screenScale, self.size.height*screenScale), [self CGImage]);
+ CGContextDrawImage(context, CGRectMake(secondImagePoint.x*screenScale, secondImagePoint.y*screenScale, secondImage.size.width*screenScale, secondImage.size.height*screenScale), [secondImage CGImage]);
// Create bitmap image info from pixel data in current context
CGImageRef imageRef = CGBitmapContextCreateImage(context);
// Create a new UIImage object
- UIImage *resultImage = [UIImage imageWithCGImage:imageRef];
+ UIImage *resultImage;
+ if ([self respondsToSelector:@selector(imageWithCGImage:scale:orientation:)])
+ resultImage = [UIImage imageWithCGImage:imageRef scale:screenScale orientation:UIImageOrientationUp];
+ else
+ resultImage = [UIImage imageWithCGImage:imageRef];
// Release colorspace, context and bitmap information
CGColorSpaceRelease(colorSpace);
@@ -193,8 +203,9 @@
-(UIImage *)makeRoundCornersOfSize:(CGSize) sizewh {
CGFloat cornerWidth = sizewh.width;
CGFloat cornerHeight = sizewh.height;
- CGFloat w = self.size.width;
- CGFloat h = self.size.height;
+ CGFloat screenScale = getScreenScale();
+ CGFloat w = self.size.width * screenScale;
+ CGFloat h = self.size.height * screenScale;
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst);
@@ -211,7 +222,12 @@
CGContextRelease(context);
CGColorSpaceRelease(colorSpace);
- UIImage *newImage = [UIImage imageWithCGImage:imageMasked];
+ UIImage *newImage;
+ if ([self respondsToSelector:@selector(imageWithCGImage:scale:orientation:)])
+ newImage = [UIImage imageWithCGImage:imageMasked scale:screenScale orientation:UIImageOrientationUp];
+ else
+ newImage = [UIImage imageWithCGImage:imageMasked];
+
CGImageRelease(imageMasked);
return newImage;
@@ -232,16 +248,23 @@
}
+(UIImage *)whiteImage:(CGSize) ofSize {
- UIGraphicsBeginImageContext(ofSize);
- CGContextRef context = UIGraphicsGetCurrentContext();
- UIGraphicsPushContext(context);
+ CGFloat w = ofSize.width;
+ CGFloat h = ofSize.height;
+ DLog(@"w: %f, h: %f", w, h);
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst);
+
+ CGContextBeginPath(context);
CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0);
CGContextFillRect(context,CGRectMake(0,0,ofSize.width,ofSize.height));
- UIGraphicsPopContext();
- UIImage *bkgImg = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
+ CGImageRef image = CGBitmapContextCreateImage(context);
+ CGContextRelease(context);
+ CGColorSpaceRelease(colorSpace);
+
+ UIImage *bkgImg = [UIImage imageWithCGImage:image];
+ CGImageRelease(image);
return bkgImg;
}
--- a/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m Sun Dec 19 13:31:55 2010 -0500
@@ -20,7 +20,7 @@
#import "WeaponSettingsViewController.h"
-#import "CommodityFunctions.h"
+#import "CreationChamber.h"
#import "SingleWeaponViewController.h"
@implementation WeaponSettingsViewController
@@ -82,12 +82,14 @@
createWeaponNamed([fileName stringByDeletingPathExtension], 0);
[self.listOfWeapons addObject:fileName];
- [fileName release];
// order the array alphabetically, so schemes will keep their position
[self.listOfWeapons sortUsingSelector:@selector(compare:)];
+ [self.tableView reloadData];
- [self.tableView reloadData];
+ NSInteger index = [self.listOfWeapons indexOfObject:fileName];
+ [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
+ [fileName release];
}
#pragma mark -
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Dec 19 13:31:55 2010 -0500
@@ -25,11 +25,36 @@
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; settings = {ATTRIBUTES = (Required, ); }; };
+ 61006F95128DE31F00EBA7F7 /* CreationChamber.m in Sources */ = {isa = PBXBuildFile; fileRef = 61006F94128DE31F00EBA7F7 /* CreationChamber.m */; };
+ 6103D414129B417500911D8D /* plus@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D413129B417500911D8D /* plus@2x.png */; };
610D5FB21270E2660033333A /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43411E290650040BA66 /* Icon-Small@2x.png */; };
610D5FB31270E26C0033333A /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43611E290650040BA66 /* Icon@2x.png */; };
+ 61188BF212A6FE530026C5DA /* ammoButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D399129B350700911D8D /* ammoButton@2x.png */; };
+ 61188BF312A6FE540026C5DA /* arrowDown@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D39A129B350700911D8D /* arrowDown@2x.png */; };
+ 61188BF412A6FE560026C5DA /* arrowLeft@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D39B129B350700911D8D /* arrowLeft@2x.png */; };
+ 61188BF512A6FE570026C5DA /* arrowRight@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D39C129B350700911D8D /* arrowRight@2x.png */; };
+ 61188BF612A6FE590026C5DA /* arrowUp@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D39D129B350700911D8D /* arrowUp@2x.png */; };
+ 61188BF712A6FE5A0026C5DA /* backButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FED31298CE6600D73365 /* backButton@2x.png */; };
+ 61188BF812A6FE5C0026C5DA /* background@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FED61298CF9800D73365 /* background@2x~iphone.png */; };
+ 61188BF912A6FE5D0026C5DA /* checkbox@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 615FEAD912A2A4C10098EE92 /* checkbox@2x.png */; };
+ 61188BFA12A6FE5E0026C5DA /* cornerButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D39E129B350700911D8D /* cornerButton@2x.png */; };
+ 61188BFB12A6FE610026C5DA /* Default-ipad-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 6183D83C11E2BCE200A88903 /* Default-ipad-Landscape.png */; };
+ 61188BFC12A6FE630026C5DA /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEA21298C7F900D73365 /* Default@2x.png */; };
+ 61188BFD12A6FE730026C5DA /* fb@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D383129B346A00911D8D /* fb@2x.png */; };
+ 61188BFE12A6FE7C0026C5DA /* irc@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D384129B347700911D8D /* irc@2x.png */; };
+ 61188BFF12A6FE7E0026C5DA /* joyButtonAttack@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D392129B34E900911D8D /* joyButtonAttack@2x.png */; };
+ 61188C0012A6FE810026C5DA /* joyButtonBackJump@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D393129B34E900911D8D /* joyButtonBackJump@2x.png */; };
+ 61188C0112A6FE820026C5DA /* joyButtonForwardJump@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D394129B34E900911D8D /* joyButtonForwardJump@2x.png */; };
+ 61188C0212A6FE840026C5DA /* localplayButton@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 615FEADE12A2A6640098EE92 /* localplayButton@2x~iphone.png */; };
+ 61188C0312A6FE860026C5DA /* netplayButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040D11DF59D10068B24D /* netplayButton.png */; };
+ 61188C0412A6FE880026C5DA /* savesButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEC81298CE4800D73365 /* savesButton@2x.png */; };
+ 61188C0512A6FE8F0026C5DA /* Data in Resources */ = {isa = PBXBuildFile; fileRef = 61798A5E114AE08600BA94A9 /* Data */; };
+ 61188C0612A6FE950026C5DA /* smallerBackground@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEEC1298D25D00D73365 /* smallerBackground@2x~iphone.png */; };
+ 61188C0712A6FE960026C5DA /* settingsButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FECA1298CE4E00D73365 /* settingsButton@2x.png */; };
+ 61188C0812A6FE9A0026C5DA /* title@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 618899811299516000D55FD6 /* title@2x.png */; };
+ 61188C0912A6FE9C0026C5DA /* tw@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6103D385129B348200911D8D /* tw@2x.png */; };
611D9BFB12497E9800008271 /* SavedGamesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611D9BF912497E9800008271 /* SavedGamesViewController.m */; };
611D9BFC12497E9800008271 /* SavedGamesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 611D9BFA12497E9800008271 /* SavedGamesViewController.xib */; };
- 611DA031124E2BC500008271 /* mediumBackground~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 611DA030124E2BC500008271 /* mediumBackground~ipad.png */; };
611DA1D0124E5C6300008271 /* plus.png in Resources */ = {isa = PBXBuildFile; fileRef = 611DA1CF124E5C6300008271 /* plus.png */; };
611E03E711FA747C0077A41E /* libvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 611E037C11FA74590077A41E /* libvorbis.a */; };
611E0E5111FA92170077A41E /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 611E0E5011FA92130077A41E /* libfreetype.a */; };
@@ -51,12 +76,12 @@
61370653117B1D50004EE44A /* Entitlements-Distribution.plist in Resources */ = {isa = PBXBuildFile; fileRef = 61370652117B1D50004EE44A /* Entitlements-Distribution.plist */; };
61399013125D19C0003C2DC0 /* uMobile.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61399012125D19C0003C2DC0 /* uMobile.pas */; };
6147DAD31253DCDE0010357E /* savesButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 6147DAD21253DCDE0010357E /* savesButton.png */; };
- 614AE65D127D090A0070BF5F /* smallerBackground~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 614AE65A127D090A0070BF5F /* smallerBackground~ipad.png */; };
- 614AE65E127D090A0070BF5F /* smallerBackground~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 614AE65B127D090A0070BF5F /* smallerBackground~iphone.png */; };
61536DF411CEAE7100D87A7E /* GameConfigViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924A11CA9CB400D6E256 /* GameConfigViewController.xib */; };
615AD96212073B4D00F2FF04 /* startGameButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 615AD96112073B4D00F2FF04 /* startGameButton.png */; };
615AD9E9120764CA00F2FF04 /* backButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 615AD9E8120764CA00F2FF04 /* backButton.png */; };
615AD9EB1207654E00F2FF04 /* helpButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 615AD9EA1207654E00F2FF04 /* helpButton.png */; };
+ 615FEAE212A2A6640098EE92 /* localplayButton~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 615FEADF12A2A6640098EE92 /* localplayButton~ipad.png */; };
+ 615FEAE312A2A6640098EE92 /* localplayButton~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 615FEAE012A2A6640098EE92 /* localplayButton~iphone.png */; };
6163EE7E11CC2600001C0453 /* SingleWeaponViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6163EE7D11CC2600001C0453 /* SingleWeaponViewController.m */; };
6165920D11CA9BA200D6E256 /* FlagsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E111CA9BA200D6E256 /* FlagsViewController.m */; };
6165920E11CA9BA200D6E256 /* FortsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E311CA9BA200D6E256 /* FortsViewController.m */; };
@@ -82,13 +107,17 @@
6165922211CA9BA200D6E256 /* WeaponSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165920B11CA9BA200D6E256 /* WeaponSettingsViewController.m */; };
6165922E11CA9BD500D6E256 /* CGPointUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = 6165922311CA9BD500D6E256 /* CGPointUtils.c */; };
6165922F11CA9BD500D6E256 /* CommodityFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922611CA9BD500D6E256 /* CommodityFunctions.m */; };
- 6165923011CA9BD500D6E256 /* HogButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922811CA9BD500D6E256 /* HogButtonView.m */; };
6165923111CA9BD500D6E256 /* SquareButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922B11CA9BD500D6E256 /* SquareButtonView.m */; };
6165923211CA9BD500D6E256 /* UIImageExtra.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922D11CA9BD500D6E256 /* UIImageExtra.m */; };
6165925311CA9CB400D6E256 /* MainMenuViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924B11CA9CB400D6E256 /* MainMenuViewController-iPad.xib */; };
6165925511CA9CB400D6E256 /* MapConfigViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924D11CA9CB400D6E256 /* MapConfigViewController-iPad.xib */; };
6165925811CA9CB400D6E256 /* OverlayViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165925011CA9CB400D6E256 /* OverlayViewController.xib */; };
6165929E11CA9E2F00D6E256 /* SDL_uikitappdelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */; };
+ 6172555A12B3DD4A0098D069 /* libLua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6172555912B3DCEE0098D069 /* libLua.a */; };
+ 6172FED91298CF9800D73365 /* background~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FED71298CF9800D73365 /* background~iphone.png */; };
+ 6172FEEF1298D25D00D73365 /* mediumBackground~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEEB1298D25D00D73365 /* mediumBackground~ipad.png */; };
+ 6172FEF11298D25D00D73365 /* smallerBackground~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEED1298D25D00D73365 /* smallerBackground~ipad.png */; };
+ 6172FEF21298D25D00D73365 /* smallerBackground~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEEE1298D25D00D73365 /* smallerBackground~iphone.png */; };
61798816114AA34C00BA94A9 /* hwengine.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987E7114AA34C00BA94A9 /* hwengine.pas */; };
61798818114AA34C00BA94A9 /* hwLibrary.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987E9114AA34C00BA94A9 /* hwLibrary.pas */; };
6179881B114AA34C00BA94A9 /* PascalExports.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987EC114AA34C00BA94A9 /* PascalExports.pas */; };
@@ -123,53 +152,61 @@
617988DB114AAA4200BA94A9 /* libSDLiPhoneOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 617988DA114AAA3900BA94A9 /* libSDLiPhoneOS.a */; };
61798935114AB25F00BA94A9 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798934114AB25F00BA94A9 /* AudioToolbox.framework */; };
61798996114AB3FF00BA94A9 /* libSDL_mixer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798993114AB3FA00BA94A9 /* libSDL_mixer.a */; };
- 617989BE114AB47A00BA94A9 /* libSDL_net.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 617989BB114AB47500BA94A9 /* libSDL_net.a */; };
61798A14114AB65C00BA94A9 /* libSDL_ttf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798A13114AB65600BA94A9 /* libSDL_ttf.a */; };
- 61799289114AE08700BA94A9 /* Data in Resources */ = {isa = PBXBuildFile; fileRef = 61798A5E114AE08600BA94A9 /* Data */; };
- 61808A4B128C901B005D0E2F /* startButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61808A4A128C901B005D0E2F /* startButton.png */; };
61808A5D128C930A005D0E2F /* backSound.wav in Resources */ = {isa = PBXBuildFile; fileRef = 611EE9D7122AA10A00DF6938 /* backSound.wav */; };
- 61808A6F128C94E1005D0E2F /* backgroundTop.png in Resources */ = {isa = PBXBuildFile; fileRef = 61808A6E128C94E1005D0E2F /* backgroundTop.png */; };
- 6183D83E11E2BCE200A88903 /* Default-ipad-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 6183D83C11E2BCE200A88903 /* Default-ipad-Landscape.png */; };
61842B24122B619D0096E335 /* HelpPageInGameViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61842B23122B619D0096E335 /* HelpPageInGameViewController-iPad.xib */; };
61842B3E122B65BD0096E335 /* helpabove.png in Resources */ = {isa = PBXBuildFile; fileRef = 61842B3D122B65BD0096E335 /* helpabove.png */; };
61842B40122B66280096E335 /* helpleft.png in Resources */ = {isa = PBXBuildFile; fileRef = 61842B3F122B66280096E335 /* helpleft.png */; };
6187AEBD120781B900B31A27 /* Settings in Resources */ = {isa = PBXBuildFile; fileRef = 6187AEA5120781B900B31A27 /* Settings */; };
+ 61889985129995B500D55FD6 /* title~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 61889984129995B500D55FD6 /* title~ipad.png */; };
+ 618E27BC12A2C32600C20EF0 /* libSDL_net.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 618E27BB12A2C30700C20EF0 /* libSDL_net.a */; };
6199E81612463EA800DADF8C /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6199E81512463EA800DADF8C /* CFNetwork.framework */; };
6199E81A12463EC400DADF8C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6199E81912463EC400DADF8C /* SystemConfiguration.framework */; };
6199E839124647DE00DADF8C /* SupportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6199E837124647DE00DADF8C /* SupportViewController.m */; };
6199E86D12464A8E00DADF8C /* surprise.png in Resources */ = {isa = PBXBuildFile; fileRef = 6199E86C12464A8E00DADF8C /* surprise.png */; };
- 619C5ACF124F7DE200D041AE /* libLua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 619C5ACE124F7DDF00D041AE /* libLua.a */; };
619C5AF4124F7E3100D041AE /* LuaPas.pas in Sources */ = {isa = PBXBuildFile; fileRef = 619C5AF3124F7E3100D041AE /* LuaPas.pas */; };
619C5BA2124FA59000D041AE /* MapPreviewButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */; };
61A1188511683A8C00359010 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A117FE1168322700359010 /* CoreGraphics.framework */; settings = {ATTRIBUTES = (Required, ); }; };
- 61A118D311683CD100359010 /* HedgewarsTitle.png in Resources */ = {isa = PBXBuildFile; fileRef = 611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */; };
- 61A670BE12747D8900B06CE7 /* borderBottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E911DF58550068B24D /* borderBottom.png */; };
+ 61A4A39412A5CCC2004D81E6 /* uCommandHandlers.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A38912A5CCC2004D81E6 /* uCommandHandlers.pas */; };
+ 61A4A39512A5CCC2004D81E6 /* uCommands.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A38A12A5CCC2004D81E6 /* uCommands.pas */; };
+ 61A4A39612A5CCC2004D81E6 /* uDebug.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A38B12A5CCC2004D81E6 /* uDebug.pas */; };
+ 61A4A39712A5CCC2004D81E6 /* uGearsRender.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A38C12A5CCC2004D81E6 /* uGearsRender.pas */; };
+ 61A4A39812A5CCC2004D81E6 /* uRender.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A38D12A5CCC2004D81E6 /* uRender.pas */; };
+ 61A4A39912A5CCC2004D81E6 /* uRenderUtils.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A38E12A5CCC2004D81E6 /* uRenderUtils.pas */; };
+ 61A4A39A12A5CCC2004D81E6 /* uSinTable.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A38F12A5CCC2004D81E6 /* uSinTable.pas */; };
+ 61A4A39B12A5CCC2004D81E6 /* uTextures.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A39012A5CCC2004D81E6 /* uTextures.pas */; };
+ 61A4A39C12A5CCC2004D81E6 /* uTypes.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A39112A5CCC2004D81E6 /* uTypes.pas */; };
+ 61A4A39D12A5CCC2004D81E6 /* uUtils.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A39212A5CCC2004D81E6 /* uUtils.pas */; };
+ 61A4A39E12A5CCC2004D81E6 /* uVariables.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A39312A5CCC2004D81E6 /* uVariables.pas */; };
+ 61A4A3A212A5CD56004D81E6 /* uCaptions.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61A4A3A112A5CD56004D81E6 /* uCaptions.pas */; };
61A670C012747D9B00B06CE7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6183D83D11E2BCE200A88903 /* Default.png */; };
61A670C112747DB900B06CE7 /* MainMenuViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */; };
61A670C212747DBD00B06CE7 /* MapConfigViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924E11CA9CB400D6E256 /* MapConfigViewController-iPhone.xib */; };
- 61A670FB12747E0D00B06CE7 /* title_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 619C09E911E8B8D600F1DF16 /* title_small.png */; };
- 61A6710612747E4000B06CE7 /* backgroundCenter.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E511DF58550068B24D /* backgroundCenter.png */; };
+ 61AC067412B2E32D000B52A2 /* Appirater.m in Sources */ = {isa = PBXBuildFile; fileRef = 61AC067312B2E32D000B52A2 /* Appirater.m */; };
61B3D71C11EA6F2700EC7420 /* uKeys.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987FE114AA34C00BA94A9 /* uKeys.pas */; };
61C079E411F35A300072BF46 /* EditableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C079E311F35A300072BF46 /* EditableCellView.m */; };
61D205A1127CDD1100ABD83E /* ObjcExports.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D205A0127CDD1100ABD83E /* ObjcExports.m */; };
+ 61D3D2A51290E03A003CE7C3 /* irc.png in Resources */ = {isa = PBXBuildFile; fileRef = 61D3D2A41290E03A003CE7C3 /* irc.png */; };
61DE8F221257EB1100B80214 /* AmmoMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61DE8F211257EB1100B80214 /* AmmoMenuViewController.m */; };
61DF0EDC1284DF2300F3F10B /* HelpPageLobbyViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61DF0EDB1284DF2300F3F10B /* HelpPageLobbyViewController-iPhone.xib */; };
61DF0F211284F72A00F3F10B /* HelpPageInGameViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61DF0F201284F72A00F3F10B /* HelpPageInGameViewController-iPhone.xib */; };
61E1F4F811D004240016A5AA /* adler32.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61E1F4F711D004240016A5AA /* adler32.pas */; };
+ 61E2E12E12BAAEE30051B659 /* ServerSetup.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E2E12D12BAAEE30051B659 /* ServerSetup.m */; };
61E2F7441283752C00E12521 /* fb.png in Resources */ = {isa = PBXBuildFile; fileRef = 61E2F7421283752C00E12521 /* fb.png */; };
61E2F7451283752C00E12521 /* tw.png in Resources */ = {isa = PBXBuildFile; fileRef = 61E2F7431283752C00E12521 /* tw.png */; };
+ 61E5D68D12AB006F00566F29 /* uLandPainted.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61E5D68C12AB006F00566F29 /* uLandPainted.pas */; };
61EBA62A11DFF2BC0048B68A /* title.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62811DFF2BC0048B68A /* title.png */; };
- 61EBA62D11DFF3310048B68A /* backgroundAndTitle.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62C11DFF3310048B68A /* backgroundAndTitle.png */; };
61EF920E11DF57AC003441C4 /* arrowDown.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920511DF57AC003441C4 /* arrowDown.png */; };
61EF920F11DF57AC003441C4 /* arrowLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920611DF57AC003441C4 /* arrowLeft.png */; };
61EF921011DF57AC003441C4 /* arrowRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920711DF57AC003441C4 /* arrowRight.png */; };
61EF921111DF57AC003441C4 /* arrowUp.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920811DF57AC003441C4 /* arrowUp.png */; };
- 61EF921211DF57AC003441C4 /* joyButton_attack.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920911DF57AC003441C4 /* joyButton_attack.png */; };
- 61EF921311DF57AC003441C4 /* joyButton_backjump.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920A11DF57AC003441C4 /* joyButton_backjump.png */; };
- 61EF921411DF57AC003441C4 /* joyButton_forwardjump.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920B11DF57AC003441C4 /* joyButton_forwardjump.png */; };
+ 61EF921211DF57AC003441C4 /* joyButtonAttack.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920911DF57AC003441C4 /* joyButtonAttack.png */; };
+ 61EF921311DF57AC003441C4 /* joyButtonBackJump.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920A11DF57AC003441C4 /* joyButtonBackJump.png */; };
+ 61EF921411DF57AC003441C4 /* joyButtonForwardJump.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920B11DF57AC003441C4 /* joyButtonForwardJump.png */; };
61F2E7CE1205EDE0005734F7 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F2E7CC1205EDE0005734F7 /* AboutViewController.m */; };
61F2E7CF1205EDE0005734F7 /* AboutViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61F2E7CD1205EDE0005734F7 /* AboutViewController.xib */; };
61F2E7EC12060E31005734F7 /* checkbox.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F2E7EB12060E31005734F7 /* checkbox.png */; };
+ 61F544C712AF1748007FD913 /* HoldTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F544C612AF1748007FD913 /* HoldTableViewCell.m */; };
61F7A43811E290650040BA66 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43111E290650040BA66 /* Icon-72.png */; };
61F7A43911E290650040BA66 /* Icon-Small-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43211E290650040BA66 /* Icon-Small-50.png */; };
61F7A43A11E290650040BA66 /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43311E290650040BA66 /* Icon-Small.png */; };
@@ -177,7 +214,6 @@
61F7A43E11E290650040BA66 /* iTunesArtwork.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43711E290650040BA66 /* iTunesArtwork.png */; };
61F9040911DF58B00068B24D /* settingsButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040811DF58B00068B24D /* settingsButton.png */; };
61F9040B11DF59370068B24D /* background.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040A11DF59370068B24D /* background.png */; };
- 61F9040E11DF59D10068B24D /* localplayButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040C11DF59D10068B24D /* localplayButton.png */; };
61F904D711DF7DA30068B24D /* WeaponCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F904D611DF7DA30068B24D /* WeaponCellView.m */; };
922F64900F10F53100DC6EC0 /* libfpc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 928301170F10CAFC00CC5A3C /* libfpc.a */; };
/* End PBXBuildFile section */
@@ -658,6 +694,27 @@
remoteGlobalIDString = BE1FA74107AF4C45004B6283;
remoteInfo = "Static Library";
};
+ 6172555412B3DCEE0098D069 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 6172554E12B3DCEE0098D069 /* Lua.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 1D6058910D05DD3D006BFB54;
+ remoteInfo = "Test Lua";
+ };
+ 6172555612B3DCEE0098D069 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 6172554E12B3DCEE0098D069 /* Lua.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 506EE05E10304ED200A389B3;
+ remoteInfo = "cocos2d libraries";
+ };
+ 6172555812B3DCEE0098D069 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 6172554E12B3DCEE0098D069 /* Lua.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = E14CF7C110ABC177005470B6;
+ remoteInfo = Lua;
+ };
617988D9114AAA3900BA94A9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 617988D3114AAA3900BA94A9 /* SDLiPhoneOS.xcodeproj */;
@@ -672,13 +729,6 @@
remoteGlobalIDString = BE1FA95407AF96B2004B6283;
remoteInfo = "Static Library";
};
- 617989BA114AB47500BA94A9 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 617989B3114AB47500BA94A9 /* SDL_net.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = BE48FF6F07AFA9A900BB41DA;
- remoteInfo = "Static Library";
- };
61798A12114AB65600BA94A9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 61798A0B114AB65600BA94A9 /* SDL_ttf.xcodeproj */;
@@ -693,26 +743,12 @@
remoteGlobalIDString = 006E982211955059001DE610;
remoteInfo = testsdl;
};
- 619C5AC9124F7DDF00D041AE /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 1D6058910D05DD3D006BFB54;
- remoteInfo = "Test Lua";
- };
- 619C5ACB124F7DDF00D041AE /* PBXContainerItemProxy */ = {
+ 618E27BA12A2C30700C20EF0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */;
+ containerPortal = 618E27B612A2C30700C20EF0 /* SDL_net.xcodeproj */;
proxyType = 2;
- remoteGlobalIDString = 506EE05E10304ED200A389B3;
- remoteInfo = "cocos2d libraries";
- };
- 619C5ACD124F7DDF00D041AE /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = E14CF7C110ABC177005470B6;
- remoteInfo = Lua;
+ remoteGlobalIDString = BE48FF6F07AFA9A900BB41DA;
+ remoteInfo = "Static Library";
};
928301590F10E41300CC5A3C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@@ -730,11 +766,25 @@
28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
32CA4F630368D1EE00C91783 /* Hedgewars_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Hedgewars_Prefix.pch; sourceTree = "<group>"; };
+ 61006F93128DE31F00EBA7F7 /* CreationChamber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CreationChamber.h; path = Classes/CreationChamber.h; sourceTree = "<group>"; };
+ 61006F94128DE31F00EBA7F7 /* CreationChamber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CreationChamber.m; path = Classes/CreationChamber.m; sourceTree = "<group>"; };
+ 6103D383129B346A00911D8D /* fb@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "fb@2x.png"; path = "Resources/Icons/fb@2x.png"; sourceTree = "<group>"; };
+ 6103D384129B347700911D8D /* irc@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "irc@2x.png"; path = "Resources/Icons/irc@2x.png"; sourceTree = "<group>"; };
+ 6103D385129B348200911D8D /* tw@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "tw@2x.png"; path = "Resources/Icons/tw@2x.png"; sourceTree = "<group>"; };
+ 6103D392129B34E900911D8D /* joyButtonAttack@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "joyButtonAttack@2x.png"; path = "Resources/Overlay/joyButtonAttack@2x.png"; sourceTree = "<group>"; };
+ 6103D393129B34E900911D8D /* joyButtonBackJump@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "joyButtonBackJump@2x.png"; path = "Resources/Overlay/joyButtonBackJump@2x.png"; sourceTree = "<group>"; };
+ 6103D394129B34E900911D8D /* joyButtonForwardJump@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "joyButtonForwardJump@2x.png"; path = "Resources/Overlay/joyButtonForwardJump@2x.png"; sourceTree = "<group>"; };
+ 6103D399129B350700911D8D /* ammoButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ammoButton@2x.png"; path = "Resources/Overlay/ammoButton@2x.png"; sourceTree = "<group>"; };
+ 6103D39A129B350700911D8D /* arrowDown@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "arrowDown@2x.png"; path = "Resources/Overlay/arrowDown@2x.png"; sourceTree = "<group>"; };
+ 6103D39B129B350700911D8D /* arrowLeft@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "arrowLeft@2x.png"; path = "Resources/Overlay/arrowLeft@2x.png"; sourceTree = "<group>"; };
+ 6103D39C129B350700911D8D /* arrowRight@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "arrowRight@2x.png"; path = "Resources/Overlay/arrowRight@2x.png"; sourceTree = "<group>"; };
+ 6103D39D129B350700911D8D /* arrowUp@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "arrowUp@2x.png"; path = "Resources/Overlay/arrowUp@2x.png"; sourceTree = "<group>"; };
+ 6103D39E129B350700911D8D /* cornerButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "cornerButton@2x.png"; path = "Resources/Overlay/cornerButton@2x.png"; sourceTree = "<group>"; };
+ 6103D413129B417500911D8D /* plus@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "plus@2x.png"; path = "Resources/Icons/plus@2x.png"; sourceTree = "<group>"; };
611D9BF812497E9800008271 /* SavedGamesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SavedGamesViewController.h; sourceTree = "<group>"; };
611D9BF912497E9800008271 /* SavedGamesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SavedGamesViewController.m; sourceTree = "<group>"; };
611D9BFA12497E9800008271 /* SavedGamesViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = SavedGamesViewController.xib; path = ../Resources/SavedGamesViewController.xib; sourceTree = "<group>"; };
- 611DA030124E2BC500008271 /* mediumBackground~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "mediumBackground~ipad.png"; path = "Resources/Overlay/mediumBackground~ipad.png"; sourceTree = "<group>"; };
- 611DA1CF124E5C6300008271 /* plus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = plus.png; path = Resources/Overlay/plus.png; sourceTree = "<group>"; };
+ 611DA1CF124E5C6300008271 /* plus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = plus.png; path = Resources/Icons/plus.png; sourceTree = "<group>"; };
611E02EC11FA74580077A41E /* cocos2d-iphone.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "cocos2d-iphone.xcodeproj"; path = "../../../Library/cocos2d/cocos2d-iphone.xcodeproj"; sourceTree = SOURCE_ROOT; };
611E0E4B11FA92130077A41E /* freetype.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = freetype.xcodeproj; path = "../../../Library/freetype/Xcode-iPhoneOS/freetype.xcodeproj"; sourceTree = SOURCE_ROOT; };
611E0EE511FB20610077A41E /* ammoButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ammoButton.png; path = Resources/Overlay/ammoButton.png; sourceTree = "<group>"; };
@@ -751,20 +801,20 @@
611EEBC3122B355700DF6938 /* helpright.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpright.png; path = Resources/Overlay/helpright.png; sourceTree = "<group>"; };
611EEC30122B54D700DF6938 /* helpplain.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpplain.png; path = Resources/Overlay/helpplain.png; sourceTree = "<group>"; };
611F4D4A11B27A9900F9759A /* uScript.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uScript.pas; path = ../../hedgewars/uScript.pas; sourceTree = SOURCE_ROOT; };
- 611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HedgewarsTitle.png; path = ../../QTfrontend/res/HedgewarsTitle.png; sourceTree = SOURCE_ROOT; };
6127232E117DF752005B90CF /* SDL_image.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_image.xcodeproj; path = "../../../Library/SDL-1.3/SDL_image/Xcode_iPhone/SDL_image.xcodeproj"; sourceTree = SOURCE_ROOT; };
61272338117DF778005B90CF /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
6129B9F611EFB04D0017E305 /* denied.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = denied.png; path = Resources/denied.png; sourceTree = "<group>"; };
61370652117B1D50004EE44A /* Entitlements-Distribution.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Entitlements-Distribution.plist"; sourceTree = "<group>"; };
61399012125D19C0003C2DC0 /* uMobile.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uMobile.pas; path = ../../hedgewars/uMobile.pas; sourceTree = SOURCE_ROOT; };
- 6147DAD21253DCDE0010357E /* savesButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = savesButton.png; path = Resources/savesButton.png; sourceTree = "<group>"; };
- 614AE659127D090A0070BF5F /* smallerBackground@2x-iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerBackground@2x-iphone.png"; path = "Resources/Overlay/smallerBackground@2x-iphone.png"; sourceTree = "<group>"; };
- 614AE65A127D090A0070BF5F /* smallerBackground~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerBackground~ipad.png"; path = "Resources/Overlay/smallerBackground~ipad.png"; sourceTree = "<group>"; };
- 614AE65B127D090A0070BF5F /* smallerBackground~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerBackground~iphone.png"; path = "Resources/Overlay/smallerBackground~iphone.png"; sourceTree = "<group>"; };
+ 6147DAD21253DCDE0010357E /* savesButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = savesButton.png; path = Resources/Frontend/savesButton.png; sourceTree = "<group>"; };
614E333D11DE9A93009DBA4E /* VGSHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = VGSHandlers.inc; path = ../../hedgewars/VGSHandlers.inc; sourceTree = SOURCE_ROOT; };
- 615AD96112073B4D00F2FF04 /* startGameButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = startGameButton.png; path = "Resources/Frontend-iPad/startGameButton.png"; sourceTree = "<group>"; };
- 615AD9E8120764CA00F2FF04 /* backButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backButton.png; path = "Resources/Frontend-iPad/backButton.png"; sourceTree = "<group>"; };
- 615AD9EA1207654E00F2FF04 /* helpButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpButton.png; path = "Resources/Frontend-iPad/helpButton.png"; sourceTree = "<group>"; };
+ 615AD96112073B4D00F2FF04 /* startGameButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = startGameButton.png; path = Resources/Frontend/startGameButton.png; sourceTree = "<group>"; };
+ 615AD9E8120764CA00F2FF04 /* backButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backButton.png; path = Resources/Frontend/backButton.png; sourceTree = "<group>"; };
+ 615AD9EA1207654E00F2FF04 /* helpButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpButton.png; path = Resources/Frontend/helpButton.png; sourceTree = "<group>"; };
+ 615FEAD912A2A4C10098EE92 /* checkbox@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "checkbox@2x.png"; path = "Resources/Icons/checkbox@2x.png"; sourceTree = "<group>"; };
+ 615FEADE12A2A6640098EE92 /* localplayButton@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "localplayButton@2x~iphone.png"; path = "Resources/Frontend/localplayButton@2x~iphone.png"; sourceTree = "<group>"; };
+ 615FEADF12A2A6640098EE92 /* localplayButton~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "localplayButton~ipad.png"; path = "Resources/Frontend/localplayButton~ipad.png"; sourceTree = "<group>"; };
+ 615FEAE012A2A6640098EE92 /* localplayButton~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "localplayButton~iphone.png"; path = "Resources/Frontend/localplayButton~iphone.png"; sourceTree = "<group>"; };
6163EE7C11CC2600001C0453 /* SingleWeaponViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleWeaponViewController.h; sourceTree = "<group>"; };
6163EE7D11CC2600001C0453 /* SingleWeaponViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SingleWeaponViewController.m; sourceTree = "<group>"; };
616591E011CA9BA200D6E256 /* FlagsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlagsViewController.h; sourceTree = "<group>"; };
@@ -815,8 +865,6 @@
6165922411CA9BD500D6E256 /* CGPointUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGPointUtils.h; path = Classes/CGPointUtils.h; sourceTree = "<group>"; };
6165922511CA9BD500D6E256 /* CommodityFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommodityFunctions.h; path = Classes/CommodityFunctions.h; sourceTree = "<group>"; };
6165922611CA9BD500D6E256 /* CommodityFunctions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CommodityFunctions.m; path = Classes/CommodityFunctions.m; sourceTree = "<group>"; };
- 6165922711CA9BD500D6E256 /* HogButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HogButtonView.h; path = Classes/HogButtonView.h; sourceTree = "<group>"; };
- 6165922811CA9BD500D6E256 /* HogButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HogButtonView.m; path = Classes/HogButtonView.m; sourceTree = "<group>"; };
6165922911CA9BD500D6E256 /* PascalImports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PascalImports.h; path = Classes/PascalImports.h; sourceTree = "<group>"; };
6165922A11CA9BD500D6E256 /* SquareButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SquareButtonView.h; path = Classes/SquareButtonView.h; sourceTree = "<group>"; };
6165922B11CA9BD500D6E256 /* SquareButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SquareButtonView.m; path = Classes/SquareButtonView.m; sourceTree = "<group>"; };
@@ -830,7 +878,17 @@
6165925011CA9CB400D6E256 /* OverlayViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = OverlayViewController.xib; path = Resources/OverlayViewController.xib; sourceTree = SOURCE_ROOT; };
6165929C11CA9E2F00D6E256 /* SDL_uikitappdelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_uikitappdelegate.h; path = Classes/SDL_uikitappdelegate.h; sourceTree = "<group>"; };
6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_uikitappdelegate.m; path = Classes/SDL_uikitappdelegate.m; sourceTree = "<group>"; };
- 617987E1114AA34C00BA94A9 /* CCHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = CCHandlers.inc; path = ../../hedgewars/CCHandlers.inc; sourceTree = SOURCE_ROOT; };
+ 6172554E12B3DCEE0098D069 /* Lua.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Lua.xcodeproj; path = ../../../Library/Lua/Lua.xcodeproj; sourceTree = SOURCE_ROOT; };
+ 6172FEA21298C7F900D73365 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/Icons/Default@2x.png"; sourceTree = "<group>"; };
+ 6172FEC81298CE4800D73365 /* savesButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "savesButton@2x.png"; path = "Resources/Frontend/savesButton@2x.png"; sourceTree = "<group>"; };
+ 6172FECA1298CE4E00D73365 /* settingsButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settingsButton@2x.png"; path = "Resources/Frontend/settingsButton@2x.png"; sourceTree = "<group>"; };
+ 6172FED31298CE6600D73365 /* backButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "backButton@2x.png"; path = "Resources/Frontend/backButton@2x.png"; sourceTree = "<group>"; };
+ 6172FED61298CF9800D73365 /* background@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "background@2x~iphone.png"; path = "Resources/Frontend/background@2x~iphone.png"; sourceTree = "<group>"; };
+ 6172FED71298CF9800D73365 /* background~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "background~iphone.png"; path = "Resources/Frontend/background~iphone.png"; sourceTree = "<group>"; };
+ 6172FEEB1298D25D00D73365 /* mediumBackground~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "mediumBackground~ipad.png"; path = "Resources/Frontend/mediumBackground~ipad.png"; sourceTree = "<group>"; };
+ 6172FEEC1298D25D00D73365 /* smallerBackground@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerBackground@2x~iphone.png"; path = "Resources/Frontend/smallerBackground@2x~iphone.png"; sourceTree = "<group>"; };
+ 6172FEED1298D25D00D73365 /* smallerBackground~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerBackground~ipad.png"; path = "Resources/Frontend/smallerBackground~ipad.png"; sourceTree = "<group>"; };
+ 6172FEEE1298D25D00D73365 /* smallerBackground~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerBackground~iphone.png"; path = "Resources/Frontend/smallerBackground~iphone.png"; sourceTree = "<group>"; };
617987E4114AA34C00BA94A9 /* GSHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = GSHandlers.inc; path = ../../hedgewars/GSHandlers.inc; sourceTree = SOURCE_ROOT; };
617987E5114AA34C00BA94A9 /* HHHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HHHandlers.inc; path = ../../hedgewars/HHHandlers.inc; sourceTree = SOURCE_ROOT; };
617987E7114AA34C00BA94A9 /* hwengine.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = hwengine.pas; path = ../../hedgewars/hwengine.pas; sourceTree = SOURCE_ROOT; };
@@ -838,7 +896,6 @@
617987EB114AA34C00BA94A9 /* options.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = options.inc; path = ../../hedgewars/options.inc; sourceTree = SOURCE_ROOT; };
617987EC114AA34C00BA94A9 /* PascalExports.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = PascalExports.pas; path = ../../hedgewars/PascalExports.pas; sourceTree = SOURCE_ROOT; };
617987ED114AA34C00BA94A9 /* SDLh.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SDLh.pas; path = ../../hedgewars/SDLh.pas; sourceTree = SOURCE_ROOT; };
- 617987F0114AA34C00BA94A9 /* SinTable.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = SinTable.inc; path = ../../hedgewars/SinTable.inc; sourceTree = SOURCE_ROOT; };
617987F1114AA34C00BA94A9 /* uAI.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uAI.pas; path = ../../hedgewars/uAI.pas; sourceTree = SOURCE_ROOT; };
617987F2114AA34C00BA94A9 /* uAIActions.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uAIActions.pas; path = ../../hedgewars/uAIActions.pas; sourceTree = SOURCE_ROOT; };
617987F3114AA34C00BA94A9 /* uAIAmmoTests.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uAIAmmoTests.pas; path = ../../hedgewars/uAIAmmoTests.pas; sourceTree = SOURCE_ROOT; };
@@ -871,53 +928,69 @@
617988D3114AAA3900BA94A9 /* SDLiPhoneOS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDLiPhoneOS.xcodeproj; path = "../../../Library/SDL-1.3/SDL/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj"; sourceTree = SOURCE_ROOT; };
61798934114AB25F00BA94A9 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
6179898B114AB3FA00BA94A9 /* SDL_mixer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_mixer.xcodeproj; path = "../../../Library/SDL-1.3/SDL_mixer/Xcode-iPhoneOS/SDL_mixer.xcodeproj"; sourceTree = SOURCE_ROOT; };
- 617989B3114AB47500BA94A9 /* SDL_net.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_net.xcodeproj; path = "../../../Library/SDL-1.3/SDL_net/Xcode-iPhoneOS/SDL_net.xcodeproj"; sourceTree = SOURCE_ROOT; };
61798A0B114AB65600BA94A9 /* SDL_ttf.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_ttf.xcodeproj; path = "../../../Library/SDL-1.3/SDL_ttf/Xcode-iPhoneOS/SDL_ttf.xcodeproj"; sourceTree = SOURCE_ROOT; };
61798A5E114AE08600BA94A9 /* Data */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Data; sourceTree = "<group>"; };
- 61808A4A128C901B005D0E2F /* startButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = startButton.png; path = "Resources/Frontend-iPhone/startButton.png"; sourceTree = "<group>"; };
- 61808A6E128C94E1005D0E2F /* backgroundTop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundTop.png; path = "Resources/Frontend-iPhone/backgroundTop.png"; sourceTree = "<group>"; };
6183D83C11E2BCE200A88903 /* Default-ipad-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-ipad-Landscape.png"; path = "Resources/Icons/Default-ipad-Landscape.png"; sourceTree = "<group>"; };
6183D83D11E2BCE200A88903 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/Icons/Default.png; sourceTree = "<group>"; };
61842B23122B619D0096E335 /* HelpPageInGameViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "HelpPageInGameViewController-iPad.xib"; path = "../Resources/HelpPageInGameViewController-iPad.xib"; sourceTree = "<group>"; };
61842B3D122B65BD0096E335 /* helpabove.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpabove.png; path = Resources/Overlay/helpabove.png; sourceTree = "<group>"; };
61842B3F122B66280096E335 /* helpleft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpleft.png; path = Resources/Overlay/helpleft.png; sourceTree = "<group>"; };
- 618736B8118CA28600123B23 /* GearDrawing.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = GearDrawing.inc; path = ../../hedgewars/GearDrawing.inc; sourceTree = SOURCE_ROOT; };
6187AEA5120781B900B31A27 /* Settings */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Settings; path = Resources/Settings; sourceTree = "<group>"; };
+ 618899811299516000D55FD6 /* title@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "title@2x.png"; path = "Resources/Frontend/title@2x.png"; sourceTree = "<group>"; };
+ 61889984129995B500D55FD6 /* title~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "title~ipad.png"; path = "Resources/Frontend/title~ipad.png"; sourceTree = "<group>"; };
+ 618E27B612A2C30700C20EF0 /* SDL_net.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_net.xcodeproj; path = "../../../Library/SDL-1.3/SDL_net/Xcode-iPhoneOS/SDL_net.xcodeproj"; sourceTree = SOURCE_ROOT; };
6199E81512463EA800DADF8C /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
6199E81912463EC400DADF8C /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
6199E836124647DE00DADF8C /* SupportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SupportViewController.h; sourceTree = "<group>"; };
6199E837124647DE00DADF8C /* SupportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SupportViewController.m; sourceTree = "<group>"; };
6199E86C12464A8E00DADF8C /* surprise.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = surprise.png; path = Resources/surprise.png; sourceTree = "<group>"; };
- 619C09E911E8B8D600F1DF16 /* title_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title_small.png; path = "Resources/Frontend-iPhone/title_small.png"; sourceTree = "<group>"; };
- 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Lua.xcodeproj; path = ../../../Library/Lua/Lua.xcodeproj; sourceTree = SOURCE_ROOT; };
619C5AF3124F7E3100D041AE /* LuaPas.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = LuaPas.pas; path = ../../hedgewars/LuaPas.pas; sourceTree = SOURCE_ROOT; };
619C5BA0124FA59000D041AE /* MapPreviewButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MapPreviewButtonView.h; path = Classes/MapPreviewButtonView.h; sourceTree = "<group>"; };
619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MapPreviewButtonView.m; path = Classes/MapPreviewButtonView.m; sourceTree = "<group>"; };
61A117FE1168322700359010 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
- 61C079E211F35A300072BF46 /* EditableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditableCellView.h; sourceTree = "<group>"; };
- 61C079E311F35A300072BF46 /* EditableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditableCellView.m; sourceTree = "<group>"; };
+ 61A4A38912A5CCC2004D81E6 /* uCommandHandlers.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uCommandHandlers.pas; path = ../../hedgewars/uCommandHandlers.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A38A12A5CCC2004D81E6 /* uCommands.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uCommands.pas; path = ../../hedgewars/uCommands.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A38B12A5CCC2004D81E6 /* uDebug.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uDebug.pas; path = ../../hedgewars/uDebug.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A38C12A5CCC2004D81E6 /* uGearsRender.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uGearsRender.pas; path = ../../hedgewars/uGearsRender.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A38D12A5CCC2004D81E6 /* uRender.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uRender.pas; path = ../../hedgewars/uRender.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A38E12A5CCC2004D81E6 /* uRenderUtils.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uRenderUtils.pas; path = ../../hedgewars/uRenderUtils.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A38F12A5CCC2004D81E6 /* uSinTable.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uSinTable.pas; path = ../../hedgewars/uSinTable.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A39012A5CCC2004D81E6 /* uTextures.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uTextures.pas; path = ../../hedgewars/uTextures.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A39112A5CCC2004D81E6 /* uTypes.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uTypes.pas; path = ../../hedgewars/uTypes.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A39212A5CCC2004D81E6 /* uUtils.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uUtils.pas; path = ../../hedgewars/uUtils.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A39312A5CCC2004D81E6 /* uVariables.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uVariables.pas; path = ../../hedgewars/uVariables.pas; sourceTree = SOURCE_ROOT; };
+ 61A4A3A112A5CD56004D81E6 /* uCaptions.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uCaptions.pas; path = ../../hedgewars/uCaptions.pas; sourceTree = SOURCE_ROOT; };
+ 61AC067212B2E32D000B52A2 /* Appirater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Appirater.h; path = Classes/Appirater.h; sourceTree = "<group>"; };
+ 61AC067312B2E32D000B52A2 /* Appirater.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Appirater.m; path = Classes/Appirater.m; sourceTree = "<group>"; };
+ 61C079E211F35A300072BF46 /* EditableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditableCellView.h; path = Classes/EditableCellView.h; sourceTree = "<group>"; };
+ 61C079E311F35A300072BF46 /* EditableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EditableCellView.m; path = Classes/EditableCellView.m; sourceTree = "<group>"; };
61D2059F127CDD1100ABD83E /* ObjcExports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjcExports.h; path = Classes/ObjcExports.h; sourceTree = "<group>"; };
61D205A0127CDD1100ABD83E /* ObjcExports.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ObjcExports.m; path = Classes/ObjcExports.m; sourceTree = "<group>"; };
+ 61D3D2A41290E03A003CE7C3 /* irc.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = irc.png; path = Resources/Icons/irc.png; sourceTree = "<group>"; };
61DE8F201257EB1100B80214 /* AmmoMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AmmoMenuViewController.h; sourceTree = "<group>"; };
61DE8F211257EB1100B80214 /* AmmoMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AmmoMenuViewController.m; sourceTree = "<group>"; };
61DF0EDB1284DF2300F3F10B /* HelpPageLobbyViewController-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "HelpPageLobbyViewController-iPhone.xib"; path = "../Resources/HelpPageLobbyViewController-iPhone.xib"; sourceTree = "<group>"; };
61DF0F201284F72A00F3F10B /* HelpPageInGameViewController-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "HelpPageInGameViewController-iPhone.xib"; path = "Resources/HelpPageInGameViewController-iPhone.xib"; sourceTree = SOURCE_ROOT; };
61E1F4F711D004240016A5AA /* adler32.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = adler32.pas; path = ../../hedgewars/adler32.pas; sourceTree = SOURCE_ROOT; };
+ 61E2E12C12BAAEE30051B659 /* ServerSetup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServerSetup.h; sourceTree = "<group>"; };
+ 61E2E12D12BAAEE30051B659 /* ServerSetup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServerSetup.m; sourceTree = "<group>"; };
61E2F7421283752C00E12521 /* fb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = fb.png; path = Resources/Icons/fb.png; sourceTree = "<group>"; };
61E2F7431283752C00E12521 /* tw.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tw.png; path = Resources/Icons/tw.png; sourceTree = "<group>"; };
- 61EBA62811DFF2BC0048B68A /* title.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title.png; path = "Resources/Frontend-iPad/title.png"; sourceTree = "<group>"; };
- 61EBA62C11DFF3310048B68A /* backgroundAndTitle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundAndTitle.png; path = "Resources/Frontend-iPad/backgroundAndTitle.png"; sourceTree = "<group>"; };
+ 61E5D68C12AB006F00566F29 /* uLandPainted.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uLandPainted.pas; path = ../../hedgewars/uLandPainted.pas; sourceTree = SOURCE_ROOT; };
+ 61EBA62811DFF2BC0048B68A /* title.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title.png; path = Resources/Frontend/title.png; sourceTree = "<group>"; };
61EF920511DF57AC003441C4 /* arrowDown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowDown.png; path = Resources/Overlay/arrowDown.png; sourceTree = "<group>"; };
61EF920611DF57AC003441C4 /* arrowLeft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowLeft.png; path = Resources/Overlay/arrowLeft.png; sourceTree = "<group>"; };
61EF920711DF57AC003441C4 /* arrowRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowRight.png; path = Resources/Overlay/arrowRight.png; sourceTree = "<group>"; };
61EF920811DF57AC003441C4 /* arrowUp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowUp.png; path = Resources/Overlay/arrowUp.png; sourceTree = "<group>"; };
- 61EF920911DF57AC003441C4 /* joyButton_attack.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButton_attack.png; path = Resources/Overlay/joyButton_attack.png; sourceTree = "<group>"; };
- 61EF920A11DF57AC003441C4 /* joyButton_backjump.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButton_backjump.png; path = Resources/Overlay/joyButton_backjump.png; sourceTree = "<group>"; };
- 61EF920B11DF57AC003441C4 /* joyButton_forwardjump.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButton_forwardjump.png; path = Resources/Overlay/joyButton_forwardjump.png; sourceTree = "<group>"; };
+ 61EF920911DF57AC003441C4 /* joyButtonAttack.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButtonAttack.png; path = Resources/Overlay/joyButtonAttack.png; sourceTree = "<group>"; };
+ 61EF920A11DF57AC003441C4 /* joyButtonBackJump.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButtonBackJump.png; path = Resources/Overlay/joyButtonBackJump.png; sourceTree = "<group>"; };
+ 61EF920B11DF57AC003441C4 /* joyButtonForwardJump.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButtonForwardJump.png; path = Resources/Overlay/joyButtonForwardJump.png; sourceTree = "<group>"; };
61F2E7CB1205EDE0005734F7 /* AboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutViewController.h; sourceTree = "<group>"; };
61F2E7CC1205EDE0005734F7 /* AboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = "<group>"; };
61F2E7CD1205EDE0005734F7 /* AboutViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = AboutViewController.xib; path = ../Resources/AboutViewController.xib; sourceTree = "<group>"; };
- 61F2E7EB12060E31005734F7 /* checkbox.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = checkbox.png; path = Resources/checkbox.png; sourceTree = "<group>"; };
+ 61F2E7EB12060E31005734F7 /* checkbox.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = checkbox.png; path = Resources/Icons/checkbox.png; sourceTree = "<group>"; };
+ 61F544C512AF1748007FD913 /* HoldTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HoldTableViewCell.h; path = Classes/HoldTableViewCell.h; sourceTree = "<group>"; };
+ 61F544C612AF1748007FD913 /* HoldTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HoldTableViewCell.m; path = Classes/HoldTableViewCell.m; sourceTree = "<group>"; };
61F7A43111E290650040BA66 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-72.png"; path = "Resources/Icons/Icon-72.png"; sourceTree = "<group>"; };
61F7A43211E290650040BA66 /* Icon-Small-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small-50.png"; path = "Resources/Icons/Icon-Small-50.png"; sourceTree = "<group>"; };
61F7A43311E290650040BA66 /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small.png"; path = "Resources/Icons/Icon-Small.png"; sourceTree = "<group>"; };
@@ -925,14 +998,11 @@
61F7A43511E290650040BA66 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = Resources/Icons/Icon.png; sourceTree = "<group>"; };
61F7A43611E290650040BA66 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon@2x.png"; path = "Resources/Icons/Icon@2x.png"; sourceTree = "<group>"; };
61F7A43711E290650040BA66 /* iTunesArtwork.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = iTunesArtwork.png; path = Resources/Icons/iTunesArtwork.png; sourceTree = "<group>"; };
- 61F903E511DF58550068B24D /* backgroundCenter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundCenter.png; path = "Resources/Frontend-iPhone/backgroundCenter.png"; sourceTree = "<group>"; };
- 61F903E911DF58550068B24D /* borderBottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = borderBottom.png; path = "Resources/Frontend-iPhone/borderBottom.png"; sourceTree = "<group>"; };
- 61F9040811DF58B00068B24D /* settingsButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = settingsButton.png; path = Resources/settingsButton.png; sourceTree = "<group>"; };
- 61F9040A11DF59370068B24D /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = background.png; path = "Resources/Frontend-iPad/background.png"; sourceTree = "<group>"; };
- 61F9040C11DF59D10068B24D /* localplayButton.png */ = {isa = PBXFileReference; explicitFileType = image.png; name = localplayButton.png; path = "Resources/Frontend-iPad/localplayButton.png"; sourceTree = "<group>"; };
- 61F9040D11DF59D10068B24D /* netplayButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = netplayButton.png; path = "Resources/Frontend-iPad/netplayButton.png"; sourceTree = "<group>"; };
- 61F904D511DF7DA30068B24D /* WeaponCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeaponCellView.h; sourceTree = "<group>"; };
- 61F904D611DF7DA30068B24D /* WeaponCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WeaponCellView.m; sourceTree = "<group>"; };
+ 61F9040811DF58B00068B24D /* settingsButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = settingsButton.png; path = Resources/Frontend/settingsButton.png; sourceTree = "<group>"; };
+ 61F9040A11DF59370068B24D /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = background.png; path = Resources/Frontend/background.png; sourceTree = "<group>"; };
+ 61F9040D11DF59D10068B24D /* netplayButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = netplayButton.png; path = Resources/Frontend/netplayButton.png; sourceTree = "<group>"; };
+ 61F904D511DF7DA30068B24D /* WeaponCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WeaponCellView.h; path = Classes/WeaponCellView.h; sourceTree = "<group>"; };
+ 61F904D611DF7DA30068B24D /* WeaponCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WeaponCellView.m; path = Classes/WeaponCellView.m; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
928301170F10CAFC00CC5A3C /* libfpc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libfpc.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
@@ -942,15 +1012,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 618E27BC12A2C32600C20EF0 /* libSDL_net.a in Frameworks */,
61798A14114AB65C00BA94A9 /* libSDL_ttf.a in Frameworks */,
- 617989BE114AB47A00BA94A9 /* libSDL_net.a in Frameworks */,
61272334117DF764005B90CF /* libSDL_image.a in Frameworks */,
61798996114AB3FF00BA94A9 /* libSDL_mixer.a in Frameworks */,
617988DB114AAA4200BA94A9 /* libSDLiPhoneOS.a in Frameworks */,
+ 6172555A12B3DD4A0098D069 /* libLua.a in Frameworks */,
922F64900F10F53100DC6EC0 /* libfpc.a in Frameworks */,
611E03E711FA747C0077A41E /* libvorbis.a in Frameworks */,
611E0E5111FA92170077A41E /* libfreetype.a in Frameworks */,
- 619C5ACF124F7DE200D041AE /* libLua.a in Frameworks */,
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
61A1188511683A8C00359010 /* CoreGraphics.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
@@ -979,6 +1049,8 @@
6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */,
616591E611CA9BA200D6E256 /* GameSetup.h */,
616591E711CA9BA200D6E256 /* GameSetup.m */,
+ 61E2E12C12BAAEE30051B659 /* ServerSetup.h */,
+ 61E2E12D12BAAEE30051B659 /* ServerSetup.m */,
);
path = Classes;
sourceTree = "<group>";
@@ -1010,19 +1082,23 @@
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
- 61DE91561258B76800B80214 /* Custom Buttons */,
- 32CA4F630368D1EE00C91783 /* Hedgewars_Prefix.pch */,
- 6165922911CA9BD500D6E256 /* PascalImports.h */,
- 6165922411CA9BD500D6E256 /* CGPointUtils.h */,
- 6165922311CA9BD500D6E256 /* CGPointUtils.c */,
6165929C11CA9E2F00D6E256 /* SDL_uikitappdelegate.h */,
6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */,
+ 61AC067212B2E32D000B52A2 /* Appirater.h */,
+ 61AC067312B2E32D000B52A2 /* Appirater.m */,
+ 61DE91561258B76800B80214 /* Custom UIs */,
+ 32CA4F630368D1EE00C91783 /* Hedgewars_Prefix.pch */,
+ 6165922911CA9BD500D6E256 /* PascalImports.h */,
+ 61D2059F127CDD1100ABD83E /* ObjcExports.h */,
+ 61D205A0127CDD1100ABD83E /* ObjcExports.m */,
6165922511CA9BD500D6E256 /* CommodityFunctions.h */,
6165922611CA9BD500D6E256 /* CommodityFunctions.m */,
+ 61006F93128DE31F00EBA7F7 /* CreationChamber.h */,
+ 61006F94128DE31F00EBA7F7 /* CreationChamber.m */,
+ 6165922411CA9BD500D6E256 /* CGPointUtils.h */,
+ 6165922311CA9BD500D6E256 /* CGPointUtils.c */,
6165922C11CA9BD500D6E256 /* UIImageExtra.h */,
6165922D11CA9BD500D6E256 /* UIImageExtra.m */,
- 61D2059F127CDD1100ABD83E /* ObjcExports.h */,
- 61D205A0127CDD1100ABD83E /* ObjcExports.m */,
);
name = "Other Sources";
sourceTree = "<group>";
@@ -1030,7 +1106,6 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
- 6147DAD21253DCDE0010357E /* savesButton.png */,
6199E86C12464A8E00DADF8C /* surprise.png */,
611EEBC0122B34A800DF6938 /* helpingame.png */,
611EEC30122B54D700DF6938 /* helpplain.png */,
@@ -1039,7 +1114,6 @@
611EEBC3122B355700DF6938 /* helpright.png */,
61842B3F122B66280096E335 /* helpleft.png */,
6129B9F611EFB04D0017E305 /* denied.png */,
- 61F2E7EB12060E31005734F7 /* checkbox.png */,
611EE973122A9C4100DF6938 /* clickSound.wav */,
611EE9D7122AA10A00DF6938 /* backSound.wav */,
611EE9D8122AA10A00DF6938 /* selSound.wav */,
@@ -1048,9 +1122,7 @@
6179936611501D1E00BA94A9 /* Overlay */,
61798A5E114AE08600BA94A9 /* Data */,
6187AEA5120781B900B31A27 /* Settings */,
- 611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */,
8D1107310486CEB800E47090 /* Info.plist */,
- 61F9040811DF58B00068B24D /* settingsButton.png */,
);
name = Resources;
sourceTree = "<group>";
@@ -1058,13 +1130,13 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
- 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */,
+ 6172554E12B3DCEE0098D069 /* Lua.xcodeproj */,
611E02EC11FA74580077A41E /* cocos2d-iphone.xcodeproj */,
611E0E4B11FA92130077A41E /* freetype.xcodeproj */,
617988D3114AAA3900BA94A9 /* SDLiPhoneOS.xcodeproj */,
6127232E117DF752005B90CF /* SDL_image.xcodeproj */,
- 617989B3114AB47500BA94A9 /* SDL_net.xcodeproj */,
6179898B114AB3FA00BA94A9 /* SDL_mixer.xcodeproj */,
+ 618E27B612A2C30700C20EF0 /* SDL_net.xcodeproj */,
61798A0B114AB65600BA94A9 /* SDL_ttf.xcodeproj */,
61798934114AB25F00BA94A9 /* AudioToolbox.framework */,
61A117FE1168322700359010 /* CoreGraphics.framework */,
@@ -1237,10 +1309,6 @@
6163EE7D11CC2600001C0453 /* SingleWeaponViewController.m */,
616591FE11CA9BA200D6E256 /* SingleSchemeViewController.h */,
616591FF11CA9BA200D6E256 /* SingleSchemeViewController.m */,
- 61C079E211F35A300072BF46 /* EditableCellView.h */,
- 61C079E311F35A300072BF46 /* EditableCellView.m */,
- 61F904D511DF7DA30068B24D /* WeaponCellView.h */,
- 61F904D611DF7DA30068B24D /* WeaponCellView.m */,
);
name = "Second Level";
sourceTree = "<group>";
@@ -1284,17 +1352,24 @@
name = Overlay;
sourceTree = "<group>";
};
+ 6172554F12B3DCEE0098D069 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 6172555512B3DCEE0098D069 /* Lua.app */,
+ 6172555712B3DCEE0098D069 /* libcocos2d libraries.a */,
+ 6172555912B3DCEE0098D069 /* libLua.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
61798892114AA56300BA94A9 /* inc */ = {
isa = PBXGroup;
children = (
61798852114AA44900BA94A9 /* config.inc */,
617987EB114AA34C00BA94A9 /* options.inc */,
- 618736B8118CA28600123B23 /* GearDrawing.inc */,
- 617987E1114AA34C00BA94A9 /* CCHandlers.inc */,
617987E4114AA34C00BA94A9 /* GSHandlers.inc */,
617987E5114AA34C00BA94A9 /* HHHandlers.inc */,
614E333D11DE9A93009DBA4E /* VGSHandlers.inc */,
- 617987F0114AA34C00BA94A9 /* SinTable.inc */,
);
name = inc;
sourceTree = "<group>";
@@ -1316,14 +1391,6 @@
name = Products;
sourceTree = "<group>";
};
- 617989B4114AB47500BA94A9 /* Products */ = {
- isa = PBXGroup;
- children = (
- 617989BB114AB47500BA94A9 /* libSDL_net.a */,
- );
- name = Products;
- sourceTree = "<group>";
- };
61798A0C114AB65600BA94A9 /* Products */ = {
isa = PBXGroup;
children = (
@@ -1335,54 +1402,69 @@
6179936611501D1E00BA94A9 /* Overlay */ = {
isa = PBXGroup;
children = (
- 611DA1CF124E5C6300008271 /* plus.png */,
- 611DA030124E2BC500008271 /* mediumBackground~ipad.png */,
611E0EE511FB20610077A41E /* ammoButton.png */,
+ 6103D399129B350700911D8D /* ammoButton@2x.png */,
611E0EE611FB20610077A41E /* cornerButton.png */,
+ 6103D39E129B350700911D8D /* cornerButton@2x.png */,
61EF920511DF57AC003441C4 /* arrowDown.png */,
+ 6103D39A129B350700911D8D /* arrowDown@2x.png */,
61EF920611DF57AC003441C4 /* arrowLeft.png */,
+ 6103D39B129B350700911D8D /* arrowLeft@2x.png */,
61EF920711DF57AC003441C4 /* arrowRight.png */,
+ 6103D39C129B350700911D8D /* arrowRight@2x.png */,
61EF920811DF57AC003441C4 /* arrowUp.png */,
- 614AE659127D090A0070BF5F /* smallerBackground@2x-iphone.png */,
- 614AE65A127D090A0070BF5F /* smallerBackground~ipad.png */,
- 614AE65B127D090A0070BF5F /* smallerBackground~iphone.png */,
- 61EF920911DF57AC003441C4 /* joyButton_attack.png */,
- 61EF920A11DF57AC003441C4 /* joyButton_backjump.png */,
- 61EF920B11DF57AC003441C4 /* joyButton_forwardjump.png */,
+ 6103D39D129B350700911D8D /* arrowUp@2x.png */,
+ 61EF920911DF57AC003441C4 /* joyButtonAttack.png */,
+ 6103D392129B34E900911D8D /* joyButtonAttack@2x.png */,
+ 61EF920A11DF57AC003441C4 /* joyButtonBackJump.png */,
+ 6103D393129B34E900911D8D /* joyButtonBackJump@2x.png */,
+ 61EF920B11DF57AC003441C4 /* joyButtonForwardJump.png */,
+ 6103D394129B34E900911D8D /* joyButtonForwardJump@2x.png */,
);
name = Overlay;
sourceTree = "<group>";
};
- 619C5AC1124F7DDF00D041AE /* Products */ = {
+ 618E27B712A2C30700C20EF0 /* Products */ = {
isa = PBXGroup;
children = (
- 619C5ACA124F7DDF00D041AE /* Lua.app */,
- 619C5ACC124F7DDF00D041AE /* libcocos2d libraries.a */,
- 619C5ACE124F7DDF00D041AE /* libLua.a */,
+ 618E27BB12A2C30700C20EF0 /* libSDL_net.a */,
);
name = Products;
sourceTree = "<group>";
};
- 61DE91561258B76800B80214 /* Custom Buttons */ = {
+ 61DE91561258B76800B80214 /* Custom UIs */ = {
isa = PBXGroup;
children = (
- 6165922711CA9BD500D6E256 /* HogButtonView.h */,
- 6165922811CA9BD500D6E256 /* HogButtonView.m */,
+ 619C5BA0124FA59000D041AE /* MapPreviewButtonView.h */,
+ 619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */,
+ 61F544C512AF1748007FD913 /* HoldTableViewCell.h */,
+ 61F544C612AF1748007FD913 /* HoldTableViewCell.m */,
6165922A11CA9BD500D6E256 /* SquareButtonView.h */,
6165922B11CA9BD500D6E256 /* SquareButtonView.m */,
- 619C5BA0124FA59000D041AE /* MapPreviewButtonView.h */,
- 619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */,
+ 61C079E211F35A300072BF46 /* EditableCellView.h */,
+ 61C079E311F35A300072BF46 /* EditableCellView.m */,
+ 61F904D511DF7DA30068B24D /* WeaponCellView.h */,
+ 61F904D611DF7DA30068B24D /* WeaponCellView.m */,
);
- name = "Custom Buttons";
+ name = "Custom UIs";
sourceTree = "<group>";
};
61F7A42811E2905C0040BA66 /* Icons */ = {
isa = PBXGroup;
children = (
+ 611DA1CF124E5C6300008271 /* plus.png */,
+ 6103D413129B417500911D8D /* plus@2x.png */,
+ 61F2E7EB12060E31005734F7 /* checkbox.png */,
+ 615FEAD912A2A4C10098EE92 /* checkbox@2x.png */,
+ 61D3D2A41290E03A003CE7C3 /* irc.png */,
+ 6103D384129B347700911D8D /* irc@2x.png */,
61E2F7421283752C00E12521 /* fb.png */,
+ 6103D383129B346A00911D8D /* fb@2x.png */,
61E2F7431283752C00E12521 /* tw.png */,
+ 6103D385129B348200911D8D /* tw@2x.png */,
6183D83C11E2BCE200A88903 /* Default-ipad-Landscape.png */,
6183D83D11E2BCE200A88903 /* Default.png */,
+ 6172FEA21298C7F900D73365 /* Default@2x.png */,
61F7A43111E290650040BA66 /* Icon-72.png */,
61F7A43211E290650040BA66 /* Icon-Small-50.png */,
61F7A43311E290650040BA66 /* Icon-Small.png */,
@@ -1397,19 +1479,28 @@
61F903FA11DF58680068B24D /* Frontend */ = {
isa = PBXGroup;
children = (
- 619C09E911E8B8D600F1DF16 /* title_small.png */,
- 61808A6E128C94E1005D0E2F /* backgroundTop.png */,
- 61F903E511DF58550068B24D /* backgroundCenter.png */,
- 61F903E911DF58550068B24D /* borderBottom.png */,
- 615AD96112073B4D00F2FF04 /* startGameButton.png */,
+ 6147DAD21253DCDE0010357E /* savesButton.png */,
+ 6172FEC81298CE4800D73365 /* savesButton@2x.png */,
+ 61F9040811DF58B00068B24D /* settingsButton.png */,
+ 6172FECA1298CE4E00D73365 /* settingsButton@2x.png */,
615AD9EA1207654E00F2FF04 /* helpButton.png */,
615AD9E8120764CA00F2FF04 /* backButton.png */,
- 61808A4A128C901B005D0E2F /* startButton.png */,
+ 6172FED31298CE6600D73365 /* backButton@2x.png */,
+ 615AD96112073B4D00F2FF04 /* startGameButton.png */,
+ 615FEADE12A2A6640098EE92 /* localplayButton@2x~iphone.png */,
+ 615FEAE012A2A6640098EE92 /* localplayButton~iphone.png */,
+ 615FEADF12A2A6640098EE92 /* localplayButton~ipad.png */,
+ 61F9040D11DF59D10068B24D /* netplayButton.png */,
61EBA62811DFF2BC0048B68A /* title.png */,
- 61F9040C11DF59D10068B24D /* localplayButton.png */,
- 61F9040D11DF59D10068B24D /* netplayButton.png */,
+ 618899811299516000D55FD6 /* title@2x.png */,
+ 61889984129995B500D55FD6 /* title~ipad.png */,
61F9040A11DF59370068B24D /* background.png */,
- 61EBA62C11DFF3310048B68A /* backgroundAndTitle.png */,
+ 6172FED61298CF9800D73365 /* background@2x~iphone.png */,
+ 6172FED71298CF9800D73365 /* background~iphone.png */,
+ 6172FEEB1298D25D00D73365 /* mediumBackground~ipad.png */,
+ 6172FEEC1298D25D00D73365 /* smallerBackground@2x~iphone.png */,
+ 6172FEEE1298D25D00D73365 /* smallerBackground~iphone.png */,
+ 6172FEED1298D25D00D73365 /* smallerBackground~ipad.png */,
);
name = Frontend;
sourceTree = "<group>";
@@ -1417,6 +1508,19 @@
9283015C0F10E48900CC5A3C /* Pascal Sources */ = {
isa = PBXGroup;
children = (
+ 61E5D68C12AB006F00566F29 /* uLandPainted.pas */,
+ 61A4A3A112A5CD56004D81E6 /* uCaptions.pas */,
+ 61A4A38912A5CCC2004D81E6 /* uCommandHandlers.pas */,
+ 61A4A38A12A5CCC2004D81E6 /* uCommands.pas */,
+ 61A4A38B12A5CCC2004D81E6 /* uDebug.pas */,
+ 61A4A38C12A5CCC2004D81E6 /* uGearsRender.pas */,
+ 61A4A38D12A5CCC2004D81E6 /* uRender.pas */,
+ 61A4A38E12A5CCC2004D81E6 /* uRenderUtils.pas */,
+ 61A4A38F12A5CCC2004D81E6 /* uSinTable.pas */,
+ 61A4A39012A5CCC2004D81E6 /* uTextures.pas */,
+ 61A4A39112A5CCC2004D81E6 /* uTypes.pas */,
+ 61A4A39212A5CCC2004D81E6 /* uUtils.pas */,
+ 61A4A39312A5CCC2004D81E6 /* uVariables.pas */,
61399012125D19C0003C2DC0 /* uMobile.pas */,
619C5AF3124F7E3100D041AE /* LuaPas.pas */,
61798892114AA56300BA94A9 /* inc */,
@@ -1526,8 +1630,8 @@
ProjectRef = 611E0E4B11FA92130077A41E /* freetype.xcodeproj */;
},
{
- ProductGroup = 619C5AC1124F7DDF00D041AE /* Products */;
- ProjectRef = 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */;
+ ProductGroup = 6172554F12B3DCEE0098D069 /* Products */;
+ ProjectRef = 6172554E12B3DCEE0098D069 /* Lua.xcodeproj */;
},
{
ProductGroup = 6127232F117DF752005B90CF /* Products */;
@@ -1538,8 +1642,8 @@
ProjectRef = 6179898B114AB3FA00BA94A9 /* SDL_mixer.xcodeproj */;
},
{
- ProductGroup = 617989B4114AB47500BA94A9 /* Products */;
- ProjectRef = 617989B3114AB47500BA94A9 /* SDL_net.xcodeproj */;
+ ProductGroup = 618E27B712A2C30700C20EF0 /* Products */;
+ ProjectRef = 618E27B612A2C30700C20EF0 /* SDL_net.xcodeproj */;
},
{
ProductGroup = 61798A0C114AB65600BA94A9 /* Products */;
@@ -2022,6 +2126,27 @@
remoteRef = 61272332117DF752005B90CF /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
+ 6172555512B3DCEE0098D069 /* Lua.app */ = {
+ isa = PBXReferenceProxy;
+ fileType = wrapper.application;
+ path = Lua.app;
+ remoteRef = 6172555412B3DCEE0098D069 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 6172555712B3DCEE0098D069 /* libcocos2d libraries.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = "libcocos2d libraries.a";
+ remoteRef = 6172555612B3DCEE0098D069 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 6172555912B3DCEE0098D069 /* libLua.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libLua.a;
+ remoteRef = 6172555812B3DCEE0098D069 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
617988DA114AAA3900BA94A9 /* libSDLiPhoneOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -2036,13 +2161,6 @@
remoteRef = 61798992114AB3FA00BA94A9 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- 617989BB114AB47500BA94A9 /* libSDL_net.a */ = {
- isa = PBXReferenceProxy;
- fileType = archive.ar;
- path = libSDL_net.a;
- remoteRef = 617989BA114AB47500BA94A9 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
61798A13114AB65600BA94A9 /* libSDL_ttf.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -2057,25 +2175,11 @@
remoteRef = 6184608B11DA8BF3000E1314 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- 619C5ACA124F7DDF00D041AE /* Lua.app */ = {
- isa = PBXReferenceProxy;
- fileType = wrapper.application;
- path = Lua.app;
- remoteRef = 619C5AC9124F7DDF00D041AE /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 619C5ACC124F7DDF00D041AE /* libcocos2d libraries.a */ = {
+ 618E27BB12A2C30700C20EF0 /* libSDL_net.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
- path = "libcocos2d libraries.a";
- remoteRef = 619C5ACB124F7DDF00D041AE /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 619C5ACE124F7DDF00D041AE /* libLua.a */ = {
- isa = PBXReferenceProxy;
- fileType = archive.ar;
- path = libLua.a;
- remoteRef = 619C5ACD124F7DDF00D041AE /* PBXContainerItemProxy */;
+ path = libSDL_net.a;
+ remoteRef = 618E27BA12A2C30700C20EF0 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
@@ -2086,8 +2190,6 @@
buildActionMask = 2147483647;
files = (
61536DF411CEAE7100D87A7E /* GameConfigViewController.xib in Resources */,
- 61A118D311683CD100359010 /* HedgewarsTitle.png in Resources */,
- 61799289114AE08700BA94A9 /* Data in Resources */,
61370653117B1D50004EE44A /* Entitlements-Distribution.plist in Resources */,
611E12FF117BBBDA0044B62F /* Entitlements-Development.plist in Resources */,
6165925311CA9CB400D6E256 /* MainMenuViewController-iPad.xib in Resources */,
@@ -2097,20 +2199,17 @@
61EF920F11DF57AC003441C4 /* arrowLeft.png in Resources */,
61EF921011DF57AC003441C4 /* arrowRight.png in Resources */,
61EF921111DF57AC003441C4 /* arrowUp.png in Resources */,
- 61EF921211DF57AC003441C4 /* joyButton_attack.png in Resources */,
- 61EF921311DF57AC003441C4 /* joyButton_backjump.png in Resources */,
- 61EF921411DF57AC003441C4 /* joyButton_forwardjump.png in Resources */,
+ 61EF921211DF57AC003441C4 /* joyButtonAttack.png in Resources */,
+ 61EF921311DF57AC003441C4 /* joyButtonBackJump.png in Resources */,
+ 61EF921411DF57AC003441C4 /* joyButtonForwardJump.png in Resources */,
61F9040911DF58B00068B24D /* settingsButton.png in Resources */,
61F9040B11DF59370068B24D /* background.png in Resources */,
- 61F9040E11DF59D10068B24D /* localplayButton.png in Resources */,
61EBA62A11DFF2BC0048B68A /* title.png in Resources */,
- 61EBA62D11DFF3310048B68A /* backgroundAndTitle.png in Resources */,
61F7A43811E290650040BA66 /* Icon-72.png in Resources */,
61F7A43911E290650040BA66 /* Icon-Small-50.png in Resources */,
61F7A43A11E290650040BA66 /* Icon-Small.png in Resources */,
61F7A43C11E290650040BA66 /* Icon.png in Resources */,
61F7A43E11E290650040BA66 /* iTunesArtwork.png in Resources */,
- 6183D83E11E2BCE200A88903 /* Default-ipad-Landscape.png in Resources */,
6129B9F711EFB04D0017E305 /* denied.png in Resources */,
611E0EE711FB20610077A41E /* ammoButton.png in Resources */,
611E0EE811FB20610077A41E /* cornerButton.png in Resources */,
@@ -2132,26 +2231,51 @@
61842B40122B66280096E335 /* helpleft.png in Resources */,
6199E86D12464A8E00DADF8C /* surprise.png in Resources */,
611D9BFC12497E9800008271 /* SavedGamesViewController.xib in Resources */,
- 611DA031124E2BC500008271 /* mediumBackground~ipad.png in Resources */,
611DA1D0124E5C6300008271 /* plus.png in Resources */,
6147DAD31253DCDE0010357E /* savesButton.png in Resources */,
610D5FB21270E2660033333A /* Icon-Small@2x.png in Resources */,
610D5FB31270E26C0033333A /* Icon@2x.png in Resources */,
- 61A670BE12747D8900B06CE7 /* borderBottom.png in Resources */,
61A670C012747D9B00B06CE7 /* Default.png in Resources */,
61A670C112747DB900B06CE7 /* MainMenuViewController-iPhone.xib in Resources */,
61A670C212747DBD00B06CE7 /* MapConfigViewController-iPhone.xib in Resources */,
- 61A670FB12747E0D00B06CE7 /* title_small.png in Resources */,
- 61A6710612747E4000B06CE7 /* backgroundCenter.png in Resources */,
- 614AE65D127D090A0070BF5F /* smallerBackground~ipad.png in Resources */,
- 614AE65E127D090A0070BF5F /* smallerBackground~iphone.png in Resources */,
61E2F7441283752C00E12521 /* fb.png in Resources */,
61E2F7451283752C00E12521 /* tw.png in Resources */,
61DF0EDC1284DF2300F3F10B /* HelpPageLobbyViewController-iPhone.xib in Resources */,
61DF0F211284F72A00F3F10B /* HelpPageInGameViewController-iPhone.xib in Resources */,
- 61808A4B128C901B005D0E2F /* startButton.png in Resources */,
61808A5D128C930A005D0E2F /* backSound.wav in Resources */,
- 61808A6F128C94E1005D0E2F /* backgroundTop.png in Resources */,
+ 61D3D2A51290E03A003CE7C3 /* irc.png in Resources */,
+ 6172FED91298CF9800D73365 /* background~iphone.png in Resources */,
+ 6172FEEF1298D25D00D73365 /* mediumBackground~ipad.png in Resources */,
+ 6172FEF11298D25D00D73365 /* smallerBackground~ipad.png in Resources */,
+ 6172FEF21298D25D00D73365 /* smallerBackground~iphone.png in Resources */,
+ 61889985129995B500D55FD6 /* title~ipad.png in Resources */,
+ 6103D414129B417500911D8D /* plus@2x.png in Resources */,
+ 615FEAE212A2A6640098EE92 /* localplayButton~ipad.png in Resources */,
+ 615FEAE312A2A6640098EE92 /* localplayButton~iphone.png in Resources */,
+ 61188BF212A6FE530026C5DA /* ammoButton@2x.png in Resources */,
+ 61188BF312A6FE540026C5DA /* arrowDown@2x.png in Resources */,
+ 61188BF412A6FE560026C5DA /* arrowLeft@2x.png in Resources */,
+ 61188BF512A6FE570026C5DA /* arrowRight@2x.png in Resources */,
+ 61188BF612A6FE590026C5DA /* arrowUp@2x.png in Resources */,
+ 61188BF712A6FE5A0026C5DA /* backButton@2x.png in Resources */,
+ 61188BF812A6FE5C0026C5DA /* background@2x~iphone.png in Resources */,
+ 61188BF912A6FE5D0026C5DA /* checkbox@2x.png in Resources */,
+ 61188BFA12A6FE5E0026C5DA /* cornerButton@2x.png in Resources */,
+ 61188BFB12A6FE610026C5DA /* Default-ipad-Landscape.png in Resources */,
+ 61188BFC12A6FE630026C5DA /* Default@2x.png in Resources */,
+ 61188BFD12A6FE730026C5DA /* fb@2x.png in Resources */,
+ 61188BFE12A6FE7C0026C5DA /* irc@2x.png in Resources */,
+ 61188BFF12A6FE7E0026C5DA /* joyButtonAttack@2x.png in Resources */,
+ 61188C0012A6FE810026C5DA /* joyButtonBackJump@2x.png in Resources */,
+ 61188C0112A6FE820026C5DA /* joyButtonForwardJump@2x.png in Resources */,
+ 61188C0212A6FE840026C5DA /* localplayButton@2x~iphone.png in Resources */,
+ 61188C0312A6FE860026C5DA /* netplayButton.png in Resources */,
+ 61188C0412A6FE880026C5DA /* savesButton@2x.png in Resources */,
+ 61188C0512A6FE8F0026C5DA /* Data in Resources */,
+ 61188C0612A6FE950026C5DA /* smallerBackground@2x~iphone.png in Resources */,
+ 61188C0712A6FE960026C5DA /* settingsButton@2x.png in Resources */,
+ 61188C0812A6FE9A0026C5DA /* title@2x.png in Resources */,
+ 61188C0912A6FE9C0026C5DA /* tw@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2169,7 +2293,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\nmkdir ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/btn*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/ammopic.png ${PROJECT_DIR}/Data/Graphics/Btn/iconAmmo.png\ncp ${PROJECT_DIR}/../../QTfrontend/res/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels\n\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg -delete\nfind ${PROJECT_DIR}/Data -name *.svgz -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\nfind ${PROJECT_DIR}/Data -name *.orig -delete\n\n#delete desktop frontend translation\nrm -rf ${PROJECT_DIR}/Data/Locale/hedgewars_*\n\n#delete dummy maps and hats\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,Ruler}\nrm -rf ${PROJECT_DIR}/Data/Hats/{TeamCap,TeamHeadband,TeamHair}\n\n#copy mono audio\ncp -R ${PROJECT_DIR}/audio/* ${PROJECT_DIR}/Data/\n\n#the following ones must be removed\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese,FlightJoust}\n\n#move Lua maps in Missions\nmkdir ${PROJECT_DIR}/Data/Missions/Maps/\nmv ${PROJECT_DIR}/Data/Maps/{Basketball,Knockball,TrophyRace} ${PROJECT_DIR}/Data/Missions/Maps/\n\n#reduce the number of flakes for City\nawk '{if ($1 == 1500) $1=40; print $0}' < ${PROJECT_DIR}/Data/Themes/City/theme.cfg > /tmp/tempfile\nmv /tmp/tempfile ${PROJECT_DIR}/Data/Themes/City/theme.cfg\n\n#remove Isalnd from the list of Themes\nawk '{if ($1 != \"Island\") print $0}' < ${PROJECT_DIR}/Data/Themes/themes.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Themes/themes.cfg\n\n#remove Isalnd from the Maps and themes\nrm -rf ${PROJECT_DIR}/Data/Themes/Island\nawk '{if ($1 == \"Island\") print \"Nature\"}' < ${PROJECT_DIR}/Data/Maps/Cave/map.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Maps/Cave/map.cfg\nawk '{if ($1 == \"Island\") print \"Nature\"}' < ${PROJECT_DIR}/Data/Maps/Lonely_Island/map.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Maps/Lonely_Island/map.cfg\nawk '{if ($1 == \"Island\") print \"Nature\"}' < ${PROJECT_DIR}/Data/Maps/PirateFlag/map.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Maps/PirateFlag/map.cfg\n\n#delete the Classic voice\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/Classic\n\n#delete useless fonts\nrm -rf ${PROJECT_DIR}/Data/Fonts/{wqy-zenhei.ttc,DroidSansFallback.ttf}\n\n#delete all names, reserved hats\nrm -rf ${PROJECT_DIR}/Data/Names/\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/\n";
+ shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\nmkdir ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/btn*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/ammopic.png ${PROJECT_DIR}/Data/Graphics/Btn/iconAmmo.png\ncp ${PROJECT_DIR}/../../QTfrontend/res/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels\n\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg -delete\nfind ${PROJECT_DIR}/Data -name *.svgz -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\nfind ${PROJECT_DIR}/Data -name *.orig -delete\n\n#delete desktop frontend translation\nrm -rf ${PROJECT_DIR}/Data/Locale/hedgewars_*\n\n#delete dummy maps and hats\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,Ruler}\nrm -rf ${PROJECT_DIR}/Data/Hats/{TeamCap,TeamHeadband,TeamHair}\nrm -rf ${PROJECT_DIR}/Data/misc/\n\n#copy mono audio\ncp -R ${PROJECT_DIR}/audio/* ${PROJECT_DIR}/Data/\n\n#the following ones must be removed\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese,FlightJoust}\n\n#move Lua maps in Missions\nmkdir ${PROJECT_DIR}/Data/Missions/Maps/\nmv ${PROJECT_DIR}/Data/Maps/{Basketball,Knockball,TrophyRace} ${PROJECT_DIR}/Data/Missions/Maps/\n\n#reduce the number of flakes for City\nawk '{if ($1 == 1500) $1=40; print $0}' < ${PROJECT_DIR}/Data/Themes/City/theme.cfg > /tmp/tempfile\nmv /tmp/tempfile ${PROJECT_DIR}/Data/Themes/City/theme.cfg\n\n#remove Isalnd from the list of Themes\nawk '{if ($1 != \"Island\") print $0}' < ${PROJECT_DIR}/Data/Themes/themes.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Themes/themes.cfg\n\n#remove Isalnd from the Maps and themes\nrm -rf ${PROJECT_DIR}/Data/Themes/Island\nawk '{if ($1 == \"Island\") print \"Nature\"}' < ${PROJECT_DIR}/Data/Maps/Cave/map.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Maps/Cave/map.cfg\nawk '{if ($1 == \"Island\") print \"Nature\"}' < ${PROJECT_DIR}/Data/Maps/Lonely_Island/map.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Maps/Lonely_Island/map.cfg\nawk '{if ($1 == \"Island\") print \"Nature\"}' < ${PROJECT_DIR}/Data/Maps/PirateFlag/map.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Maps/PirateFlag/map.cfg\n\n#delete the Classic voice\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/Classic\n\n#delete useless fonts\nrm -rf ${PROJECT_DIR}/Data/Fonts/{wqy-zenhei.ttc,DroidSansFallback.ttf}\n\n#delete all names, reserved hats\nrm -rf ${PROJECT_DIR}/Data/Names/\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/\n";
showEnvVarsInLog = 0;
};
9283011B0F10CB2D00CC5A3C /* Build libfpc.a */ = {
@@ -2266,7 +2390,6 @@
6165922211CA9BA200D6E256 /* WeaponSettingsViewController.m in Sources */,
6165922E11CA9BD500D6E256 /* CGPointUtils.c in Sources */,
6165922F11CA9BD500D6E256 /* CommodityFunctions.m in Sources */,
- 6165923011CA9BD500D6E256 /* HogButtonView.m in Sources */,
6165923111CA9BD500D6E256 /* SquareButtonView.m in Sources */,
6165923211CA9BD500D6E256 /* UIImageExtra.m in Sources */,
6165929E11CA9E2F00D6E256 /* SDL_uikitappdelegate.m in Sources */,
@@ -2284,6 +2407,23 @@
61DE8F221257EB1100B80214 /* AmmoMenuViewController.m in Sources */,
61399013125D19C0003C2DC0 /* uMobile.pas in Sources */,
61D205A1127CDD1100ABD83E /* ObjcExports.m in Sources */,
+ 61006F95128DE31F00EBA7F7 /* CreationChamber.m in Sources */,
+ 61A4A39412A5CCC2004D81E6 /* uCommandHandlers.pas in Sources */,
+ 61A4A39512A5CCC2004D81E6 /* uCommands.pas in Sources */,
+ 61A4A39612A5CCC2004D81E6 /* uDebug.pas in Sources */,
+ 61A4A39712A5CCC2004D81E6 /* uGearsRender.pas in Sources */,
+ 61A4A39812A5CCC2004D81E6 /* uRender.pas in Sources */,
+ 61A4A39912A5CCC2004D81E6 /* uRenderUtils.pas in Sources */,
+ 61A4A39A12A5CCC2004D81E6 /* uSinTable.pas in Sources */,
+ 61A4A39B12A5CCC2004D81E6 /* uTextures.pas in Sources */,
+ 61A4A39C12A5CCC2004D81E6 /* uTypes.pas in Sources */,
+ 61A4A39D12A5CCC2004D81E6 /* uUtils.pas in Sources */,
+ 61A4A39E12A5CCC2004D81E6 /* uVariables.pas in Sources */,
+ 61A4A3A212A5CD56004D81E6 /* uCaptions.pas in Sources */,
+ 61E5D68D12AB006F00566F29 /* uLandPainted.pas in Sources */,
+ 61F544C712AF1748007FD913 /* HoldTableViewCell.m in Sources */,
+ 61AC067412B2E32D000B52A2 /* Appirater.m in Sources */,
+ 61E2E12E12BAAEE30051B659 /* ServerSetup.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2352,8 +2492,8 @@
buildSettings = {
APPLY_RULES_IN_COPY_FILES = YES;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- CODE_SIGN_IDENTITY = "iPhone Distribution: Vittorio Giovara";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Vittorio Giovara";
+ CODE_SIGN_IDENTITY = "Don't Code Sign";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Don't Code Sign";
FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B -Sgix";
FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.5.1;
FPC_MAIN_FILE = "$(PROJECT_DIR)/../../hedgewars/hwLibrary.pas";
@@ -2379,14 +2519,15 @@
);
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
ONLY_ACTIVE_ARCH = NO;
+ OTHER_CODE_SIGN_FLAGS = "";
OTHER_LDFLAGS = (
"-lz",
"-Wl,-no_order_inits",
);
PREBINDING = NO;
- PROVISIONING_PROFILE = "450C4020-346A-4F44-8DDE-E71300796C94";
- "PROVISIONING_PROFILE[sdk=iphoneos*]" = "450C4020-346A-4F44-8DDE-E71300796C94";
- SDKROOT = iphoneos4.1;
+ PROVISIONING_PROFILE = "";
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "armv7 armv6";
@@ -2480,7 +2621,7 @@
PREBINDING = NO;
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "armv7 armv6";
@@ -2573,7 +2714,7 @@
"-Wl,-no_order_inits",
);
PREBINDING = NO;
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = NO;
VALID_ARCHS = "armv7 armv6";
@@ -2689,7 +2830,7 @@
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
GCC_STRICT_ALIASING = YES;
GCC_THUMB_SUPPORT = NO;
- GCC_VERSION = com.apple.compilers.llvmgcc42;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
@@ -2706,7 +2847,7 @@
"-Wl,-no_order_inits",
);
PREBINDING = NO;
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = NO;
VALID_ARCHS = "armv7 armv6";
@@ -2752,7 +2893,7 @@
PREBINDING = NO;
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = NO;
VALID_ARCHS = "armv7 armv6";
--- a/project_files/HedgewarsMobile/Info.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Info.plist Sun Dec 19 13:31:55 2010 -0500
@@ -28,11 +28,9 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.2</string>
+ <string>1.2.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
- <key>UIApplicationExitsOnSuspend</key>
- <true/>
<key>UILaunchImageFile~ipad</key>
<string>Default-ipad</string>
<key>UIStatusBarHidden</key>
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/backButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/background.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/backgroundAndTitle.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/helpButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/localplayButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/netplayButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/startGameButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/title.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPhone/backgroundCenter.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPhone/backgroundTop.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPhone/borderBottom.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPhone/startButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend-iPhone/title_small.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/backButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/backButton@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/background.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/background@2x~iphone.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/background~iphone.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/helpButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/localplayButton@2x~iphone.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/localplayButton~ipad.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/localplayButton~iphone.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/mediumBackground~ipad.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/netplayButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/savesButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/savesButton@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/settingsButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/settingsButton@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/smallerBackground@2x~iphone.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/smallerBackground~ipad.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/smallerBackground~iphone.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/startGameButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/title.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/title@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/title~ipad.png has changed
--- a/project_files/HedgewarsMobile/Resources/GameConfigViewController.xib Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/GameConfigViewController.xib Sun Dec 19 13:31:55 2010 -0500
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1024</int>
+ <int key="IBDocument.SystemTarget">1056</int>
<string key="IBDocument.SystemVersion">10H574</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">123</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -50,7 +50,7 @@
<object class="IBUISegmentedControl" id="563596142">
<reference key="NSNextResponder" ref="836721772"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{87, 8}, {265, 30}}</string>
+ <string key="NSFrame">{{96, 8}, {269, 30}}</string>
<reference key="NSSuperview" ref="836721772"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">12345</int>
@@ -120,7 +120,6 @@
</object>
<object class="IBUIBarButtonItem" id="530186890">
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <float key="IBUIWidth">265</float>
<reference key="IBUICustomView" ref="563596142"/>
<reference key="IBUIToolbar" ref="836721772"/>
</object>
@@ -131,9 +130,9 @@
</object>
<object class="IBUIBarButtonItem" id="919181414">
<int key="IBUITag">1</int>
- <string key="IBUITitle">Start Game</string>
+ <string key="IBUITitle">Start</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <float key="IBUIWidth">90</float>
+ <float key="IBUIWidth">68</float>
<int key="IBUIStyle">2</int>
<reference key="IBUIToolbar" ref="836721772"/>
</object>
@@ -535,6 +534,13 @@
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
@@ -588,7 +594,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -597,6 +603,6 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../Hedgewars.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">123</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
--- a/project_files/HedgewarsMobile/Resources/HelpPageInGameViewController-iPhone.xib Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/HelpPageInGameViewController-iPhone.xib Sun Dec 19 13:31:55 2010 -0500
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1024</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10H574</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">123</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -42,42 +42,16 @@
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUIScrollView" id="400316535">
+ <object class="IBUIScrollView" id="480371523">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUILabel" id="827961215">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="806535969">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{13, 3}, {440, 30}}</string>
- <reference key="NSSuperview" ref="400316535"/>
- <bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClipsSubviews">YES</bool>
- <int key="IBUIContentMode">7</int>
- <bool key="IBUIUserInteractionEnabled">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <string key="IBUIText">Here you can find help for the various game elements.</string>
- <object class="NSFont" key="IBUIFont">
- <string key="NSName">Helvetica-Oblique</string>
- <double key="NSSize">16</double>
- <int key="NSfFlags">16</int>
- </object>
- <object class="NSColor" key="IBUITextColor" id="283637272">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MCAwIDAAA</bytes>
- </object>
- <nil key="IBUIHighlightedColor"/>
- <int key="IBUIBaselineAdjustment">1</int>
- <float key="IBUIMinimumFontSize">10</float>
- <int key="IBUINumberOfLines">0</int>
- <int key="IBUITextAlignment">1</int>
- </object>
- <object class="IBUILabel" id="337977618">
- <reference key="NSNextResponder" ref="400316535"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 311}, {150, 22}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{20, 283}, {150, 22}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -89,16 +63,19 @@
<double key="NSSize">18</double>
<int key="NSfFlags">16</int>
</object>
- <reference key="IBUITextColor" ref="283637272"/>
+ <object class="NSColor" key="IBUITextColor" id="283637272">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAwIDAAA</bytes>
+ </object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
</object>
- <object class="IBUILabel" id="451019636">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="837055082">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 320}, {203, 85}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{20, 292}, {203, 85}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -116,11 +93,11 @@
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">0</int>
</object>
- <object class="IBUILabel" id="408507086">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="669645325">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 41}, {186, 22}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{20, 13}, {186, 22}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -133,11 +110,11 @@
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
</object>
- <object class="IBUILabel" id="904797875">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="392421036">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 62}, {187, 43}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{20, 34}, {187, 43}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -151,17 +128,17 @@
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">0</int>
</object>
- <object class="IBUILabel" id="549219303">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="709427542">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{217, 336}, {243, 22}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{217, 308}, {243, 22}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <string key="IBUIText">Pinch to return</string>
+ <string key="IBUIText">Touch interface</string>
<reference key="IBUIFont" ref="583365693"/>
<reference key="IBUITextColor" ref="283637272"/>
<nil key="IBUIHighlightedColor"/>
@@ -169,11 +146,11 @@
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">2</int>
</object>
- <object class="IBUILabel" id="430607879">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="748437184">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{231, 356}, {229, 87}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{231, 328}, {229, 87}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -188,11 +165,11 @@
<int key="IBUINumberOfLines">0</int>
<int key="IBUITextAlignment">2</int>
</object>
- <object class="IBUILabel" id="56917735">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="941791832">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 113}, {186, 22}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{20, 85}, {186, 22}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -205,11 +182,11 @@
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
</object>
- <object class="IBUILabel" id="147310378">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="26100154">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 129}, {191, 63}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{20, 101}, {191, 63}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -223,11 +200,11 @@
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">0</int>
</object>
- <object class="IBUILabel" id="323195165">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="413836006">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 200}, {203, 22}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{20, 172}, {203, 22}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -240,11 +217,11 @@
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
</object>
- <object class="IBUILabel" id="1047547119">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="579557686">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 219}, {203, 85}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{20, 191}, {203, 85}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -258,11 +235,11 @@
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">4</int>
</object>
- <object class="IBUILabel" id="160523547">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="740577465">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{274, 41}, {186, 22}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{274, 13}, {186, 22}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -276,11 +253,11 @@
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">2</int>
</object>
- <object class="IBUILabel" id="341620427">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="347724774">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{273, 63}, {187, 43}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{273, 35}, {187, 43}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -295,11 +272,11 @@
<int key="IBUINumberOfLines">0</int>
<int key="IBUITextAlignment">2</int>
</object>
- <object class="IBUILabel" id="869619534">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="318624215">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{351, 110}, {109, 22}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{351, 82}, {109, 22}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -313,11 +290,11 @@
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">2</int>
</object>
- <object class="IBUILabel" id="16268121">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="145842014">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{246, 133}, {214, 84}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{246, 105}, {214, 84}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -332,11 +309,11 @@
<int key="IBUINumberOfLines">0</int>
<int key="IBUITextAlignment">2</int>
</object>
- <object class="IBUILabel" id="577051094">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="415037922">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{325, 225}, {135, 22}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{325, 197}, {135, 22}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -350,11 +327,11 @@
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">2</int>
</object>
- <object class="IBUILabel" id="420793299">
- <reference key="NSNextResponder" ref="400316535"/>
+ <object class="IBUILabel" id="499026341">
+ <reference key="NSNextResponder" ref="480371523"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{249, 245}, {211, 85}}</string>
- <reference key="NSSuperview" ref="400316535"/>
+ <string key="NSFrame">{{249, 217}, {211, 85}}</string>
+ <reference key="NSSuperview" ref="480371523"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
@@ -370,13 +347,34 @@
<int key="IBUITextAlignment">2</int>
</object>
</object>
- <string key="NSFrameSize">{480, 320}</string>
+ <string key="NSFrame">{{-5, 44}, {489, 332}}</string>
<reference key="NSSuperview" ref="766721923"/>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<int key="IBUITag">1</int>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
+ <object class="IBUINavigationBar" id="126317414">
+ <reference key="NSNextResponder" ref="766721923"/>
+ <int key="NSvFlags">290</int>
+ <string key="NSFrame">{{-1, 0}, {481, 44}}</string>
+ <reference key="NSSuperview" ref="766721923"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSArray" key="IBUIItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUINavigationItem" id="477618874">
+ <reference key="IBUINavigationBar" ref="126317414"/>
+ <string key="IBUITitle">Help page</string>
+ <object class="IBUIBarButtonItem" key="IBUILeftBarButtonItem" id="843591489">
+ <string key="IBUITitle">Back</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIStyle">1</int>
+ <reference key="IBUINavigationItem" ref="477618874"/>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ </object>
</object>
<string key="NSFrameSize">{480, 320}</string>
<reference key="NSSuperview"/>
@@ -403,12 +401,20 @@
<int key="connectionID">3</int>
</object>
<object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">dismiss</string>
+ <reference key="source" ref="843591489"/>
+ <reference key="destination" ref="841351856"/>
+ </object>
+ <int key="connectionID">141</int>
+ </object>
+ <object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">scrollView</string>
<reference key="source" ref="841351856"/>
- <reference key="destination" ref="400316535"/>
+ <reference key="destination" ref="480371523"/>
</object>
- <int key="connectionID">115</int>
+ <int key="connectionID">142</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -436,119 +442,137 @@
<reference key="object" ref="766721923"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="400316535"/>
+ <reference ref="126317414"/>
+ <reference ref="480371523"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">97</int>
- <reference key="object" ref="400316535"/>
+ <int key="objectID">118</int>
+ <reference key="object" ref="126317414"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="477618874"/>
+ </object>
+ <reference key="parent" ref="766721923"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">121</int>
+ <reference key="object" ref="480371523"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="420793299"/>
- <reference ref="577051094"/>
- <reference ref="16268121"/>
- <reference ref="869619534"/>
- <reference ref="341620427"/>
- <reference ref="160523547"/>
- <reference ref="430607879"/>
- <reference ref="1047547119"/>
- <reference ref="323195165"/>
- <reference ref="451019636"/>
- <reference ref="337977618"/>
- <reference ref="147310378"/>
- <reference ref="56917735"/>
- <reference ref="408507086"/>
- <reference ref="904797875"/>
- <reference ref="827961215"/>
- <reference ref="549219303"/>
+ <reference ref="709427542"/>
+ <reference ref="392421036"/>
+ <reference ref="669645325"/>
+ <reference ref="941791832"/>
+ <reference ref="26100154"/>
+ <reference ref="806535969"/>
+ <reference ref="837055082"/>
+ <reference ref="413836006"/>
+ <reference ref="579557686"/>
+ <reference ref="748437184"/>
+ <reference ref="740577465"/>
+ <reference ref="347724774"/>
+ <reference ref="318624215"/>
+ <reference ref="145842014"/>
+ <reference ref="415037922"/>
+ <reference ref="499026341"/>
</object>
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">98</int>
- <reference key="object" ref="420793299"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">122</int>
+ <reference key="object" ref="709427542"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">99</int>
- <reference key="object" ref="577051094"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">124</int>
+ <reference key="object" ref="392421036"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">100</int>
- <reference key="object" ref="16268121"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">125</int>
+ <reference key="object" ref="669645325"/>
+ <reference key="parent" ref="480371523"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">126</int>
+ <reference key="object" ref="941791832"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">101</int>
- <reference key="object" ref="869619534"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">127</int>
+ <reference key="object" ref="26100154"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">102</int>
- <reference key="object" ref="341620427"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">128</int>
+ <reference key="object" ref="806535969"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">103</int>
- <reference key="object" ref="160523547"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">129</int>
+ <reference key="object" ref="837055082"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">104</int>
- <reference key="object" ref="430607879"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">130</int>
+ <reference key="object" ref="413836006"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">105</int>
- <reference key="object" ref="1047547119"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">131</int>
+ <reference key="object" ref="579557686"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">106</int>
- <reference key="object" ref="323195165"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">132</int>
+ <reference key="object" ref="748437184"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">107</int>
- <reference key="object" ref="451019636"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">133</int>
+ <reference key="object" ref="740577465"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">108</int>
- <reference key="object" ref="337977618"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">134</int>
+ <reference key="object" ref="347724774"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">109</int>
- <reference key="object" ref="147310378"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">135</int>
+ <reference key="object" ref="318624215"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">110</int>
- <reference key="object" ref="56917735"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">136</int>
+ <reference key="object" ref="145842014"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">111</int>
- <reference key="object" ref="408507086"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">137</int>
+ <reference key="object" ref="415037922"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">112</int>
- <reference key="object" ref="904797875"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">138</int>
+ <reference key="object" ref="499026341"/>
+ <reference key="parent" ref="480371523"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">113</int>
- <reference key="object" ref="827961215"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">119</int>
+ <reference key="object" ref="477618874"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="843591489"/>
+ </object>
+ <reference key="parent" ref="126317414"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">114</int>
- <reference key="object" ref="549219303"/>
- <reference key="parent" ref="400316535"/>
+ <int key="objectID">140</int>
+ <reference key="object" ref="843591489"/>
+ <reference key="parent" ref="477618874"/>
</object>
</object>
</object>
@@ -558,46 +582,48 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
- <string>100.IBPluginDependency</string>
- <string>100.IBViewBoundsToFrameTransform</string>
- <string>101.IBPluginDependency</string>
- <string>101.IBViewBoundsToFrameTransform</string>
- <string>102.IBPluginDependency</string>
- <string>102.IBViewBoundsToFrameTransform</string>
- <string>103.IBPluginDependency</string>
- <string>103.IBViewBoundsToFrameTransform</string>
- <string>104.IBPluginDependency</string>
- <string>104.IBViewBoundsToFrameTransform</string>
- <string>105.IBPluginDependency</string>
- <string>105.IBViewBoundsToFrameTransform</string>
- <string>106.IBPluginDependency</string>
- <string>106.IBViewBoundsToFrameTransform</string>
- <string>107.IBPluginDependency</string>
- <string>107.IBViewBoundsToFrameTransform</string>
- <string>108.IBPluginDependency</string>
- <string>108.IBViewBoundsToFrameTransform</string>
- <string>109.IBPluginDependency</string>
- <string>109.IBViewBoundsToFrameTransform</string>
- <string>110.IBPluginDependency</string>
- <string>110.IBViewBoundsToFrameTransform</string>
- <string>111.IBPluginDependency</string>
- <string>111.IBViewBoundsToFrameTransform</string>
- <string>112.IBPluginDependency</string>
- <string>112.IBViewBoundsToFrameTransform</string>
- <string>113.IBPluginDependency</string>
- <string>113.IBViewBoundsToFrameTransform</string>
- <string>114.IBPluginDependency</string>
- <string>114.IBViewBoundsToFrameTransform</string>
+ <string>118.IBPluginDependency</string>
+ <string>118.IBViewBoundsToFrameTransform</string>
+ <string>119.IBPluginDependency</string>
+ <string>121.IBEditorWindowLastContentRect</string>
+ <string>121.IBPluginDependency</string>
+ <string>121.IBViewBoundsToFrameTransform</string>
+ <string>122.IBPluginDependency</string>
+ <string>122.IBViewBoundsToFrameTransform</string>
+ <string>124.IBPluginDependency</string>
+ <string>124.IBViewBoundsToFrameTransform</string>
+ <string>125.IBPluginDependency</string>
+ <string>125.IBViewBoundsToFrameTransform</string>
+ <string>126.IBPluginDependency</string>
+ <string>126.IBViewBoundsToFrameTransform</string>
+ <string>127.IBPluginDependency</string>
+ <string>127.IBViewBoundsToFrameTransform</string>
+ <string>128.IBPluginDependency</string>
+ <string>128.IBViewBoundsToFrameTransform</string>
+ <string>129.IBPluginDependency</string>
+ <string>129.IBViewBoundsToFrameTransform</string>
+ <string>130.IBPluginDependency</string>
+ <string>130.IBViewBoundsToFrameTransform</string>
+ <string>131.IBPluginDependency</string>
+ <string>131.IBViewBoundsToFrameTransform</string>
+ <string>132.IBPluginDependency</string>
+ <string>132.IBViewBoundsToFrameTransform</string>
+ <string>133.IBPluginDependency</string>
+ <string>133.IBViewBoundsToFrameTransform</string>
+ <string>134.IBPluginDependency</string>
+ <string>134.IBViewBoundsToFrameTransform</string>
+ <string>135.IBPluginDependency</string>
+ <string>135.IBViewBoundsToFrameTransform</string>
+ <string>136.IBPluginDependency</string>
+ <string>136.IBViewBoundsToFrameTransform</string>
+ <string>137.IBPluginDependency</string>
+ <string>137.IBViewBoundsToFrameTransform</string>
+ <string>138.IBPluginDependency</string>
+ <string>138.IBViewBoundsToFrameTransform</string>
+ <string>140.IBPluginDependency</string>
<string>2.IBEditorWindowLastContentRect</string>
<string>2.IBPluginDependency</string>
<string>2.IBViewBoundsToFrameTransform</string>
- <string>97.IBEditorWindowLastContentRect</string>
- <string>97.IBPluginDependency</string>
- <string>97.IBViewBoundsToFrameTransform</string>
- <string>98.IBPluginDependency</string>
- <string>98.IBViewBoundsToFrameTransform</string>
- <string>99.IBPluginDependency</string>
- <string>99.IBViewBoundsToFrameTransform</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -605,11 +631,57 @@
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDdgAAw1oAAA</bytes>
+ <bytes key="NSTransformStruct">AQAAAADAQAAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{589, 578}, {480, 320}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">AcCgAABCMAAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDZwAAw7aAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABCVAAAwx8AAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAwnQAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABCxgAAwtYAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDr4AAwwUAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABCxgAAwyQAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw+SAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAxARAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw6aAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw8+AAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDZwAAw+EAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDiQAAwmwAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
@@ -617,69 +689,25 @@
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDiQAAwmwAAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDZwAAw+EAAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw8+AAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw6aAAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAxARAAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw+SAAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABCxgAAwyQAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDr4AAwwUAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABCxgAAwtYAAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAwnQAAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABCVAAAwx8AAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDdgAAw1oAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABBUAAAwnQAAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDZwAAw7aAAA</bytes>
- </object>
- <string>{{606, 570}, {480, 320}}</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw4kAAA</bytes>
- </object>
- <string>{{589, 578}, {480, 320}}</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw58AAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDooAAw3gAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDeQAAw6aAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{165, 514}, {480, 320}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDooAAw3gAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw4kAAA</bytes>
</object>
</object>
</object>
@@ -699,7 +727,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">115</int>
+ <int key="maxID">142</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -843,6 +871,22 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">UIBarButtonItem</string>
+ <string key="superclassName">UIBarItem</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIBarItem</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">UILabel</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -851,6 +895,19 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">UINavigationBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="847596400">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UINavigationItem</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="847596400"/>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="786211723"/>
@@ -883,6 +940,13 @@
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
@@ -936,7 +1000,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -945,6 +1009,6 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../Hedgewars.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">123</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
Binary file project_files/HedgewarsMobile/Resources/Icons/Default.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/Default@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/checkbox.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/checkbox@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/fb.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/fb@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/irc.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/irc@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/plus.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/plus@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/tw.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icons/tw@2x.png has changed
--- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Sun Dec 19 13:31:55 2010 -0500
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1024</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">788</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10H574</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">117</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -51,7 +51,7 @@
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
- <string key="NSResourceName">backgroundAndTitle.png</string>
+ <string key="NSResourceName">background.png</string>
</object>
</object>
<object class="IBUIButton" id="867308721">
@@ -72,7 +72,6 @@
<double key="IBUITitleEdgeInsets.bottom">0.0</double>
<double key="IBUITitleEdgeInsets.left">0.0</double>
<double key="IBUITitleEdgeInsets.right">0.0</double>
- <string key="IBUINormalTitle">Single Game</string>
<object class="NSColor" key="IBUIHighlightedTitleColor" id="918890028">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
@@ -85,15 +84,15 @@
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
- <object class="NSCustomResource" key="IBUINormalBackgroundImage">
+ <object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
- <string key="NSResourceName">localplayButton.png</string>
+ <string key="NSResourceName">localplayButton~ipad.png</string>
</object>
</object>
<object class="IBUIButton" id="95106947">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{788, 300}, {18, 19}}</string>
+ <string key="NSFrame">{{795, 317}, {18, 19}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<float key="IBUIAlpha">0.31690141558647156</float>
@@ -114,7 +113,7 @@
<object class="IBUIButton" id="898948205">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{932, 686}, {72, 62}}</string>
+ <string key="NSFrame">{{940, 686}, {64, 64}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">2</int>
@@ -136,7 +135,7 @@
<object class="IBUIButton" id="894101036">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 686}, {72, 62}}</string>
+ <string key="NSFrame">{{20, 686}, {64, 64}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">4</int>
@@ -155,6 +154,18 @@
<string key="NSResourceName">savesButton.png</string>
</object>
</object>
+ <object class="IBUIImageView" id="1019880682">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{242, 43}, {540, 300}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">title~ipad.png</string>
+ </object>
+ </object>
</object>
<string key="NSFrameSize">{1024, 768}</string>
<reference key="NSSuperview"/>
@@ -231,10 +242,11 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="976741091"/>
+ <reference ref="867308721"/>
+ <reference ref="95106947"/>
<reference ref="898948205"/>
- <reference ref="867308721"/>
<reference ref="894101036"/>
- <reference ref="95106947"/>
+ <reference ref="1019880682"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -275,6 +287,11 @@
<reference key="object" ref="894101036"/>
<reference key="parent" ref="191373211"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">90</int>
+ <reference key="object" ref="1019880682"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -288,8 +305,13 @@
<string>37.IBPluginDependency</string>
<string>39.IBPluginDependency</string>
<string>45.IBPluginDependency</string>
+ <string>45.IBViewBoundsToFrameTransform</string>
<string>52.IBPluginDependency</string>
+ <string>52.IBViewBoundsToFrameTransform</string>
<string>88.IBPluginDependency</string>
+ <string>88.IBViewBoundsToFrameTransform</string>
+ <string>90.IBPluginDependency</string>
+ <string>90.IBViewBoundsToFrameTransform</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -300,8 +322,21 @@
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABERQAAw56AAA</bytes>
+ </object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABEaQAAxDsAAA</bytes>
+ </object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAxDsAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDbQAAw6qAAA</bytes>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -320,7 +355,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">89</int>
+ <int key="maxID">90</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -501,6 +536,13 @@
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
@@ -554,7 +596,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -567,19 +609,21 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>backgroundAndTitle.png</string>
- <string>localplayButton.png</string>
+ <string>background.png</string>
+ <string>localplayButton~ipad.png</string>
<string>savesButton.png</string>
<string>settingsButton.png</string>
+ <string>title~ipad.png</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{1024, 768}</string>
<string>{263, 244}</string>
- <string>{61, 59}</string>
- <string>{61, 59}</string>
+ <string>{64, 64}</string>
+ <string>{64, 64}</string>
+ <string>{540, 300}</string>
</object>
</object>
- <string key="IBCocoaTouchPluginVersion">117</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
--- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib Sun Dec 19 13:31:55 2010 -0500
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1024</int>
+ <int key="IBDocument.SystemTarget">1056</int>
<string key="IBDocument.SystemVersion">10H574</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">123</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="1"/>
+ <integer value="22"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -45,7 +45,7 @@
<object class="IBUIImageView" id="249993817">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">274</int>
- <string key="NSFrameSize">{480, 300}</string>
+ <string key="NSFrameSize">{480, 320}</string>
<reference key="NSSuperview" ref="191373211"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -56,25 +56,13 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
- <string key="NSResourceName">backgroundTop.png</string>
- </object>
- </object>
- <object class="IBUIImageView" id="745649693">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{0, 300}, {480, 20}}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <bool key="IBUIUserInteractionEnabled">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <object class="NSCustomResource" key="IBUIImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">borderBottom.png</string>
+ <string key="NSResourceName">background~iphone.png</string>
</object>
</object>
<object class="IBUIImageView" id="171108356">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">293</int>
- <string key="NSFrame">{{109, 35}, {262, 84}}</string>
+ <string key="NSFrame">{{105, 20}, {270, 150}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@@ -83,13 +71,13 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
- <string key="NSResourceName">title_small.png</string>
+ <string key="NSResourceName">title.png</string>
</object>
</object>
<object class="IBUIButton" id="124270424">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">289</int>
- <string key="NSFrame">{{208, 169}, {64, 64}}</string>
+ <string key="NSFrame">{{190, 200}, {100, 100}}</string>
<reference key="NSSuperview" ref="191373211"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
@@ -119,13 +107,13 @@
</object>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
- <string key="NSResourceName">startButton.png</string>
+ <string key="NSResourceName">localplayButton~iphone.png</string>
</object>
</object>
<object class="IBUIButton" id="753723574">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">269</int>
- <string key="NSFrame">{{355, 208}, {59, 52}}</string>
+ <string key="NSFrame">{{396, 236}, {64, 64}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@@ -148,7 +136,7 @@
<object class="IBUIButton" id="705508539">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">269</int>
- <string key="NSFrame">{{66, 208}, {59, 52}}</string>
+ <string key="NSFrame">{{20, 236}, {64, 64}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@@ -265,12 +253,11 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="249993817"/>
- <reference ref="745649693"/>
+ <reference ref="818907840"/>
<reference ref="171108356"/>
- <reference ref="818907840"/>
<reference ref="705508539"/>
+ <reference ref="753723574"/>
<reference ref="124270424"/>
- <reference ref="753723574"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -296,11 +283,6 @@
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">45</int>
- <reference key="object" ref="745649693"/>
- <reference key="parent" ref="191373211"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">41</int>
<reference key="object" ref="818907840"/>
<reference key="parent" ref="191373211"/>
@@ -342,7 +324,6 @@
<string>41.IBViewBoundsToFrameTransform</string>
<string>43.IBPluginDependency</string>
<string>43.IBViewBoundsToFrameTransform</string>
- <string>45.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -356,15 +337,15 @@
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABC2gAAww8AAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABCygAAwzcAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDTAAAw20AAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDPgAAw5UAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDsYAAw4QAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDxgAAw5iAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
@@ -372,9 +353,8 @@
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABCjAAAw4QAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw5iAAA</bytes>
</object>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -574,6 +554,13 @@
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
@@ -627,7 +614,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -640,23 +627,21 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>backgroundTop.png</string>
- <string>borderBottom.png</string>
+ <string>background~iphone.png</string>
+ <string>localplayButton~iphone.png</string>
<string>savesButton.png</string>
<string>settingsButton.png</string>
- <string>startButton.png</string>
- <string>title_small.png</string>
+ <string>title.png</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>{480, 300}</string>
- <string>{480, 20}</string>
- <string>{61, 59}</string>
- <string>{61, 59}</string>
+ <string>{480, 320}</string>
+ <string>{100, 100}</string>
<string>{64, 64}</string>
- <string>{262, 84}</string>
+ <string>{64, 64}</string>
+ <string>{270, 150}</string>
</object>
</object>
- <string key="IBCocoaTouchPluginVersion">123</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
--- a/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Sun Dec 19 13:31:55 2010 -0500
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1024</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">788</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10H574</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">117</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="1"/>
+ <integer value="9"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -123,6 +123,7 @@
<string key="NSFrame">{{736, 26}, {256, 128}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
@@ -950,6 +951,13 @@
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
@@ -1003,7 +1011,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -1028,9 +1036,9 @@
<string>{1024, 768}</string>
<string>{64, 64}</string>
<string>{142, 64}</string>
- <string>{273, 151}</string>
+ <string>{270, 150}</string>
</object>
</object>
- <string key="IBCocoaTouchPluginVersion">117</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
--- a/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPhone.xib Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPhone.xib Sun Dec 19 13:31:55 2010 -0500
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1024</int>
+ <int key="IBDocument.SystemTarget">1056</int>
<string key="IBDocument.SystemVersion">10H574</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">123</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -51,7 +51,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
- <string key="NSResourceName">backgroundCenter.png</string>
+ <string key="NSResourceName">background~iphone.png</string>
</object>
</object>
<object class="IBUISegmentedControl" id="88728219">
@@ -166,7 +166,7 @@
<object class="IBUILabel" id="743202682">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{88, 209}, {169, 29}}</string>
+ <string key="NSFrame">{{88, 210}, {169, 29}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -175,8 +175,8 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Label</string>
<object class="NSFont" key="IBUIFont">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">24</double>
+ <string key="NSName">Helvetica-Oblique</string>
+ <double key="NSSize">22</double>
<int key="NSfFlags">16</int>
</object>
<object class="NSColor" key="IBUITextColor">
@@ -825,6 +825,13 @@
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
@@ -878,7 +885,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -888,9 +895,9 @@
<string key="IBDocument.LastKnownRelativeProjectPath">../Hedgewars.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
- <string key="NS.key.0">backgroundCenter.png</string>
- <string key="NS.object.0">{480, 276}</string>
+ <string key="NS.key.0">background~iphone.png</string>
+ <string key="NS.object.0">{480, 320}</string>
</object>
- <string key="IBCocoaTouchPluginVersion">123</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
Binary file project_files/HedgewarsMobile/Resources/Overlay/ammoButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/ammoButton@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/arrowDown.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/arrowDown@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/arrowLeft.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/arrowLeft@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/arrowRight.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/arrowRight@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/arrowUp.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/arrowUp@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/cornerButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/cornerButton@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButtonAttack.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButtonAttack@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButtonBackJump.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButtonBackJump@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButtonForwardJump.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButtonForwardJump@2x.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButton_attack.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButton_backjump.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButton_forwardjump.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/mediumBackground~ipad.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/plus.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/smallerBackground@2x-iphone.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/smallerBackground~ipad.png has changed
Binary file project_files/HedgewarsMobile/Resources/Overlay/smallerBackground~iphone.png has changed
--- a/project_files/HedgewarsMobile/Resources/OverlayViewController.xib Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/OverlayViewController.xib Sun Dec 19 13:31:55 2010 -0500
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1024</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10H574</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">123</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -42,40 +42,6 @@
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUIView" id="442546943">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{0, 170}, {180, 150}}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- <object class="NSColorSpace" key="NSCustomColorSpace" id="692152543">
- <int key="NSID">2</int>
- </object>
- </object>
- <bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
- <float key="IBUIAlpha">0.0</float>
- <bool key="IBUIUserInteractionEnabled">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIView" id="358748789">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">265</int>
- <string key="NSFrame">{{337, 187}, {143, 133}}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- <reference key="NSCustomColorSpace" ref="692152543"/>
- </object>
- <bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
- <float key="IBUIAlpha">0.0</float>
- <bool key="IBUIUserInteractionEnabled">NO</bool>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
<object class="IBUIButton" id="584263820">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">268</int>
@@ -154,7 +120,7 @@
<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
- <string key="NSResourceName">joyButton_backjump.png</string>
+ <string key="NSResourceName">joyButtonBackJump.png</string>
</object>
</object>
<object class="IBUIButton" id="132251648">
@@ -178,7 +144,7 @@
<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
- <string key="NSResourceName">joyButton_forwardjump.png</string>
+ <string key="NSResourceName">joyButtonForwardJump.png</string>
</object>
</object>
<object class="IBUIButton" id="752933969">
@@ -202,7 +168,7 @@
<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
- <string key="NSResourceName">joyButton_attack.png</string>
+ <string key="NSResourceName">joyButtonAttack.png</string>
</object>
</object>
<object class="IBUIButton" id="261686746">
@@ -628,8 +594,6 @@
<reference ref="123494776"/>
<reference ref="132251648"/>
<reference ref="752933969"/>
- <reference ref="358748789"/>
- <reference ref="442546943"/>
<reference ref="50885250"/>
<reference ref="309477778"/>
</object>
@@ -698,18 +662,6 @@
<reference key="object" ref="50885250"/>
<reference key="parent" ref="191373211"/>
</object>
- <object class="IBObjectRecord">
- <int key="objectID">71</int>
- <reference key="object" ref="442546943"/>
- <reference key="parent" ref="191373211"/>
- <string key="objectName">safezoneleft</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">72</int>
- <reference key="object" ref="358748789"/>
- <reference key="parent" ref="191373211"/>
- <string key="objectName">safezoneright</string>
- </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -721,6 +673,7 @@
<string>1.IBEditorWindowLastContentRect</string>
<string>1.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
+ <string>12.IBViewBoundsToFrameTransform</string>
<string>17.IBPluginDependency</string>
<string>22.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
@@ -729,18 +682,17 @@
<string>53.IBPluginDependency</string>
<string>58.IBPluginDependency</string>
<string>67.IBPluginDependency</string>
- <string>71.IBPluginDependency</string>
- <string>72.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>OverlayViewController</string>
<string>UIResponder</string>
- <string>{{567, 304}, {480, 320}}</string>
+ <string>{{690, 375}, {480, 320}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABCkAAAw5SAAA</bytes>
+ </object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -961,6 +913,13 @@
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
@@ -1014,7 +973,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -1033,9 +992,9 @@
<string>arrowRight.png</string>
<string>arrowUp.png</string>
<string>cornerButton.png</string>
- <string>joyButton_attack.png</string>
- <string>joyButton_backjump.png</string>
- <string>joyButton_forwardjump.png</string>
+ <string>joyButtonAttack.png</string>
+ <string>joyButtonBackJump.png</string>
+ <string>joyButtonForwardJump.png</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1050,6 +1009,6 @@
<string>{64, 64}</string>
</object>
</object>
- <string key="IBCocoaTouchPluginVersion">123</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
Binary file project_files/HedgewarsMobile/Resources/Settings/Images/hedgehog.png has changed
Binary file project_files/HedgewarsMobile/Resources/Settings/Images/hedgehog@2x.png has changed
--- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist Sun Dec 19 13:31:55 2010 -0500
@@ -6,16 +6,17 @@
<array>
<integer>100</integer>
<integer>30</integer>
+ <integer>0</integer>
<integer>100</integer>
<integer>15</integer>
<integer>47</integer>
<integer>5</integer>
+ <integer>100</integer>
<integer>0</integer>
<integer>35</integer>
<integer>25</integer>
<integer>0</integer>
<integer>0</integer>
- <integer>0</integer>
<integer>40</integer>
</array>
<key>gamemod</key>
@@ -41,6 +42,8 @@
<false/>
<false/>
<false/>
+ <false/>
+ <false/>
</array>
</dict>
</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Clean Slate.plist Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>basic</key>
+ <array>
+ <integer>100</integer>
+ <integer>45</integer>
+ <integer>3</integer>
+ <integer>100</integer>
+ <integer>15</integer>
+ <integer>47</integer>
+ <integer>5</integer>
+ <integer>100</integer>
+ <integer>5</integer>
+ <integer>35</integer>
+ <integer>25</integer>
+ <integer>4</integer>
+ <integer>0</integer>
+ <integer>2</integer>
+ </array>
+ <key>gamemod</key>
+ <array>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <true/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <true/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <true/>
+ <true/>
+ <false/>
+ <false/>
+ <false/>
+ </array>
+</dict>
+</plist>
--- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist Sun Dec 19 13:31:55 2010 -0500
@@ -6,14 +6,15 @@
<array>
<integer>100</integer>
<integer>45</integer>
+ <integer>3</integer>
<integer>100</integer>
<integer>15</integer>
<integer>47</integer>
<integer>5</integer>
+ <integer>100</integer>
<integer>5</integer>
<integer>35</integer>
<integer>25</integer>
- <integer>3</integer>
<integer>4</integer>
<integer>0</integer>
<integer>2</integer>
@@ -41,6 +42,8 @@
<false/>
<false/>
<false/>
+ <false/>
+ <false/>
</array>
</dict>
</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Fort Mode.plist Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>basic</key>
+ <array>
+ <integer>100</integer>
+ <integer>45</integer>
+ <integer>3</integer>
+ <integer>100</integer>
+ <integer>15</integer>
+ <integer>47</integer>
+ <integer>5</integer>
+ <integer>100</integer>
+ <integer>5</integer>
+ <integer>35</integer>
+ <integer>25</integer>
+ <integer>0</integer>
+ <integer>0</integer>
+ <integer>0</integer>
+ </array>
+ <key>gamemod</key>
+ <array>
+ <false/>
+ <false/>
+ <true/>
+ <true/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <true/>
+ <true/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ </array>
+</dict>
+</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/King Mode.plist Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>basic</key>
+ <array>
+ <integer>100</integer>
+ <integer>45</integer>
+ <integer>3</integer>
+ <integer>100</integer>
+ <integer>15</integer>
+ <integer>47</integer>
+ <integer>5</integer>
+ <integer>100</integer>
+ <integer>5</integer>
+ <integer>35</integer>
+ <integer>25</integer>
+ <integer>4</integer>
+ <integer>0</integer>
+ <integer>2</integer>
+ </array>
+ <key>gamemod</key>
+ <array>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <true/>
+ <true/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ </array>
+</dict>
+</plist>
--- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist Sun Dec 19 13:31:55 2010 -0500
@@ -6,14 +6,15 @@
<array>
<integer>50</integer>
<integer>30</integer>
+ <integer>0</integer>
<integer>150</integer>
<integer>15</integer>
<integer>47</integer>
<integer>5</integer>
+ <integer>100</integer>
<integer>0</integer>
<integer>35</integer>
<integer>25</integer>
- <integer>0</integer>
<integer>80</integer>
<integer>0</integer>
<integer>0</integer>
@@ -41,6 +42,8 @@
<false/>
<false/>
<false/>
+ <false/>
+ <false/>
</array>
</dict>
</plist>
--- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist Sun Dec 19 13:31:55 2010 -0500
@@ -6,14 +6,15 @@
<array>
<integer>100</integer>
<integer>15</integer>
+ <integer>3</integer>
<integer>100</integer>
<integer>15</integer>
<integer>47</integer>
<integer>5</integer>
+ <integer>100</integer>
<integer>0</integer>
<integer>35</integer>
<integer>25</integer>
- <integer>3</integer>
<integer>0</integer>
<integer>0</integer>
<integer>2</integer>
@@ -41,6 +42,8 @@
<false/>
<false/>
<false/>
+ <false/>
+ <false/>
</array>
</dict>
</plist>
--- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist Sun Dec 19 13:31:55 2010 -0500
@@ -6,14 +6,15 @@
<array>
<integer>100</integer>
<integer>300</integer>
+ <integer>3</integer>
<integer>100</integer>
<integer>50</integer>
<integer>47</integer>
<integer>5</integer>
+ <integer>100</integer>
<integer>1</integer>
<integer>0</integer>
<integer>35</integer>
- <integer>3</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
@@ -41,6 +42,8 @@
<false/>
<false/>
<false/>
+ <false/>
+ <false/>
</array>
</dict>
</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Thinking with Portals.plist Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>basic</key>
+ <array>
+ <integer>100</integer>
+ <integer>45</integer>
+ <integer>4</integer>
+ <integer>100</integer>
+ <integer>15</integer>
+ <integer>47</integer>
+ <integer>5</integer>
+ <integer>100</integer>
+ <integer>2</integer>
+ <integer>25</integer>
+ <integer>25</integer>
+ <integer>5</integer>
+ <integer>0</integer>
+ <integer>5</integer>
+ </array>
+ <key>gamemod</key>
+ <array>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <true/>
+ <true/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ <false/>
+ </array>
+</dict>
+</plist>
--- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Timeless.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Timeless.plist Sun Dec 19 13:31:55 2010 -0500
@@ -6,15 +6,16 @@
<array>
<integer>100</integer>
<integer>100</integer>
+ <integer>5</integer>
<integer>100</integer>
<integer>100</integer>
<integer>47</integer>
<integer>5</integer>
+ <integer>100</integer>
<integer>5</integer>
<integer>35</integer>
<integer>30</integer>
<integer>3</integer>
- <integer>5</integer>
<integer>10</integer>
<integer>2</integer>
</array>
@@ -41,6 +42,8 @@
<false/>
<false/>
<true/>
+ <false/>
+ <false/>
</array>
</dict>
</plist>
--- a/project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist Sun Dec 19 13:31:55 2010 -0500
@@ -6,14 +6,15 @@
<array>
<integer>100</integer>
<integer>30</integer>
+ <integer>3</integer>
<integer>100</integer>
<integer>15</integer>
<integer>47</integer>
<integer>5</integer>
+ <integer>100</integer>
<integer>5</integer>
<integer>35</integer>
<integer>25</integer>
- <integer>3</integer>
<integer>10</integer>
<integer>10</integer>
<integer>10</integer>
@@ -41,6 +42,8 @@
<false/>
<false/>
<false/>
+ <false/>
+ <false/>
</array>
</dict>
</plist>
--- a/project_files/HedgewarsMobile/Resources/Settings/iFrontend/basicFlags_en.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/iFrontend/basicFlags_en.plist Sun Dec 19 13:31:55 2010 -0500
@@ -20,7 +20,7 @@
</dict>
<dict>
<key>checkOverMax</key>
- <true/>
+ <false/>
<key>command</key>
<string>e$turntime</string>
<key>default</key>
@@ -38,6 +38,22 @@
<key>checkOverMax</key>
<false/>
<key>command</key>
+ <string>e$minestime</string>
+ <key>default</key>
+ <integer>3</integer>
+ <key>image</key>
+ <string>Time</string>
+ <key>max</key>
+ <integer>5</integer>
+ <key>min</key>
+ <integer>-1</integer>
+ <key>title</key>
+ <string>Mines Time</string>
+ </dict>
+ <dict>
+ <key>checkOverMax</key>
+ <false/>
+ <key>command</key>
<string>e$damagepct</string>
<key>default</key>
<integer>100</integer>
@@ -102,6 +118,22 @@
<key>checkOverMax</key>
<false/>
<key>command</key>
+ <string>e$ropepct</string>
+ <key>default</key>
+ <integer>100</integer>
+ <key>image</key>
+ <string>Rope</string>
+ <key>max</key>
+ <integer>999</integer>
+ <key>min</key>
+ <integer>25</integer>
+ <key>title</key>
+ <string>Rope Length</string>
+ </dict>
+ <dict>
+ <key>checkOverMax</key>
+ <false/>
+ <key>command</key>
<string>e$casefreq</string>
<key>default</key>
<integer>5</integer>
@@ -150,22 +182,6 @@
<key>checkOverMax</key>
<false/>
<key>command</key>
- <string>e$minestime</string>
- <key>default</key>
- <integer>3</integer>
- <key>image</key>
- <string>Time</string>
- <key>max</key>
- <integer>5</integer>
- <key>min</key>
- <integer>-1</integer>
- <key>title</key>
- <string>Mines Time</string>
- </dict>
- <dict>
- <key>checkOverMax</key>
- <false/>
- <key>command</key>
<string>e$minesnum</string>
<key>default</key>
<integer>4</integer>
--- a/project_files/HedgewarsMobile/Resources/Settings/iFrontend/gameFlags_en.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/iFrontend/gameFlags_en.plist Sun Dec 19 13:31:55 2010 -0500
@@ -170,5 +170,21 @@
<key>title</key>
<string>Per Hedgehog Ammo</string>
</dict>
+ <dict>
+ <key>description</key>
+ <string>You will not have to worry about wind any more</string>
+ <key>image</key>
+ <string>NoWind</string>
+ <key>title</key>
+ <string>Disable Wind</string>
+ </dict>
+ <dict>
+ <key>description</key>
+ <string>Wind will affect almost everything</string>
+ <key>image</key>
+ <string>MoreWind</string>
+ <key>title</key>
+ <string>More Wind</string>
+ </dict>
</array>
</plist>
--- a/project_files/HedgewarsMobile/Resources/Settings/settings.plist Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/Resources/Settings/settings.plist Sun Dec 19 13:31:55 2010 -0500
@@ -14,5 +14,11 @@
<string></string>
<key>menu</key>
<false/>
+ <key>password_length</key>
+ <integer>0</integer>
+ <key>enhanced</key>
+ <false/>
+ <key>multitasking</key>
+ <true/>
</dict>
</plist>
Binary file project_files/HedgewarsMobile/Resources/checkbox.png has changed
Binary file project_files/HedgewarsMobile/Resources/savesButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/settingsButton.png has changed
--- a/project_files/HedgewarsMobile/SDL.patch Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/HedgewarsMobile/SDL.patch Sun Dec 19 13:31:55 2010 -0500
@@ -1,7 +1,22 @@
-diff -r c0021a587dc7 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
---- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Sun Oct 10 15:45:58 2010 -0700
-+++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Sat Oct 16 18:35:03 2010 +0200
-@@ -1549,15 +1549,19 @@
+diff -r d716dff4b13e Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
+--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Thu Dec 02 11:56:23 2010 -0800
++++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Thu Dec 02 22:38:57 2010 +0100
+@@ -1262,7 +1262,14 @@
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLiPhoneOS" */;
+ compatibilityVersion = "Xcode 3.1";
++ developmentRegion = English;
+ hasScannedForEncodings = 1;
++ knownRegions = (
++ English,
++ Japanese,
++ French,
++ German,
++ );
+ mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+ projectDirPath = "";
+ projectRoot = ../..;
+@@ -1549,15 +1556,19 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -18,11 +33,11 @@
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
- SDKROOT = iphoneos3.2;
-+ SDKROOT = iphoneos4.0;
++ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
-@@ -1566,14 +1570,19 @@
+@@ -1566,14 +1577,19 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -40,13 +55,13 @@
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
PREBINDING = NO;
- SDKROOT = iphoneos3.2;
-+ SDKROOT = iphoneos4.0;
++ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
-diff -r c0021a587dc7 Xcode-iPhoneOS/SDL/testsdl-Info.plist
---- a/Xcode-iPhoneOS/SDL/testsdl-Info.plist Sun Oct 10 15:45:58 2010 -0700
-+++ b/Xcode-iPhoneOS/SDL/testsdl-Info.plist Sat Oct 16 18:35:03 2010 +0200
+diff -r d716dff4b13e Xcode-iPhoneOS/SDL/testsdl-Info.plist
+--- a/Xcode-iPhoneOS/SDL/testsdl-Info.plist Thu Dec 02 11:56:23 2010 -0800
++++ b/Xcode-iPhoneOS/SDL/testsdl-Info.plist Thu Dec 02 22:38:57 2010 +0100
@@ -16,7 +16,5 @@
<string>????</string>
<key>CFBundleVersion</key>
@@ -55,9 +70,9 @@
- <string>MainWindow</string>
</dict>
</plist>
-diff -r c0021a587dc7 include/SDL_config_iphoneos.h
---- a/include/SDL_config_iphoneos.h Sun Oct 10 15:45:58 2010 -0700
-+++ b/include/SDL_config_iphoneos.h Sat Oct 16 18:35:03 2010 +0200
+diff -r d716dff4b13e include/SDL_config_iphoneos.h
+--- a/include/SDL_config_iphoneos.h Thu Dec 02 11:56:23 2010 -0800
++++ b/include/SDL_config_iphoneos.h Thu Dec 02 22:38:57 2010 +0100
@@ -98,6 +98,8 @@
#define HAVE_COS 1
#define HAVE_COSF 1
@@ -93,9 +108,9 @@
+#define SDL_VIEW_TAG 456987
+
#endif /* _SDL_config_iphoneos_h */
-diff -r c0021a587dc7 src/SDL_fatal.c
---- a/src/SDL_fatal.c Sun Oct 10 15:45:58 2010 -0700
-+++ b/src/SDL_fatal.c Sat Oct 16 18:35:03 2010 +0200
+diff -r d716dff4b13e src/SDL_fatal.c
+--- a/src/SDL_fatal.c Thu Dec 02 11:56:23 2010 -0800
++++ b/src/SDL_fatal.c Thu Dec 02 22:38:57 2010 +0100
@@ -38,9 +38,9 @@
static void
SDL_Parachute(int sig)
@@ -108,9 +123,9 @@
}
static const int SDL_fatal_signals[] = {
-diff -r c0021a587dc7 src/video/SDL_renderer_gles.c
---- a/src/video/SDL_renderer_gles.c Sun Oct 10 15:45:58 2010 -0700
-+++ b/src/video/SDL_renderer_gles.c Sat Oct 16 18:35:03 2010 +0200
+diff -r d716dff4b13e src/video/SDL_renderer_gles.c
+--- a/src/video/SDL_renderer_gles.c Thu Dec 02 11:56:23 2010 -0800
++++ b/src/video/SDL_renderer_gles.c Thu Dec 02 22:38:57 2010 +0100
@@ -324,6 +324,9 @@
data->glDisable(GL_CULL_FACE);
data->updateSize = SDL_TRUE;
@@ -192,10 +207,10 @@
}
data->glDisable(GL_TEXTURE_2D);
-diff -r c0021a587dc7 src/video/SDL_video.c
---- a/src/video/SDL_video.c Sun Oct 10 15:45:58 2010 -0700
-+++ b/src/video/SDL_video.c Sat Oct 16 18:35:03 2010 +0200
-@@ -1416,9 +1416,9 @@
+diff -r d716dff4b13e src/video/SDL_video.c
+--- a/src/video/SDL_video.c Thu Dec 02 11:56:23 2010 -0800
++++ b/src/video/SDL_video.c Thu Dec 02 22:38:57 2010 +0100
+@@ -1421,9 +1421,9 @@
SDL_MinimizeWindow(window);
}
@@ -207,9 +222,9 @@
if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
&& _this->SetWindowGrab) {
_this->SetWindowGrab(_this, window);
-diff -r c0021a587dc7 src/video/uikit/SDL_uikitopengles.m
---- a/src/video/uikit/SDL_uikitopengles.m Sun Oct 10 15:45:58 2010 -0700
-+++ b/src/video/uikit/SDL_uikitopengles.m Sat Oct 16 18:35:03 2010 +0200
+diff -r d716dff4b13e src/video/uikit/SDL_uikitopengles.m
+--- a/src/video/uikit/SDL_uikitopengles.m Thu Dec 02 11:56:23 2010 -0800
++++ b/src/video/uikit/SDL_uikitopengles.m Thu Dec 02 22:38:57 2010 +0100
@@ -114,8 +114,8 @@
bBits: _this->gl_config.blue_size \
aBits: _this->gl_config.alpha_size \
@@ -221,9 +236,39 @@
/* add the view to our window */
[uiwindow addSubview: view ];
-diff -r c0021a587dc7 src/video/uikit/SDL_uikitview.m
---- a/src/video/uikit/SDL_uikitview.m Sun Oct 10 15:45:58 2010 -0700
-+++ b/src/video/uikit/SDL_uikitview.m Sat Oct 16 18:35:03 2010 +0200
+diff -r d716dff4b13e src/video/uikit/SDL_uikitopenglview.m
+--- a/src/video/uikit/SDL_uikitopenglview.m Thu Dec 02 11:56:23 2010 -0800
++++ b/src/video/uikit/SDL_uikitopenglview.m Thu Dec 02 22:38:57 2010 +0100
+@@ -117,6 +117,8 @@
+ return NO;
+ }
+ /* end create buffers */
++ if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
++ self.contentScaleFactor = [UIScreen mainScreen].scale;
+ }
+ return self;
+ }
+diff -r d716dff4b13e src/video/uikit/SDL_uikitview.h
+--- a/src/video/uikit/SDL_uikitview.h Thu Dec 02 11:56:23 2010 -0800
++++ b/src/video/uikit/SDL_uikitview.h Thu Dec 02 22:38:57 2010 +0100
+@@ -23,11 +23,11 @@
+ #include "SDL_stdinc.h"
+ #include "SDL_events.h"
+
+-#define IPHONE_TOUCH_EFFICIENT_DANGEROUS
+-#define FIXED_MULTITOUCH
++#undef IPHONE_TOUCH_EFFICIENT_DANGEROUS
++#undef FIXED_MULTITOUCH
+
+ #ifndef IPHONE_TOUCH_EFFICIENT_DANGEROUS
+-#define MAX_SIMULTANEOUS_TOUCHES 5
++#define MAX_SIMULTANEOUS_TOUCHES 0
+ #endif
+
+ /* *INDENT-OFF* */
+diff -r d716dff4b13e src/video/uikit/SDL_uikitview.m
+--- a/src/video/uikit/SDL_uikitview.m Thu Dec 02 11:56:23 2010 -0800
++++ b/src/video/uikit/SDL_uikitview.m Thu Dec 02 22:38:57 2010 +0100
@@ -35,9 +35,6 @@
@implementation SDL_uikitview
@@ -335,24 +380,24 @@
if (NULL == view) {
SDL_SetError("Window has no view");
-diff -r c0021a587dc7 src/video/uikit/SDL_uikitwindow.m
---- a/src/video/uikit/SDL_uikitwindow.m Sun Oct 10 15:45:58 2010 -0700
-+++ b/src/video/uikit/SDL_uikitwindow.m Sat Oct 16 18:35:03 2010 +0200
+diff -r d716dff4b13e src/video/uikit/SDL_uikitwindow.m
+--- a/src/video/uikit/SDL_uikitwindow.m Thu Dec 02 11:56:23 2010 -0800
++++ b/src/video/uikit/SDL_uikitwindow.m Thu Dec 02 22:38:57 2010 +0100
@@ -144,7 +144,10 @@
if (SDL_UIKit_supports_multiple_displays) {
[uiwindow setScreen:uiscreen];
}
-
+
-+ if ([[UIScreen screens] count] > 1)
++ if ([UIScreen respondsToSelector:@selector(screens)] && [[UIScreen screens] count] > 1)
+ uiwindow.screen = [[UIScreen screens] objectAtIndex:1];
+
if (SetupWindowData(_this, window, uiwindow, SDL_TRUE) < 0) {
[uiwindow release];
return -1;
-diff -r c0021a587dc7 src/video/uikit/keyinfotable.h
---- a/src/video/uikit/keyinfotable.h Sun Oct 10 15:45:58 2010 -0700
-+++ b/src/video/uikit/keyinfotable.h Sat Oct 16 18:35:03 2010 +0200
+diff -r d716dff4b13e src/video/uikit/keyinfotable.h
+--- a/src/video/uikit/keyinfotable.h Thu Dec 02 11:56:23 2010 -0800
++++ b/src/video/uikit/keyinfotable.h Thu Dec 02 22:38:57 2010 +0100
@@ -54,7 +54,7 @@
/* 10 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 11 */ { SDL_SCANCODE_UNKNOWN, 0 },
--- a/project_files/hedgewars.pro Mon Dec 06 03:07:03 2010 +0100
+++ b/project_files/hedgewars.pro Sun Dec 19 13:31:55 2010 -0500
@@ -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/CMakeLists.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/CMakeLists.txt Sun Dec 19 13:31:55 2010 -0500
@@ -1,3 +1,3 @@
-foreach(dir "Fonts" "Forts" "Graphics" "Locale" "Maps" "Music" "Sounds" "Themes" "Missions" "Names" "misc")
+foreach(dir "Fonts" "Forts" "Graphics" "Locale" "Maps" "Music" "Sounds" "Themes" "Missions" "Names" "misc" "Scripts")
add_subdirectory(${dir})
endforeach(dir)
Binary file share/hedgewars/Data/Forts/Cake-preview.png has changed
Binary file share/hedgewars/Data/Forts/Cake-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/Castle-preview.png has changed
Binary file share/hedgewars/Data/Forts/Castle-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/Earth-preview.png has changed
Binary file share/hedgewars/Data/Forts/Earth-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/EvilChicken-preview.png has changed
Binary file share/hedgewars/Data/Forts/EvilChicken-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/Flowerhog-preview.png has changed
Binary file share/hedgewars/Data/Forts/Flowerhog-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/Hydrant-preview.png has changed
Binary file share/hedgewars/Data/Forts/Hydrant-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/Lego-preview.png has changed
Binary file share/hedgewars/Data/Forts/Lego-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/Plane-preview.png has changed
Binary file share/hedgewars/Data/Forts/Plane-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/Statue-preview.png has changed
Binary file share/hedgewars/Data/Forts/Statue-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/Tank-preview.png has changed
Binary file share/hedgewars/Data/Forts/Tank-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/UFO-preview.png has changed
Binary file share/hedgewars/Data/Forts/UFO-preview@2x.png has changed
Binary file share/hedgewars/Data/Forts/Wood-preview.png has changed
Binary file share/hedgewars/Data/Forts/Wood-preview@2x.png has changed
Binary file share/hedgewars/Data/Graphics/AirDrill.png has changed
Binary file share/hedgewars/Data/Graphics/BulletHit.png has changed
Binary file share/hedgewars/Data/Graphics/BulletHit.sifz has changed
Binary file share/hedgewars/Data/Graphics/Hats/WhySoSerious.png has changed
Binary file share/hedgewars/Data/Graphics/Hats/porkey.png has changed
Binary file share/hedgewars/Data/Graphics/Hats/sheep.png has changed
Binary file share/hedgewars/Data/Graphics/NapalmBomb.png has changed
--- a/share/hedgewars/Data/Locale/CMakeLists.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/CMakeLists.txt Sun Dec 19 13:31:55 2010 -0500
@@ -1,6 +1,7 @@
file(GLOB txttrans2 ??.txt)
file(GLOB txttrans5 ?????.txt)
file(GLOB tsfiles *.ts)
+file(GLOB luafiles *.lua)
QT4_ADD_TRANSLATION(QM ${tsfiles})
@@ -13,6 +14,7 @@
${txttrans2}
${txttrans5}
${QM}
+ ${luafiles}
DESTINATION ${SHAREPATH}Data/Locale
)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Locale/de.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,27 @@
+locale = {
+ ["Aiming Practice"] = "Zielübung", --Bazooka, Shotgun, SniperRifle
+ ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Eliminiere alle Ziele bevor die Zeit ausläuft.|Du hast in dieser Mission unbegrenzte Munition.", --Bazooka, Shotgun, SniperRifle
+ ["Oh no! Time's up! Just try again."] = "Oh nein! Die Zeit ist um! Versuche es nochmal.", --Bazooka, Shotgun, SniperRifle
+ ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Gratulation! Du hast alle Ziele innerhalb der|verfügbaren Zeit ausgeschaltet.", --Bazooka, Shotgun, SniperRifle
+ ["Hunter"] = "Jäger", --Bazooka, Shotgun, SniperRifle
+ ["Bazooka Training"] = "Bazooka-Training",
+ ["'Zooka Team"] = "Die Knalltüten",
+ ["Shotgun Training"] = "Schrotflinten-Training",
+ ["Shotgun Team"] = "Entrenamiento con escopeta",
+ ["Sniper Training"] = "Scharfschützen-Training",
+ ["Sniperz"] = "Heckenschützen",
+ ["Not So Friendly Match"] = "Kein-so-Freundschaftsspiel", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a point!| |Score:"] = "%s ist draußen und Team %d|erhält einen Punkt!| |Punktestand:", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s ist draußen und Team %d|erhält eine Strafe!| |Punktestand:", -- Basketball, Knockball
+ ["Hedgewars-Basketball"] = "Hedgewars-Basketball",
+ ["Bat your opponents through the|baskets and out of the map!"] = "Schlage deine Widersacher durch|die Körbe und aus der Karte hinaus!",
+ ["Hedgewars-Knockball"] = "Hedgewars-Knockball",
+ ["Bat balls at your enemies and|push them into the sea!"] = "Schlage Bälle auf deine Widersacher|und lass sie ins Meer fallen!",
+-- ["TrophyRace"] =
+-- ["Use your rope to get from start to finish as fast as you can!"] =
+-- ["You've reached the goal!| |Time: "] =
+-- ["NEW fastest lap: "] =
+-- ["Fastest lap: "] =
+-- ["Best laps per team: "] =
+-- ["Team %d: "] =
+ }
--- a/share/hedgewars/Data/Locale/en.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/en.txt Sun Dec 19 13:31:55 2010 -0500
@@ -50,6 +50,7 @@
00:47=Sticky Mine
00:48=Hammer
00:49=Resurrector
+00:50=Drill Strike
01:00=Let's fight!
01:01=Round draw
@@ -431,6 +432,7 @@
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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Locale/es.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,27 @@
+locale = {
+ ["Aiming Practice"] = "Practica tu puntería", --Bazooka, Shotgun, SniperRifle
+ ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Destruye todos los objetivos antes de que se agote el tiempo.|La munición en esta misión es ilimitada.", --Bazooka, Shotgun, SniperRifle
+ ["Oh no! Time's up! Just try again."] = "¡Oh, no, se te acabó el tiempo! ¿Por qué no lo intentas de nuevo?", --Bazooka, Shotgun, SniperRifle
+ ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "¡Felicidades! Has destruido todos los objectivos|dentro del tiempo establecido.", --Bazooka, Shotgun, SniperRifle
+ ["Hunter"] = "Artillero", --Bazooka, Shotgun, SniperRifle
+ ["Bazooka Training"] = "Entrenamiento con bazuca",
+ ["'Zooka Team"] = "Bazuqueros",
+ ["Shotgun Training"] = "Entrenamiento con escopeta",
+ ["Shotgun Team"] = "Escopeteros",
+ ["Sniper Training"] = "Entrenamiento con rifle francotirador",
+ ["Sniperz"] = "Fusileros",
+ ["Not So Friendly Match"] = "Partido no-tan-amistoso", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a point!| |Score:"] = "¡%s cayó y Equipo %d|anotó un tanto!| |Puntuación:", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a penalty!| |Score:"] = "¡%s cayó y Equipo %d|anotó una falta!| |Puntuación:", -- Basketball, Knockball
+ ["Hedgewars-Basketball"] = "Hedgewars-Baloncesto",
+ ["Bat your opponents through the|baskets and out of the map!"] = "¡Batea pelotas hacia tus enemigos|y hazlos caer al agua!",
+ ["Hedgewars-Knockball"] = "Hedgewars-Knockball",
+ ["Bat balls at your enemies and|push them into the sea!"] = "Schlage Bälle auf deine Widersacher|und lass sie ins Meer fallen!",
+ ["TrophyRace"] = "TrophyRace",
+ ["Use your rope to get from start to finish as fast as you can!"] = "¡Usa tu cuerda para llegar a la salida lo más rápido que puedas!",
+ ["You've reached the goal!| |Time: "] = "¡Has llegado a la meta!| |Tiempo: ",
+ ["NEW fastest lap: "] = "NUEVA vuelta rápida: ",
+ ["Fastest lap: "] = "Vuelta rápida: ",
+ ["Best laps per team: "] = "Mejores tiempos por equipo: ",
+ ["Team %d: "] = "Equipo %d",
+ }
--- a/share/hedgewars/Data/Locale/hedgewars_ar.ts Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_ar.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_it.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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>
@@ -432,7 +436,7 @@
<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>Ak chcete hrať s priateľom ako team, jednoducho si zvoľte tú istú farbu. I naďalej budete ovládať svojich vlastných ježkov, ale víťazstvá či prehry budú spoločné.</translation>
+ <translation>Ak chcete hrať s priateľom ako tím, jednoducho si zvoľte tú istú farbu. I naďalej budete ovládať svojich vlastných ježkov, ale víťazstvá či prehry budú spoločné.</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>
@@ -730,11 +734,11 @@
<name>PageOptions</name>
<message>
<source>New team</source>
- <translation>Nový team</translation>
+ <translation>Nový tím</translation>
</message>
<message>
<source>Edit team</source>
- <translation>Upraviť team</translation>
+ <translation>Upraviť tím</translation>
</message>
<message>
<source>Delete team</source>
@@ -742,19 +746,43 @@
</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ť teamytímy. Vráťte sa do hlavného menu, odkiaľ môžete pridávať, upravovať alebo mazať tímy.</translation>
+ <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>
@@ -861,9 +889,9 @@
<message numerus="yes">
<source>There are %1 teams participating in this room.</source>
<translation>
- <numerusform>V tejto miestnosti je jeden hrajúci team.</numerusform>
- <numerusform>V tejto miestnosti sú %1 hrajúce teamy.</numerusform>
- <numerusform>V tejto miestnosti je %1 hrajúcich teamov.</numerusform>
+ <numerusform>V tejto miestnosti je jeden hrajúci tím.</numerusform>
+ <numerusform>V tejto miestnosti sú %1 hrajúce tímy.</numerusform>
+ <numerusform>V tejto miestnosti je %1 hrajúcich tímov.</numerusform>
</translation>
</message>
<message>
@@ -917,7 +945,7 @@
</message>
<message>
<source>Gain 80% of the damage you do back in health</source>
- <translation>Pridať 80% škody, ktorú spôsobíte k vášmu zdraviu</translation>
+ <translation>K vášmu zdraviu sa priráta 80 % škody, ktorú spôsobíte</translation>
</message>
<message>
<source>Share your opponents pain, share their damage</source>
@@ -945,11 +973,11 @@
</message>
<message>
<source>Defend your fort and destroy the opponents, two team colours max!</source>
- <translation>Ubráňte pevnosť a znižte nepriateľov, maximálne dve teamové farby!</translation>
+ <translation>Ubráňte pevnosť a zničte nepriateľov, maximálne dve tímové farby!</translation>
</message>
<message>
<source>Teams will start on opposite sides of the terrain, two team colours max!</source>
- <translation>Teamy začnú na opačných stranách terénu, maximálne dve teamové farby!</translation>
+ <translation>Tímy začnú na opačných stranách terénu, maximálne dve tímové farby!</translation>
</message>
<message>
<source>Land can not be destroyed!</source>
@@ -1013,7 +1041,15 @@
</message>
<message>
<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 teamu.</translation>
+ <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>
@@ -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>
@@ -1035,7 +1075,7 @@
</message>
<message>
<source>Multiplayer (play a hotseat game against your friends, or AI teams)</source>
- <translation>Multiplayer (hrať hru, pri ktorej sa striedate s hráčmi pri počítači alebo proti počítačovým teamom)</translation>
+ <translation>Multiplayer (hrať hru, pri ktorej sa striedate s hráčmi pri počítači alebo proti počítačovým tímom)</translation>
</message>
<message>
<source>Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT</source>
@@ -1070,7 +1110,7 @@
</message>
<message>
<source>Restrict Team Additions</source>
- <translation>Obmedziť pripojenie k teamu</translation>
+ <translation>Obmedziť pripojenie k tímu</translation>
</message>
<message>
<source>Info</source>
@@ -1235,7 +1275,7 @@
<name>QGroupBox</name>
<message>
<source>Team Members</source>
- <translation>Členovia teamu</translation>
+ <translation>Členovia tímu</translation>
</message>
<message>
<source>Key binds</source>
@@ -1247,7 +1287,7 @@
</message>
<message>
<source>Teams</source>
- <translation>Teamy</translation>
+ <translation>Tímy</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1255,7 +1295,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Zbrane</translation>
+ <translation type="obsolete">Zbrane</translation>
</message>
<message>
<source>Net game</source>
@@ -1263,7 +1303,7 @@
</message>
<message>
<source>Playing teams</source>
- <translation>Hrajúce teamy</translation>
+ <translation>Hrajúce tímy</translation>
</message>
<message>
<source>Game Modifiers</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>
@@ -1378,7 +1422,7 @@
</message>
<message>
<source>Crate Drops</source>
- <translation>Zhadzovanie krabíc</translation>
+ <translation>Padanie krabíc</translation>
</message>
<message>
<source>Scheme Name:</source>
@@ -1386,7 +1430,7 @@
</message>
<message>
<source>% Dud Mines</source>
- <translation>% Falošné míny</translation>
+ <translation>% falošných mín</translation>
</message>
<message>
<source>Name</source>
@@ -1441,15 +1485,15 @@
</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>
- <translation>Stúpanie vody pri rýchlej smrti</translation>
+ <translation>Stúpanie vody počas rýchlej smrti</translation>
</message>
<message>
<source>Sudden Death Health Decrease</source>
- <translation>Klesanie vody pri rýchlej smrti</translation>
+ <translation>Klesanie zdravia počas rýchlej smrti</translation>
</message>
<message>
<source>% Health Crates</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>
@@ -1704,7 +1780,7 @@
</message>
<message>
<source>Divide Teams</source>
- <translation>Rozdeliť teamy</translation>
+ <translation>Rozdeliť tímy</translation>
</message>
<message>
<source>Solid Land</source>
@@ -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>
@@ -2003,7 +2087,7 @@
</message>
<message>
<source>Talk to your team or all participants:</source>
- <translation>Umožní vám rozhovor s vašim teamom alebo všetkými účastníkmi hry:</translation>
+ <translation>Umožní vám rozhovor s vašim tímom alebo všetkými účastníkmi hry:</translation>
</message>
<message>
<source>Pause, continue or leave your game:</source>
--- a/share/hedgewars/Data/Locale/hedgewars_sv.ts Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 type="unfinished"></translation>
+ <translation type="obsolete">Коли ввімкнена ця опція при виборі схеми гри зброя буде вибрана автоматично (and viceversa)</translation>
+ </message>
+ <message>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
+ <translation>Коли ввімкнена ця опція при виборі схеми гри зброя буде вибрана автоматично</translation>
</message>
</context>
<context>
@@ -69,7 +73,7 @@
<name>HWForm</name>
<message>
<source>new</source>
- <translation>нова</translation>
+ <translation type="obsolete">нова</translation>
</message>
<message>
<source>Error</source>
@@ -93,17 +97,17 @@
</message>
<message>
<source>DefaultTeam</source>
- <translation type="unfinished"></translation>
+ <translation>Команда за замовчуванням</translation>
</message>
<message>
<source>Hedgewars Demo File</source>
<comment>File Types</comment>
- <translation type="unfinished"></translation>
+ <translation>Демо Файл Hedgewars</translation>
</message>
<message>
<source>Hedgewars Save File</source>
<comment>File Types</comment>
- <translation type="unfinished"></translation>
+ <translation>Файл Збереження Hedgewars</translation>
</message>
</context>
<context>
@@ -256,7 +260,10 @@
registered on Hedgewars.org
Please provide your password below
or pick another nickname in game config:</source>
- <translation type="unfinished"></translation>
+ <translation>Ваш нік %1 вже
+зареєстрований на Hedgewars.org
+Введіть ваш пароль нижче або
+виберіть інший нік в налаштуваннях гри:</translation>
</message>
</context>
<context>
@@ -347,64 +354,64 @@
</message>
<message>
<source>Details</source>
- <translation type="unfinished"></translation>
+ <translation>Деталі</translation>
</message>
<message>
<source>Health graph</source>
- <translation type="unfinished"></translation>
+ <translation>Графа здоров'я</translation>
</message>
<message>
<source>Ranking</source>
- <translation type="unfinished"></translation>
+ <translation>Позиції</translation>
</message>
<message>
<source>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</source>
- <translation type="unfinished"></translation>
+ <translation>Нагороду за кращий постріл отримує <b>%1</b> з <b>%2</b> пунктами нанесених втрат.</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>
- <numerusform></numerusform>
+ <translation>
+ <numerusform>Кращим вбивцею є <b>%1</b> з <b>%2</b> вбивством за хід.</numerusform>
+ <numerusform>Кращим вбивцею є <b>%1</b> з <b>%2</b> вбивствами за хід.</numerusform>
+ <numerusform>Кращим вбивцею є <b>%1</b> з <b>%2</b> вбивствами за хід.</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>
- <numerusform></numerusform>
+ <translation>
+ <numerusform>Загалом протягом цього раунду було вбито <b>%1</b> їжака.</numerusform>
+ <numerusform>Загалом протягом цього раунду було вбито <b>%1</b> їжаки.</numerusform>
+ <numerusform>Загалом протягом цього раунду було вбито <b>%1</b> їжаків.</numerusform>
</translation>
</message>
<message numerus="yes">
<source>(%1 kill)</source>
- <translation type="unfinished">
- <numerusform></numerusform>
- <numerusform></numerusform>
- <numerusform></numerusform>
+ <translation>
+ <numerusform>(%1 вбивство)</numerusform>
+ <numerusform>(%1 вбивства)</numerusform>
+ <numerusform>(%1 вбивств)</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>
- <numerusform></numerusform>
+ <translation>
+ <numerusform><b>%1</b> обстріляв напарників на <b>%2</b> пункт нанесених втрат.</numerusform>
+ <numerusform><b>%1</b> обстріляв напарників на <b>%2</b> пункти нанесених втрат.</numerusform>
+ <numerusform><b>%1</b> обстріляв напарників на <b>%2</b> пунктів нанесених втрат.</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>
- <numerusform></numerusform>
+ <translation>
+ <numerusform><b>%1</b> вбив <b>%2</b> їжака зі своєї команди.</numerusform>
+ <numerusform><b>%1</b> вбив <b>%2</b> їжаків зі своєї команди.</numerusform>
+ <numerusform><b>%1</b> вбив <b>%2</b> їжаків зі своєї команди.</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>
+ <translation>
+ <numerusform><b>%1</b> злякався і пропустив хід <b>%2</b> разів.</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
@@ -423,247 +430,247 @@
<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>
+ <translation>Виберіть той же колір що і в друга щоб грати в одній команді. Кожен з вас буде керувати власними їжаками але вони виграють чи програють разом.</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>
+ <translation>Деяка зброя наносить мало шкоди, але вона може бути більш руйнівною в правильній ситуації. Спробуйте використати Пустельного Орла для скидання кількох їжаків у воду.</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>
+ <translation>Якщо ви не знаєте що робити і не хочете витрачати боєприпаси, пропустіть один раунд. Але не марнуйте занадто багато часу, тому-що прийде Раптова Смерть!</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>
+ <translation>Якщо ви хочете закріпити за собою нік на офіційному сервері, зареєструйте аккаунт на http://www.hedgewars.org/.</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>
+ <translation>Ви втомилися від гри за замовчуванням? Спробуйте одну з місій - вони пропонують різні види гри залежно від вашого вибору.</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>
+ <translation>За замовчуванням остання гра завжди буде записуватись в якості демо. Виберіть 'Локальну Гру' і натисніть кнопку 'Демонстрації' у нижньому правому куті щоб грати або керувати ними.</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>
+ <translation>Hedgewars є відкритою та безплатною, ми створюємо її у вільний час. Якщо у вас є проблеми, запитайте на нашому форумі, але будь-ласка, не чекайте підтримки 24/7!</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>
+ <translation>Hedgewars є відкритою та безплатною, ми створюємо її у вільний час. Якщо вона вам подобається, допоможіть нам невеликим внеском або вкладіть свою роботу!</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>
+ <translation>Hedgewars є відкритою та безплатною, ми створюємо її у вільний час. Поділіться грою з родиною та друзями!</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>
+ <translation>Час від часу проводяться офіційні турніри. Майбутні події будуть оголошені на http://www.hedgewars.org/ за кілька днів перед проведенням.</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>
+ <translation>Hedgewars доступна на багатьох мовах. Якщо переклад на вашу мову застарів чи відсутній, не соромтеся звертатися до нас!</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>
+ <translation>Hedgewars може бути запущений на багатьох операційних системах, включаючи Microsoft Windows, Mac OS X і Linux.</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>
+ <translation>Завжди пам'ятайте, ви можете створити свою власну гру в локальному та мережному/онлайн-режимах. Ви не обмежені опцією 'Проста Гра'.</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>
+ <translation>Поки граєте гру зробіть коротку перерву хоча б раз на годину.</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>
+ <translation>Якщо ваша відеокарта не може забезпечити апаратне прискорення OpenGL, спробуйте включити режим низької якості для підвищення продуктивності.</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>
+ <translation>Ми відкриті для пропозицій і конструктивного зворотнього зв'язку. Якщо вам не подобається щось або є відмінна ідея, дайте нам знати!</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>
+ <translation>Особливо під час гри онлайн будьте ввічливі і завжди пам'ятайте, з вами чи проти вас можуть грати неповнолітні!</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>
+ <translation>Спеціальні режими гри, такі як 'Вампіризм' чи 'Карма' дозволяють розробляти цілком нову тактику. Спробуйте їх в налаштованій грі!</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>
+ <translation>Windows-версія Hedgewars підтримує Xfire. Переконайтеся в тому, що ви додали Hedgwars до списку ігор, щоб ваші друзі могли бачити вас в грі.</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>
+ <translation>Ви не повинні встановлювати Hedgewars на комп'ютерах, які вам не належать (школа, університет, робота тощо). Будь ласка, звертайтесь до відповідальної особи!</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>
+ <translation>Hedgewars чудово підходить для короткої гри під час перерв. Переконайтеся, що ви не додали занадто багато їжаків і не взяли велику карту. Скорочення часу і здоров'я також підійде.</translation>
</message>
<message>
<source>No hedgehogs were harmed in making this game.</source>
<comment>Tips</comment>
- <translation type="unfinished"></translation>
+ <translation>Під час розробки гри не постраждав жодний їжак.</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>
+ <translation>Hedgewars є відкритою та безплатною, ми створюємо її у вільний час. Якщо хтось продав вам гру, ви повинні спробувати отримати відшкодування!</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>
+ <translation>Підключіть один або кілька геймпадів перед початком гри, щоб ваші команди могли ними користуватись.</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>
+ <translation>Створіть акаунт на %1 щоб запобігти використанню іншими особами вашого улюбленого ніку під час гри на офіційному сервері.</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>
+ <translation>Якщо ваша відеокарта не може забезпечити апаратне прискорення OpenGL, спробуйте оновити відповідні драйвери.</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>
+ <translation>В грі існують три різних види стрибків. Натисніть [високий стрибок] двічі щоб зробити дуже високий стрибок назад.</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>
+ <translation>Боїтесь падіння зі скелі? Утримуйте [точно] щоб повернутись [вліво] чи [вправо] без фактичного переміщення.</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>
+ <translation>Деяка зброя вимагає спеціальних стратегій або просто багато тренувань, тому не відмовляйтесь від конкретного інструменту, якщо ви раз не знешкодили ворога.</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>
+ <translation>Більшість зброї не буде працювати після торкання води. Бджола та Торт є виключеннями з цього правила.</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>
+ <translation>Старий лімбургський сир викликає лише невеликий вибух. Однак смердюча хмара, яку відносить вітер, може отруїти багато їжаків за раз.</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>
+ <translation>Напад піаніно є найбільш руйнівним повітряним ударом. Але ви втратите їжака, тому він має і негативну сторону.</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>
+ <translation>Навідна Бджілка може бути складною у керуванні. Радіус повороту залежить від її швидкості, тому постарайтеся не стріляти на повну силу.</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>
+ <translation>Липкі Міни чудовий інструмент створення малих ланцюгових реакцій для закидання ворогів у складні ситуації ... або у воду.</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>
+ <translation>Молоток найбільш ефективний при використанні на мостах чи балках. Удар їжака просто провалить його крізь землю.</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>
+ <translation>Якщо ви застрягли за ворожим їжаком, використайте Молоток, щоб звільнити себе без пошкоджень від вибуху.</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>
+ <translation>Найбільший шлях ходьби Торта залежить від землі, по якій він повинен пройти. Використовуйте [атака] щоб підірвати його раніше.</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>
+ <translation>Вогнемет це зброя, але його можна також використати для риття тунелю.</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>
+ <translation>Використайте Горючу Гранату щоб тимчасово утримати їжаків від проходження такої місцевості як тунелі або платформи.</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>
+ <translation>Хочете знати хто робить гру? Натисніть на логотип Hedgewars в головному меню, щоб побачити список.</translation>
</message>
<message>
<source>Like Hedgewars? Become a fan on %1 or follow us on %2!</source>
<comment>Tips</comment>
- <translation type="unfinished"></translation>
+ <translation>Подобається Hedgewars? Станьте фанатом на %1 або слідуйте за нами на %2!</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>
+ <translation>Ви можете самі намалювати надгробки, шапки, прапори та навіть мапи і теми! Але врахуйте, вам доведеться поділитися ними з кимось щоб використати їх в інтернет-грі.</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>
+ <translation>Хочете носити особливий капелюх? Внесіть пожертву і отримайте ексклюзивний капелюх на ваш вибір!</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>
+ <translation>Використовуйте останні відео драйвери щоб уникнути проблем під час гри.</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>
+ <translation>Ви можете знайти файли конфігурації Hedgewars в "My Documents\Hedgewars". Ви можете створити резервні копії або взяти файли з собою, але не редагуйте їх.</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>
+ <translation>Ви можете зв'язати відповідні файли Hedgewars (файли збереження та демо-записи) з грою щоб запускати їх з вашої улюбленої теки чи інтернет-браузеру.</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>
+ <translation>Хочете заощадити мотузки? Випустіть мотузку в повітря а потім знову стріляйте. Поки ви не торкнулись грунту ви можете знову використовувати мотузку, не витрачаючи боєприпаси!</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>
+ <translation>Ви можете знайти файли конфігурації Hedgewars в "Library/Application Support/Hedgewars" в домашній теці. Ви можете створити резервні копії або взяти файли з собою, але не редагуйте їх.</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>
+ <translation>Ви можете знайти файли конфігурації Hedgewars в ".hedgewars" в домашній теці. Ви можете створити резервні копії або взяти файли з собою, але не редагуйте їх.</translation>
</message>
</context>
<context>
@@ -718,19 +725,43 @@
</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>
+ <translation>Не можна редагувати команду з меню вибору. Перейдіть в головне меню щоб додати, редагувати чи видалити команду.</translation>
+ </message>
+ <message>
+ <source>New scheme</source>
+ <translation>Нова схема</translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation>Редагувати схему</translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation>Видалити схему</translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation>Новий набір зброї</translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation>Редагувати набір зброї</translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation>Видалити набір зброї</translation>
</message>
</context>
<context>
@@ -856,32 +887,33 @@
</message>
<message>
<source>State:</source>
- <translation type="unfinished"></translation>
+ <translation>Стан:</translation>
</message>
<message>
<source>Rules:</source>
- <translation type="unfinished"></translation>
+ <translation>Правила:</translation>
</message>
<message>
<source>Weapons:</source>
- <translation type="unfinished"></translation>
+ <translation>Зброя:</translation>
</message>
<message>
<source>Search:</source>
- <translation type="unfinished"></translation>
+ <translation>Пошук:</translation>
</message>
<message>
<source>Clear</source>
- <translation type="unfinished"></translation>
+ <translation>Очистити</translation>
</message>
<message>
<source>Warning</source>
- <translation type="unfinished"></translation>
+ <translation>Увага</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>
+ <translation>Гра, до якої ви хочети при'єднатись вже почалась.
+Ви все ще хочете ввійти в кімнату?</translation>
</message>
</context>
<context>
@@ -972,23 +1004,31 @@
</message>
<message>
<source>AI respawns on death.</source>
- <translation type="unfinished"></translation>
+ <translation>AI відроджуються після смерті</translation>
</message>
<message>
<source>All (living) hedgehogs are fully restored at the end of turn</source>
- <translation type="unfinished"></translation>
+ <translation>Всі (живі) їжаки повністю відновлюються на кінці ходу</translation>
</message>
<message>
<source>Attacking does not end your turn.</source>
- <translation type="unfinished"></translation>
+ <translation>Атака не завершує ваш хід</translation>
</message>
<message>
<source>Weapons are reset to starting values each turn.</source>
- <translation type="unfinished"></translation>
+ <translation>Зброя скидається до початкової після кожного ходу.</translation>
</message>
<message>
<source>Each hedgehog has its own ammo. It does not share with the team.</source>
- <translation type="unfinished"></translation>
+ <translation>Кожен їжак має свої боєприпаси. Він не ділить їх з командою.</translation>
+ </message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation>Більше не треба хвилюватись через вітер.</translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation>Вітер вплине майже на все.</translation>
</message>
</context>
<context>
@@ -1001,6 +1041,10 @@
<source>Delete</source>
<translation>Видалити</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation>Нова</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
@@ -1026,7 +1070,7 @@
</message>
<message>
<source>Campaign Mode (...). IN DEVELOPMENT</source>
- <translation type="unfinished"></translation>
+ <translation>Режим Кампанії (...). В РОЗРОБЦІ</translation>
</message>
</context>
<context>
@@ -1159,19 +1203,19 @@
</message>
<message>
<source>Community</source>
- <translation type="unfinished"></translation>
+ <translation>Спільнота</translation>
</message>
<message>
<source>Any</source>
- <translation type="unfinished"></translation>
+ <translation>Усі</translation>
</message>
<message>
<source>In lobby</source>
- <translation type="unfinished"></translation>
+ <translation>В вестибюлі</translation>
</message>
<message>
<source>In progress</source>
- <translation type="unfinished"></translation>
+ <translation>В процесі</translation>
</message>
<message>
<source>Default</source>
@@ -1198,7 +1242,7 @@
</message>
<message>
<source>Weapons</source>
- <translation>Зброя</translation>
+ <translation type="obsolete">Зброя</translation>
</message>
<message>
<source>Audio/Graphic options</source>
@@ -1228,6 +1272,10 @@
<source>Misc</source>
<translation>Різне</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation>Схеми та Зброя</translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1293,7 +1341,7 @@
</message>
<message>
<source>Server name:</source>
- <translation>Назва серверу:</translation>
+ <translation>Назва сервера:</translation>
</message>
<message>
<source>Server port:</source>
@@ -1368,42 +1416,36 @@
<translation>Вибухівка</translation>
</message>
<message>
- <source>This SVN 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="obsolete">Ця збірка SVN є проміжною і може бути несумісною з іншими версіями гри.
-Деякі функції можуть бути зламані чи неповні. Використовуйте її на свій страх і ризик!</translation>
- </message>
- <message>
<source>Tip: </source>
- <translation type="unfinished"></translation>
+ <translation>Порада: </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>
+ <translation>Ця розробницька збірка є проміжною і може бути несумісною з іншими версіями гри. Деякі функції можуть бути зламані чи неповні. Використовуйте її на свій страх і ризик!</translation>
</message>
<message>
<source>Quality</source>
- <translation type="unfinished"></translation>
+ <translation>Якість</translation>
</message>
<message>
<source>% Health Crates</source>
- <translation type="unfinished"></translation>
+ <translation>% Ящиків Здоров'я</translation>
</message>
<message>
<source>Health in Crates</source>
- <translation type="unfinished"></translation>
+ <translation>Здоров'я в Ящиках</translation>
</message>
<message>
<source>Sudden Death Water Rise</source>
- <translation type="unfinished"></translation>
+ <translation>Підйом Води Раптової Смерті</translation>
</message>
<message>
<source>Sudden Death Health Decrease</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Bind schemes and weapons</source>
- <translation type="unfinished"></translation>
+ <translation>Зменшення Здоров'я Раптової Смерті</translation>
+ </message>
+ <message>
+ <source>% Rope Length</source>
+ <translation>% Довжина Мотузки</translation>
</message>
</context>
<context>
@@ -1452,7 +1494,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>
@@ -1460,15 +1502,39 @@
</message>
<message>
<source>Can not overwrite default weapon set '%1'!</source>
- <translation type="unfinished"></translation>
+ <translation>Не можу перезаписати стандартний набір зброї '%1'!</translation>
</message>
<message>
<source>All file associations have been set.</source>
- <translation type="unfinished"></translation>
+ <translation>Всі асоціації файлів були встановлені</translation>
</message>
<message>
<source>File association failed.</source>
- <translation type="unfinished"></translation>
+ <translation>Файлове асоціювання не вдалось</translation>
+ </message>
+ <message>
+ <source>Teams</source>
+ <translation>Команди</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation>Справді видалити цю команду?</translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation>Схеми</translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation>Не можу видалити стандартну схему '%1'!</translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation>Справді видалити цю схему гри?</translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation>Не можу видалити стандартний набір зброї '%1'!</translation>
</message>
</context>
<context>
@@ -1562,7 +1628,7 @@
</message>
<message>
<source>Associate file extensions</source>
- <translation type="unfinished"></translation>
+ <translation>Асоціювати файлові розширення</translation>
</message>
</context>
<context>
@@ -1573,11 +1639,11 @@
</message>
<message>
<source>C</source>
- <translation>C</translation>
+ <translation>Кл</translation>
</message>
<message>
<source>T</source>
- <translation>T</translation>
+ <translation>Км</translation>
</message>
<message>
<source>Owner</source>
@@ -1614,6 +1680,10 @@
<source>Delays</source>
<translation>Затримки</translation>
</message>
+ <message>
+ <source>new</source>
+ <translation>нова</translation>
+ </message>
</context>
<context>
<name>TCPBase</name>
@@ -1702,23 +1772,31 @@
</message>
<message>
<source>AI Survival Mode</source>
- <translation type="unfinished"></translation>
+ <translation>Режим AI Виживання</translation>
</message>
<message>
<source>Reset Health</source>
- <translation type="unfinished"></translation>
+ <translation>Скинути Здоров'я</translation>
</message>
<message>
<source>Unlimited Attacks</source>
- <translation type="unfinished"></translation>
+ <translation>Необмежені Атаки</translation>
</message>
<message>
<source>Reset Weapons</source>
- <translation type="unfinished"></translation>
+ <translation>Скинути Зброю</translation>
</message>
<message>
<source>Per Hedgehog Ammo</source>
- <translation type="unfinished"></translation>
+ <translation>Боєприпаси на Їжака</translation>
+ </message>
+ <message>
+ <source>Disable Wind</source>
+ <translation>Вимкнути Вітер</translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation>Більше Вітру</translation>
</message>
</context>
<context>
@@ -1745,7 +1823,7 @@
</message>
<message>
<source>precise aim</source>
- <translation>precise aim</translation>
+ <translation>точна ціль</translation>
</message>
<message>
<source>put</source>
@@ -1883,7 +1961,7 @@
</message>
<message>
<source>slot 10</source>
- <translation type="unfinished">слот 10</translation>
+ <translation>слот 10</translation>
</message>
</context>
<context>
@@ -2008,7 +2086,7 @@
</message>
<message>
<source>Delete</source>
- <translation type="unfinished">Видалити</translation>
+ <translation type="unfinished"></translation>
</message>
<message>
<source>Mouse: Left button</source>
--- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Sun Dec 19 13:31:55 2010 -0500
@@ -5,7 +5,7 @@
<name>AmmoSchemeModel</name>
<message>
<source>new</source>
- <translation>新</translation>
+ <translation>新建</translation>
</message>
</context>
<context>
@@ -40,8 +40,8 @@
<translation>修改武器</translation>
</message>
<message>
- <source>When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)</source>
- <translation type="unfinished"></translation>
+ <source>When this option is enabled selecting a game scheme will auto-select a weapon</source>
+ <translation>使用此项则游戏框架自动选择武器配备</translation>
</message>
</context>
<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>
@@ -91,17 +91,17 @@
</message>
<message>
<source>DefaultTeam</source>
- <translation>默认团队</translation>
+ <translation>默认队伍</translation>
</message>
<message>
<source>Hedgewars Demo File</source>
<comment>File Types</comment>
- <translation>刺猬杀演示文件</translation>
+ <translation>刺猬大作战回放文件</translation>
</message>
<message>
<source>Hedgewars Save File</source>
<comment>File Types</comment>
- <translation>刺猬杀存储文件</translation>
+ <translation>刺猬大作战存档文件</translation>
</message>
</context>
<context>
@@ -151,7 +151,7 @@
</message>
<message>
<source>Wacky</source>
- <translation>曲折</translation>
+ <translation>险峻</translation>
</message>
<message>
<source>Type</source>
@@ -159,34 +159,34 @@
</message>
<message>
<source>Small tunnels</source>
- <translation>小型洞窟</translation>
+ <translation>小型隧道</translation>
</message>
<message>
<source>Medium tunnels</source>
- <translation>中型洞窟</translation>
+ <translation>中型隧道</translation>
</message>
<message>
<source>Large tunnels</source>
- <translation>大型洞窟</translation>
+ <translation>大型隧道</translation>
</message>
<message>
<source>Small floating islands</source>
- <translation>小型浮动岛屿</translation>
+ <translation>小型漂浮岛屿</translation>
</message>
<message>
<source>Medium floating islands</source>
- <translation>重型浮动岛屿</translation>
+ <translation>中型漂浮岛屿</translation>
</message>
<message>
<source>Large floating islands</source>
- <translation>大型浮动岛屿</translation>
+ <translation>大型漂浮岛屿</translation>
</message>
</context>
<context>
<name>HWNetServersModel</name>
<message>
<source>Title</source>
- <translation>标题</translation>
+ <translation>名称</translation>
</message>
<message>
<source>IP</source>
@@ -201,7 +201,7 @@
<name>HWNewNet</name>
<message>
<source>The host was not found. Please check the host name and port settings.</source>
- <translation>没有这个主机。请检查主机名和端口设置。</translation>
+ <translation>没找到主机。请检查主机名和端口设置。</translation>
</message>
<message>
<source>Connection refused</source>
@@ -209,7 +209,7 @@
</message>
<message>
<source>Quit reason: </source>
- <translation>退出原因: </translation>
+ <translation>退出原因:</translation>
</message>
<message>
<source>Room destroyed</source>
@@ -235,19 +235,19 @@
</message>
<message>
<source>%1 *** %2 has joined the room</source>
- <translation>%1 *** %2已经进入房间</translation>
+ <translation>%1 *** %2 进入这个房间了</translation>
</message>
<message>
<source>%1 *** %2 has joined</source>
- <translation>%1 *** %2已经进入</translation>
+ <translation>%1 *** %2 加入了</translation>
</message>
<message>
<source>%1 *** %2 has left (%3)</source>
- <translation>%1 *** %2已经离开(%3)</translation>
+ <translation>%1 *** %2 离开了(%3)</translation>
</message>
<message>
<source>%1 *** %2 has left</source>
- <translation>%1 *** %2已经离开</translation>
+ <translation>%1 *** %2 离开了</translation>
</message>
<message>
<source>Your nickname %1 is
@@ -264,7 +264,7 @@
<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>SDL_ttf 返回错误-渲染文字失败,可能有关freetype2的bug。建议升级 freetype。</translation>
+ <translation>渲染文字时SDL_ttf 返回错误,可能有关freetype2的bug。建议升级 freetype。</translation>
</message>
</context>
<context>
@@ -287,11 +287,11 @@
</message>
<message>
<source>Server message for latest version:</source>
- <translation>最新版本的服务器信息: </translation>
+ <translation>最新版本的服务器信息</translation>
</message>
<message>
<source>Server message for previous versions:</source>
- <translation>之前版本的服务器信息: </translation>
+ <translation>之前版本的服务器信息</translation>
</message>
<message>
<source>Latest version protocol number:</source>
@@ -348,54 +348,54 @@
</message>
<message>
<source>Health graph</source>
- <translation>生命值图表</translation>
+ <translation>健康值图形</translation>
</message>
<message>
<source>Ranking</source>
- <translation>等级</translation>
+ <translation>排名</translation>
</message>
<message>
<source>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</source>
- <translation>最佳射手奖给与 <b>%1</b>:伤害 <b>%2</b>点。</p></translation>
+ <translation>最佳射手<b>%1</b>为同族制造了<b>%2</b>点创伤</translation>
</message>
<message numerus="yes">
<source>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</source>
<translation>
- <numerusform>最佳杀手是 <b>%1</b>单回合击杀 <b>%2</b> 只刺猬.</numerusform>
+ <numerusform>最佳杀手<b>%1</b> 完成了单回合<b>%2</b>次击杀</numerusform>
</translation>
</message>
<message numerus="yes">
<source>A total of <b>%1</b> hedgehog(s) were killed during this round.</source>
<translation>
- <numerusform>本轮总共有 <b>%1</b> 只刺猬被击杀.</p></numerusform>
+ <numerusform>总共<b>%1</b>只刺猬在本轮失去生命。</numerusform>
</translation>
</message>
<message numerus="yes">
<source>(%1 kill)</source>
- <translation type="unfinished">
- <numerusform>(%1 灭杀)</numerusform>
+ <translation>
+ <numerusform>(%1 击杀)</numerusform>
</translation>
</message>
<message>
<source>(%1 kills)</source>
- <translation type="obsolete">(%1 灭杀)</translation>
+ <translation type="obsolete">(%1 击杀)</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><b>%1</b>另外,射击己方刺猬损失<b>%2</b>点血。</numerusform>
+ <translation>
+ <numerusform><b>%1</b>以为给自己的刺猬造成 <b>%2</b> 点创伤是小意思。</numerusform>
</translation>
</message>
<message numerus="yes">
<source><b>%1</b> killed <b>%2</b> of his own hedgehogs.</source>
- <translation type="unfinished">
- <numerusform><b>%1</b>个刺猬被<b>%2</b>己方的刺猬误伤.</numerusform>
+ <translation>
+ <numerusform><b>%1</b> 整垮了 <b>%2</b> 只自己的刺猬。</numerusform>
</translation>
</message>
<message numerus="yes">
<source><b>%1</b> was scared and skipped turn <b>%2</b> times.</source>
- <translation type="unfinished">
- <numerusform><b>%1</b>被迫跳过<b>%2</b>回合。</numerusform>
+ <translation>
+ <numerusform><b>%1</b> 受惊了,共计 <b>%2</b> 次放弃。</numerusform>
</translation>
</message>
</context>
@@ -422,62 +422,62 @@
<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>如果不确定该怎么做,不要浪费弹药,跳过此回合。但是注意突然死亡的时间!</translation>
+ <translation>加入不确定怎么做,不要浪费弹药,跳过此回合。但是注意突然时间!</translation>
</message>
<message>
<source>Want to save ropse? 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="obsolete">想节省绳子数量?在半空释放然后再次射出。只要不触地即可继续使用同一根而不浪费!</translation>
+ <translation type="obsolete">保存绳子?在半空释放然后再次射出。只要不接触地面停止就可以继续使用同一根不会浪费!</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>如果您让自己的昵称不被别人使用,请到 http://www.hedgewars.org/. 注册一个帐号吧.</translation>
+ <translation>如果您确定好了一个昵称不想让别人使用,那么在 http://www.hedgewars.org/. 注册一个帐号吧</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>厌倦了默认的游戏?试试做任务吧——多种游戏模式让你无限选择.</translation>
+ <translation>厌倦了默认的玩法?试试任务——</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>默认时记录中最后的一次被称做Demo,选择单机游戏——然后选Demo——然后点击右下角开始回放或整理。</translation>
+ <translation>默认情况下游戏记录最后的游戏作为Demo,选择单机游戏——然后Demo——然后点击右下角开始回放或者整理。</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>“刺猬杀”是一个开源的免费软件,它充分利用了我们的业余时间。如果您有问题,到论坛来吧,不过不要期待全天候支持!</translation>
+ <translation>刺猬大作战是一个开放源代码的免费软件,它充分利用了我们的业余时间。如果您有问题,到论坛来吧,不过7×24小时支持不可能!</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>“刺猬杀”是一个开源的免费软件,它充分利用了我们的业余时间。如果您你喜欢它就来贡献你的力量吧!</translation>
+ <translation>刺猬大作战是一个开放源代码的免费软件,它充分利用了我们的业余时间。如果您喜欢它,我们接受您的捐赠/感谢!</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>“刺猬杀”是一个开源的免费软件,它充分利用了我们的业余时间。如果您你喜欢它,与别人分享吧!</translation>
+ <translation>刺猬大作战是一个开放源代码的免费软件,它充分利用了我们的业余时间。与他人分享它吧!</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>官方一直就有不断的对战,随时可以去 http://www.hedgewars.org/ 参加。</translation>
+ <translation>官方的竞赛一直存在。临近时去 http://www.hedgewars.org/ 即可看到。</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>Hedgewars 被翻译成多种语言,中文是“刺猬杀”——同样为翻译名。如果您觉得语言翻译有什么缺失/过时/遗漏或任何问题,请联系我们吧!</translation>
+ <translation>Hedgewars 被翻译成多种语言,中文是刺猬大作战——同样为翻译名。如果您的语言翻译有什么缺失/过时/遗漏或任何问题,来联系我们吧!</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>“刺猬杀”是一款跨平台游戏,可以运行的操作系统包括:GNU/Linux、Mac OS X、MicroSoft Windows、iOS等。</translation>
+ <translation>刺猬大作战可以运行的操作系统包括:GNU/Linux、Mac OS X、MicroSoft Windows。</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>您可以建立自己的网络游戏/局域网游戏。不仅限于 "简单游戏" 模式。</translation>
+ <translation>您可以建立自己的网络游戏/局域网游戏。不仅限于 "简单游戏" 选项。</translation>
</message>
<message>
<source>Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server.</source>
@@ -492,42 +492,42 @@
<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>假如你的显卡不能提供OpenGL硬件加速,试着用降低效果的方式运行。</translation>
+ <translation>假如你的显卡不能提供OpenGL硬件加速,试着用降低效果的方式运行</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>我们接受意见和建设性反馈。假如您有好点子或者不喜欢的东西,请告诉我们!</translation>
+ <translation>我们接受意见和建设性反馈。假如您有好电子或者不喜欢的东西,告诉我们!</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>特别是网络游戏,请注意礼节。记住:对方也和您一样是人!</translation>
+ <translation>特别是网络游戏,请有礼貌记住对方也和您一样是人!</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>特别游戏模式“吸血“、”因果报应“需要全新的战术。来"自定义游戏"里试试!</translation>
+ <translation>特别游戏模式“吸血“、”因果报应“需要全新的战术。现在自定义游戏里试试!</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>Windows版本的"刺猬杀"支持Xfire。添加它到游戏列表里让您的朋友看到。</translation>
+ <translation>Windows版本的刺猬大作战支持Xfire。添加它到游戏列表里让您的朋友看到。</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>您不应该在不属于您的计算机上安装“刺猬杀”——比如学校/工作场所!</translation>
+ <translation>您不应该在不属于您的计算机上安装刺猬大作战——比如学校/工作场所。</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>“刺猬杀”适合短时间休闲游戏,不需要将大量刺猬挤在一幅超大地图上。</translation>
+ <translation>刺猬大作战适合短时间休息,不需要太多刺猬挤在大地图上。</translation>
</message>
<message>
<source>No hedgehogs were harmed in making this game.</source>
<comment>Tips</comment>
- <translation>制作这个游戏时不曾伤害任何刺猬。</translation>
+ <translation>制作这个游戏时不曾伤害任何刺猬</translation>
</message>
<message>
<source>Connect one or more gamepads before launching the game to be able to assign their controls to your teams.</source>
@@ -537,142 +537,152 @@
<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>“刺猬杀”是一个开源的免费软件,它充分利用了我们的业余时间。如果有人想要将它卖给你,请你拒绝他!</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>游戏运行前连上游戏板,让你的团队充分控制刺猬.</translation>
+ <translation>刺猬大作战是开放源代码的免费软件,用我们的闲暇时间创造。如果有人卖给你,那么应该把钱拿回来!</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>在官方服务器 %1 建立自己的帐号,就可以在官方服务器使用你最喜欢的昵称了.</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>假如你的显卡不能提供OpenGL硬件加速,试着用降低效果的方式运行。</translation>
+ <translation>在 %1 建立一个帐号阻止其他人使用你喜欢的名称在官方服务器游戏。</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>三种跳跃模式,快速按两次 [长跳] 键可以跳到非常高/向后跳.</translation>
+ <translation>三种跳跃方式。点击[高跳]两次做出跳跃高度极限的后空翻。</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>害怕掉进深渊?一直按住[精确控制]建并按[左][右]不用移动.</translation>
+ <translation>害怕掉下悬崖?按住[精确]后再点击[左][右]就会只转身,不移动位置。</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>一些武器需要特别的技能与足够的训练,因此不要放弃练习,即便是失败。是曰:屡败屡战。</translation>
+ <translation>有些武器需要特殊策略或者仅仅是大量的练习,假如你一次失去准星,也不要放弃。</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>大多数武器在碰到水面的时候就失效了,除了“野蜂飞舞”和“蛋糕”。</translation>
+ <translation>多数武器不会在接触水之后生效。归巢的蜜蜂和蛋糕是例外。</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>毒奶酪只能造成不大的杀伤,不过能形成一片毒云并杀伤一片的刺猬.</translation>
+ <translation>老干酪发射器造成小规模爆炸,然后产生随风移动的有毒云雾——能一次毒害多个刺猬。</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>钢琴攻击能产生极大的空袭杀伤,同时你将失去这个刺猬,所以这招实在是个下下策.</translation>
+ <translation>钢琴攻击是最大威力的空袭。弹奏钢琴的刺猬会跟着钢琴返回天堂。</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>“野蜂飞舞”可以蓄力使用,它旋转时的精度依赖于其速度,所以没必要发全力.</translation>
+ <translation>归巢的蜜蜂有些技巧。它的回转半径和初速有关,最好不用全力发射。</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>近身地雷完美的构建了一个链子因此可以将敌人打入地下或者...水里.</translation>
+ <translation>黏着地雷是创造小范围连锁反应的绝佳武器。</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>大捶主要用在桥梁或者薄板,可以将敌人敲下去.</translation>
+ <translation>锤是桥梁上/分界处最佳武器之一,只是刚刚好把刺猬打陷——如果没底就没办法了。</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>如果你被敌人围困,可以用大锤来解围。</translation>
+ <translation>假如对方刺猬把你堵住了,一锤打下去让自己轻松些。</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>蛋糕最大行走距离取决于地形边缘,用[攻击]键尽早结束它。</translation>
+ <translation>蛋糕的最大行走距离取决于地表。也可按下[攻击键]激活起爆。</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>[钻洞器]既可以当作武器,也可以用做为打洞器。</translation>
+ <translation>火焰喷射器是一种武器,也是一种开路机器。</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>可以用“飞碟”让刺猬暂时离开洞穴等地形环境.</translation>
+ <translation>燃烧瓶可以短时阻止刺猬通过特定区域(比如通道或平台)</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>想知道是谁贡献的这个游戏?请在主界面点击“Hedgewars”LOGO就可以看到“制作团队”.</translation>
- </message>
- <message>
- <source>Like Hedgewars? Become a fan on %1 or follow us on %2!</source>
+ <translation>想要知道谁是此游戏的幕后人员?点击主菜单的Hedgewars Logo就可以看到贡献者名单。</translation>
+ </message>
+ <message>
+ <source>Like hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well!</source>
+ <comment>Tips</comment>
+ <translation type="obsolete">喜欢刺猬大作战(hedgewars)?那么加入我们 %1 或者 %2.。你可以在 %3 跟随我们!</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>你可以在( 我的文档\Hedgewars)里找到设置文件。可以创建备份,但不要手动修改。</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>喜欢刺猬杀? 来做我们的粉丝吧可以到%1或者%2!</translation>
+ <translation type="obsolete">你可以在家目录找到 .hedgewars。可以创建备份,但不要手动修改。</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>在游戏开始前连接游戏手柄才能用于操控</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>加入你的显卡不能使用OpenGL硬件加速,请升级相应驱动。</translation>
+ </message>
+ <message>
+ <source>Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well!</source>
+ <comment>Tips</comment>
+ <translation type="obsolete">喜欢刺猬大作战(Hedgewars)吗?加入 %2 ,成为 %1 粉丝,也可以在 %3 跟随我们!</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>你可以自由的构建自己的头像、帽子、旗帜甚至是地图和主题!但是请注意:你需要将这些在线分享出来。</translation>
+ <translation>欢迎你自己绘制墓碑,帽子(头饰),旗帜或者地图,主题!但是记住,如果要在网上使用,你的必须把它们分享出来。</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>喜欢一个很特别的帽子图案?贡献你的力量吧,你将得到一个属于自己的帽子图案!</translation>
+ <translation>非常想要一个帽子?捐赠的话就给你!</translation>
</message>
<message>
<source>Keep your video card drivers up to date to avoid issues playing the game.</source>
<comment>Tips</comment>
- <translation>让你的显卡保持更新以便避免一些已知的游戏问题。</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>你可以在“我的文档\Hedgewars”文件夹下找到“刺猬杀”的配置文件,可以新建和备份但不要随便修改。</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="obsolete">你可以在你的主文件夹下下找到“Hedgewars”文件夹,里面又配置文件,你可以新建和备份这个文件,但请不要随便编辑它.</translation>
+ <translation>保持显卡驱动最新避免可能的麻烦。</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>你可以组织刺猬杀的相关文件(保存的游戏和演示还有录像),通过收藏夹或者浏览器.</translation>
+ <translation>你可以使用网络浏览器或已存在的文件关联刺猬大作战的相关文件(比如存档和回放)</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>
+ <translation>想要节省绳子?放开绳子之后再次发射,只要你不曾脱离绳子接触接触地面就可以继续使用同一根!</translation>
+ </message>
+ <message>
+ <source>Like Hedgewars? Become a fan on %1 or follow us on %2!</source>
+ <comment>Tips</comment>
+ <translation>喜欢刺猬大作战Hedgewars吗?来 %1 或者 %2 追随我们吧!</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>
+ <translation>在家目录的"Library/Application Support/Hedgewars"找到刺猬的配置文件。备份随你,但是不要手动编辑。</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>
+ <translation>在家目录的".hedgewars"找到刺猬的配置文件。备份随你,但是不要手动编辑。</translation>
</message>
</context>
<context>
@@ -727,19 +737,43 @@
</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>
+ <translation>您不能在队伍选择界面修改队伍。请返回主页面进行添加、修改、删除队伍等操作。</translation>
+ </message>
+ <message>
+ <source>New scheme</source>
+ <translation>新框架</translation>
+ </message>
+ <message>
+ <source>Edit scheme</source>
+ <translation>修改框架</translation>
+ </message>
+ <message>
+ <source>Delete scheme</source>
+ <translation>删除框架</translation>
+ </message>
+ <message>
+ <source>New weapon set</source>
+ <translation>新武器配置</translation>
+ </message>
+ <message>
+ <source>Edit weapon set</source>
+ <translation>修改武器配置</translation>
+ </message>
+ <message>
+ <source>Delete weapon set</source>
+ <translation>删除武器配置</translation>
</message>
</context>
<context>
@@ -838,7 +872,7 @@
<message numerus="yes">
<source>There are %1 clients connected to this room.</source>
<translation>
- <numerusform>有 %1 个客户端连接到这个房间.</numerusform>
+ <numerusform>有 %1 个客户端连接到这个房间。</numerusform>
</translation>
</message>
<message numerus="yes">
@@ -861,33 +895,33 @@
</message>
<message>
<source>State:</source>
- <translation>状态: </translation>
+ <translation>游戏状态</translation>
</message>
<message>
<source>Rules:</source>
- <translation>规则: </translation>
+ <translation>规则</translation>
</message>
<message>
<source>Weapons:</source>
- <translation>武器: </translation>
+ <translation>武器</translation>
</message>
<message>
<source>Search:</source>
- <translation>搜索: </translation>
+ <translation>搜索</translation>
</message>
<message>
<source>Clear</source>
- <translation>清除:</translation>
+ <translation>清除</translation>
</message>
<message>
<source>Warning</source>
- <translation>警告:</translation>
+ <translation>警告</translation>
</message>
<message>
<source>The game you are trying to join has started.
Do you still want to join the room?</source>
- <translation>游戏正在大厅中。
-你是否想去观战?</translation>
+ <translation>你要加入的游戏已经开始了。
+还要进入房间吗?</translation>
</message>
</context>
<context>
@@ -902,19 +936,19 @@
</message>
<message>
<source>Defend your fort and destroy the opponents, two team colours max!</source>
- <translation>保卫你的城堡,破坏对手的,对战努力吧!</translation>
+ <translation>保卫你的城堡,破坏对手的,努力吧!</translation>
</message>
<message>
<source>Teams will start on opposite sides of the terrain, two team colours max!</source>
- <translation>队伍开始在对手的地盘,努力!</translation>
+ <translation>队伍开始在对手的地盘,努力!</translation>
</message>
<message>
<source>Land can not be destroyed!</source>
- <translation>地面无法破坏!</translation>
+ <translation>地面无法破坏!</translation>
</message>
<message>
<source>Add an indestructable border around the terrain</source>
- <translation>添加不可毁坏地形</translation>
+ <translation>添加不可毁坏地边界</translation>
</message>
<message>
<source>Lower gravity</source>
@@ -954,15 +988,15 @@
</message>
<message>
<source>Order of play is random instead of in room order.</source>
- <translation>随机出场顺序。</translation>
+ <translation>随机出场顺序</translation>
</message>
<message>
<source>Play with a King. If he dies, your side dies.</source>
- <translation>国王不能死!!否则自动输。</translation>
+ <translation>国王不能死!!</translation>
</message>
<message>
<source>Take turns placing your hedgehogs before the start of play.</source>
- <translation>在开局前手动放置刺猬。</translation>
+ <translation>在开局前手动放置刺猬</translation>
</message>
<message>
<source>Ammo is shared between all teams that share a colour.</source>
@@ -970,31 +1004,39 @@
</message>
<message>
<source>Disable girders when generating random maps.</source>
- <translation>禁止随机生成地图使用梁。</translation>
+ <translation>禁止随机生成地图使用梁</translation>
</message>
<message>
<source>Disable land objects when generating random maps.</source>
- <translation>禁止随机生成地图使用地面物体。</translation>
+ <translation>禁止随机生成地图使用地面物体</translation>
</message>
<message>
<source>AI respawns on death.</source>
- <translation>AI死后重生。</translation>
+ <translation>AI 死亡再生</translation>
+ </message>
+ <message>
+ <source>Attacking does not end your turn.</source>
+ <translation>攻击不会结束当前回合</translation>
+ </message>
+ <message>
+ <source>Weapons are reset to starting values each turn.</source>
+ <translation>每回合开始武器自动重置到默认设定</translation>
+ </message>
+ <message>
+ <source>Each hedgehog has its own ammo. It does not share with the team.</source>
+ <translation>每个刺猬都有独立的弹药,非团队分享</translation>
</message>
<message>
<source>All (living) hedgehogs are fully restored at the end of turn</source>
- <translation>所有或者的刺猬结局的时候都会被保存</translation>
- </message>
- <message>
- <source>Attacking does not end your turn.</source>
- <translation>不会终结你的回合.</translation>
- </message>
- <message>
- <source>Weapons are reset to starting values each turn.</source>
- <translation>每轮武器的配置都会重置.</translation>
- </message>
- <message>
- <source>Each hedgehog has its own ammo. It does not share with the team.</source>
- <translation>每个刺猬都有其自己的武器. 并在奔队中不共享.</translation>
+ <translation>所有活着的刺猬回合结尾时彻底恢复健康。</translation>
+ </message>
+ <message>
+ <source>You will not have to worry about wind anymore.</source>
+ <translation>不用担心风的影响了。</translation>
+ </message>
+ <message>
+ <source>Wind will affect almost everything.</source>
+ <translation>风无所不在。</translation>
</message>
</context>
<context>
@@ -1007,12 +1049,16 @@
<source>Delete</source>
<translation>删除</translation>
</message>
+ <message>
+ <source>New</source>
+ <translation>新模式</translation>
+ </message>
</context>
<context>
<name>PageSinglePlayer</name>
<message>
<source>Simple Game (a quick game against the computer, settings are chosen for you)</source>
- <translation>快速游戏 (对抗电脑,固定设置)</translation>
+ <translation>快速游戏 (使用预设对抗电脑)</translation>
</message>
<message>
<source>Multiplayer (play a hotseat game against your friends, or AI teams)</source>
@@ -1032,7 +1078,7 @@
</message>
<message>
<source>Campaign Mode (...). IN DEVELOPMENT</source>
- <translation>对战模式(...)开发中</translation>
+ <translation>战役模式 ——开发中</translation>
</message>
</context>
<context>
@@ -1110,11 +1156,11 @@
</message>
<message>
<source>Frontend fullscreen</source>
- <translation>界面全屏幕</translation>
+ <translation>前端界面全屏幕</translation>
</message>
<message>
<source>Append date and time to record file name</source>
- <translation>记录名称中包含具体时间日期</translation>
+ <translation>记录名称中包含具体时间和日期</translation>
</message>
<message>
<source>Reduced quality</source>
@@ -1126,15 +1172,15 @@
</message>
<message>
<source>Enable frontend sounds</source>
- <translation>开启界面音效</translation>
+ <translation>开启前端界面音效</translation>
</message>
<message>
<source>Enable frontend music</source>
- <translation>开启界面音乐</translation>
+ <translation>开启前端界面音乐</translation>
</message>
<message>
<source>Frontend effects</source>
- <translation>界面效果</translation>
+ <translation>前端界面效果</translation>
</message>
</context>
<context>
@@ -1157,7 +1203,7 @@
</message>
<message>
<source>generated maze...</source>
- <translation>生成的迷宫...</translation>
+ <translation>生成迷宫</translation>
</message>
<message>
<source>Mission</source>
@@ -1169,15 +1215,15 @@
</message>
<message>
<source>Any</source>
- <translation>任何</translation>
+ <translation>任意</translation>
</message>
<message>
<source>In lobby</source>
- <translation>在线状态</translation>
+ <translation>大厅中</translation>
</message>
<message>
<source>In progress</source>
- <translation>使用中</translation>
+ <translation>进行中</translation>
</message>
<message>
<source>Default</source>
@@ -1185,31 +1231,31 @@
</message>
<message>
<source>Pro mode</source>
- <translation type="obsolete">Pro 模式</translation>
+ <translation type="obsolete">高手模式</translation>
</message>
<message>
<source>Shoppa</source>
- <translation type="obsolete">绳索模式</translation>
+ <translation type="obsolete">绳子党</translation>
</message>
<message>
<source>Basketball</source>
- <translation type="obsolete">篮球模式</translation>
+ <translation type="obsolete">篮球</translation>
</message>
<message>
<source>Minefield</source>
- <translation type="obsolete">地雷模式</translation>
+ <translation type="obsolete">雷区</translation>
</message>
<message>
<source>Barrel mayhem</source>
- <translation type="obsolete">武器不共享</translation>
+ <translation type="obsolete">炼狱场</translation>
</message>
<message>
<source>Tunnel hogs</source>
- <translation type="obsolete">洞穴刺猬</translation>
+ <translation type="obsolete">刺猬洞</translation>
</message>
<message>
<source>Crazy</source>
- <translation type="obsolete">疯狂模式</translation>
+ <translation type="obsolete">疯狂刺猬</translation>
</message>
</context>
<context>
@@ -1240,11 +1286,11 @@
</message>
<message>
<source>Net game</source>
- <translation>网络游戏</translation>
+ <translation>局域网络游戏</translation>
</message>
<message>
<source>Weapons</source>
- <translation>武器</translation>
+ <translation type="obsolete">武器</translation>
</message>
<message>
<source>Game Modifiers</source>
@@ -1262,6 +1308,10 @@
<source>Misc</source>
<translation>杂项</translation>
</message>
+ <message>
+ <source>Schemes and Weapons</source>
+ <translation>游戏框架和武器配置</translation>
+ </message>
</context>
<context>
<name>QLabel</name>
@@ -1271,7 +1321,7 @@
</message>
<message>
<source>This program is distributed under the GNU General Public License</source>
- <translation>这款程序遵守GPL协议的保护</translation>
+ <translation>This program is distributed under the GNU General Public License</translation>
</message>
<message>
<source>Resolution</source>
@@ -1287,7 +1337,7 @@
</message>
<message>
<source>Art:</source>
- <translation>美化:</translation>
+ <translation>艺术:</translation>
</message>
<message>
<source>Translations:</source>
@@ -1331,7 +1381,7 @@
</message>
<message>
<source>Damage Modifier</source>
- <translation>伤害修改</translation>
+ <translation>伤害修正值</translation>
</message>
<message>
<source>Turn Time</source>
@@ -1347,7 +1397,7 @@
</message>
<message>
<source>Scheme Name:</source>
- <translation>设置名称: </translation>
+ <translation>设置名称:</translation>
</message>
<message>
<source>Crate Drops</source>
@@ -1367,7 +1417,7 @@
</message>
<message>
<source>% Dud Mines</source>
- <translation>% 地雷哑弹</translation>
+ <translation>% 地雷故障</translation>
</message>
<message>
<source>Name</source>
@@ -1391,11 +1441,11 @@
</message>
<message>
<source>Locale</source>
- <translation>本土化</translation>
+ <translation>Locale</translation>
</message>
<message>
<source>Restart game to apply</source>
- <translation>重新启动游戏应用</translation>
+ <translation>需要重新启动游戏方可应用</translation>
</message>
<message>
<source>Explosives</source>
@@ -1407,31 +1457,31 @@
</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>开发版本,尚不能和其他版本兼容,仍有不足。请谨慎使用!!</translation>
+ <translation>当前运行的为开发版本,不同其他版本兼容。功能或许损坏、不完整。请自行承担风险!</translation>
</message>
<message>
<source>Quality</source>
- <translation>价值</translation>
+ <translation>图像质量</translation>
+ </message>
+ <message>
+ <source>Sudden Death Water Rise</source>
+ <translation>死亡模式水位上涨</translation>
+ </message>
+ <message>
+ <source>Sudden Death Health Decrease</source>
+ <translation>死亡模式健康降低</translation>
+ </message>
+ <message>
+ <source>% Rope Length</source>
+ <translation>% 绳长</translation>
</message>
<message>
<source>% Health Crates</source>
- <translation>% 健康包裹</translation>
+ <translation>% 生命箱</translation>
</message>
<message>
<source>Health in Crates</source>
- <translation>包裹里有血</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>Bind schemes and weapons</source>
- <translation type="unfinished"></translation>
+ <translation>生命箱的值数</translation>
</message>
</context>
<context>
@@ -1445,7 +1495,7 @@
<name>QMainWindow</name>
<message>
<source>Hedgewars %1</source>
- <translation>刺猬杀 %1</translation>
+ <translation>刺猬大作战 %1</translation>
</message>
</context>
<context>
@@ -1468,7 +1518,7 @@
</message>
<message>
<source>Connection to server is lost</source>
- <translation>服务器连接丢失</translation>
+ <translation>与服务器的连接丢失</translation>
</message>
<message>
<source>Weapons</source>
@@ -1476,7 +1526,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>
@@ -1488,15 +1538,39 @@
</message>
<message>
<source>Can not overwrite default weapon set '%1'!</source>
- <translation>不能覆盖默认的武器配置 '%1'!</translation>
+ <translation>不能覆盖默认的武器配置 '%1'</translation>
</message>
<message>
<source>All file associations have been set.</source>
- <translation>文件联合已经存储完毕. </translation>
+ <translation>所有相关文件已经设定。</translation>
+ </message>
+ <message>
+ <source>Teams</source>
+ <translation>队伍</translation>
+ </message>
+ <message>
+ <source>Really delete this team?</source>
+ <translation>真的要删除队伍?</translation>
+ </message>
+ <message>
+ <source>Schemes</source>
+ <translation>游戏框架</translation>
+ </message>
+ <message>
+ <source>Can not delete default scheme '%1'!</source>
+ <translation>无法删除默认游戏框架 '%1'!</translation>
</message>
<message>
<source>File association failed.</source>
- <translation>文件联合失败.</translation>
+ <translation>文件关联失败</translation>
+ </message>
+ <message>
+ <source>Really delete this game scheme?</source>
+ <translation>真的删除此游戏框架?</translation>
+ </message>
+ <message>
+ <source>Can not delete default weapon set '%1'!</source>
+ <translation>无法删除武器配置%1'!</translation>
</message>
</context>
<context>
@@ -1538,7 +1612,7 @@
</message>
<message>
<source>Go!</source>
- <translation>上场!!</translation>
+ <translation>上场!</translation>
</message>
<message>
<source>Start</source>
@@ -1590,7 +1664,7 @@
</message>
<message>
<source>Associate file extensions</source>
- <translation>连接文件扩展</translation>
+ <translation>相关文件扩展</translation>
</message>
</context>
<context>
@@ -1632,15 +1706,19 @@
</message>
<message>
<source>Probabilities</source>
- <translation>几率</translation>
+ <translation>空中支援几率</translation>
</message>
<message>
<source>Ammo in boxes</source>
- <translation>弹药数</translation>
+ <translation>弹药箱</translation>
</message>
<message>
<source>Delays</source>
- <translation>延迟</translation>
+ <translation>延迟回合数</translation>
+ </message>
+ <message>
+ <source>new</source>
+ <translation>新</translation>
</message>
</context>
<context>
@@ -1730,11 +1808,7 @@
</message>
<message>
<source>AI Survival Mode</source>
- <translation>AI 复活模式</translation>
- </message>
- <message>
- <source>Reset Health</source>
- <translation>重置健康值</translation>
+ <translation>AI生存模式</translation>
</message>
<message>
<source>Unlimited Attacks</source>
@@ -1742,11 +1816,23 @@
</message>
<message>
<source>Reset Weapons</source>
- <translation>重置所有武器</translation>
+ <translation>重置武器</translation>
</message>
<message>
<source>Per Hedgehog Ammo</source>
- <translation>每个刺猬的武器</translation>
+ <translation>每个刺猬的弹药</translation>
+ </message>
+ <message>
+ <source>Reset Health</source>
+ <translation>重置生命值</translation>
+ </message>
+ <message>
+ <source>Disable Wind</source>
+ <translation>禁止风力作用</translation>
+ </message>
+ <message>
+ <source>More Wind</source>
+ <translation>让风来地更猛烈吧!</translation>
</message>
</context>
<context>
@@ -1870,7 +1956,7 @@
<message>
<source>hedgehogs
info</source>
- <translation>刺猬杀
+ <translation>刺猬大作战
信息</translation>
</message>
<message>
@@ -1937,67 +2023,67 @@
<name>binds (descriptions)</name>
<message>
<source>Move your hogs and aim:</source>
- <translation>移动您的刺猬同时瞄准: </translation>
+ <translation>移动您的刺猬同时瞄准:</translation>
</message>
<message>
<source>Traverse gaps and obstacles by jumping:</source>
- <translation>使用跳跃越过沟渠、障碍: </translation>
+ <translation>使用跳跃越过沟渠、障碍:</translation>
</message>
<message>
<source>Fire your selected weapon or trigger an utility item:</source>
- <translation>使用选择的武器开火、使用物品: </translation>
+ <translation>使用选择的武器开火、使用物品:</translation>
</message>
<message>
<source>Pick a weapon or a target location under the cursor:</source>
- <translation>选择一个武器、或者瞄准光标下的某点:</translation>
+ <translation>选取一个武器或者瞄准光标下的地点:</translation>
</message>
<message>
<source>Switch your currently active hog (if possible):</source>
- <translation>切换到您当前活动的刺猬(如果可用): </translation>
+ <translation>切换到您当前活动的刺猬(如果可用):</translation>
</message>
<message>
<source>Pick a weapon or utility item:</source>
- <translation>选择一个武器或物品: </translation>
+ <translation>选择一个武器或物品:</translation>
</message>
<message>
<source>Set the timer on bombs and timed weapons:</source>
- <translation>设置定时炸弹等武器起爆时间: </translation>
+ <translation>设置定时炸弹等武器起爆时间:</translation>
</message>
<message>
<source>Move the camera to the active hog:</source>
- <translation>移动镜头到选中的刺猬: </translation>
+ <translation>移动镜头到选中的刺猬:</translation>
</message>
<message>
<source>Move the cursor or camera without using the mouse:</source>
- <translation>不用鼠标移动光标或镜头: </translation>
+ <translation>不用鼠标移动光标或镜头:</translation>
</message>
<message>
<source>Modify the camera's zoom level:</source>
- <translation>调整镜头放大倍数: </translation>
+ <translation>调整镜头放大倍数:</translation>
</message>
<message>
<source>Talk to your team or all participants:</source>
- <translation>同队友或全部参与者对话: </translation>
+ <translation>同队友或全部参与者对话:</translation>
</message>
<message>
<source>Pause, continue or leave your game:</source>
- <translation>暂停、继续或离开游戏: </translation>
+ <translation>暂停、继续或离开游戏:</translation>
</message>
<message>
<source>Modify the game's volume while playing:</source>
- <translation>调整游戏时音量: </translation>
+ <translation>调整游戏时音量:</translation>
</message>
<message>
<source>Toggle fullscreen mode:</source>
- <translation>全屏模式: </translation>
+ <translation>全屏模式:</translation>
</message>
<message>
<source>Take a screenshot:</source>
- <translation>截图: </translation>
+ <translation>截图:</translation>
</message>
<message>
<source>Toggle labels above hedgehogs:</source>
- <translation>切换刺猬标签的显示方式: </translation>
+ <translation>切换刺猬头顶标签的显示方式:</translation>
</message>
</context>
<context>
@@ -2060,7 +2146,7 @@
</message>
<message>
<source>Tab</source>
- <translation>Tab 键</translation>
+ <translation>Tab</translation>
</message>
<message>
<source>Clear</source>
@@ -2076,7 +2162,7 @@
</message>
<message>
<source>Escape</source>
- <translation>退出键</translation>
+ <translation>ESC键(退出键)</translation>
</message>
<message>
<source>Space</source>
@@ -2084,7 +2170,7 @@
</message>
<message>
<source>Delete</source>
- <translation>删除键</translation>
+ <translation>Del(删除键)</translation>
</message>
<message>
<source>Numpad 0</source>
@@ -2276,43 +2362,43 @@
</message>
<message>
<source>Left stick (Right)</source>
- <translation>左摇杆(右)</translation>
+ <translation>右(左摇杆)</translation>
</message>
<message>
<source>Left stick (Left)</source>
- <translation>左摇杆(左)</translation>
+ <translation>左(左摇杆)</translation>
</message>
<message>
<source>Left stick (Down)</source>
- <translation>左摇杆(下)</translation>
+ <translation>下(左摇杆)</translation>
</message>
<message>
<source>Left stick (Up)</source>
- <translation>左摇杆(上)</translation>
+ <translation>上(左摇杆)</translation>
</message>
<message>
<source>Left trigger</source>
- <translation>左触发</translation>
+ <translation>左制动</translation>
</message>
<message>
<source>Right trigger</source>
- <translation>右触发</translation>
+ <translation>右制动</translation>
</message>
<message>
<source>Right stick (Down)</source>
- <translation>右摇杆(下)</translation>
+ <translation>下(右摇杆)</translation>
</message>
<message>
<source>Right stick (Up)</source>
- <translation>右摇杆(上)</translation>
+ <translation>上(右摇杆)</translation>
</message>
<message>
<source>Right stick (Right)</source>
- <translation>右摇杆(右)</translation>
+ <translation>右(右摇杆)</translation>
</message>
<message>
<source>Right stick (Left)</source>
- <translation>右摇杆(左)</translation>
+ <translation>左(右摇杆)</translation>
</message>
<message>
<source>DPad</source>
--- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Sun Dec 19 13:31:55 2010 -0500
@@ -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 Sun Dec 19 13:31:55 2010 -0500
@@ -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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Locale/pl.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,27 @@
+locale = {
+ ["Aiming Practice"] = "Potrenuj celność", --Bazooka, Shotgun, SniperRifle
+ ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Zniszcz wszystkie cele zanim upłynie czas.|W tej misji masz nieskończoną ilość amunicji.", --Bazooka, Shotgun, SniperRifle
+ ["Oh no! Time's up! Just try again."] = "Ajajaj! Koniec czasu! Spróbuj jeszcze raz.", --Bazooka, Shotgun, SniperRifle
+ ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Gratulacje! Zniszczyłeś wszystkie cele przed upłynięciem czasu.", --Bazooka, Shotgun, SniperRifle
+ ["Hunter"] = "Strzelec", --Bazooka, Shotgun, SniperRifle
+ ["Bazooka Training"] = "Trening bazooki",
+ ["'Zooka Team"] = "Bazookinierzy",
+ ["Shotgun Training"] = "Trening strzelecki",
+-- ["Shotgun Team"] =
+ ["Sniper Training"] = "Trening Snajperski",
+ ["Sniperz"] = "Snajperzy",
+ ["Not So Friendly Match"] = "Mecz Nie-Do-Końca Towarzyski", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a point!| |Score:"] = "%s utonął i drużyna %d|zdobyła punkt!| |Punktacja:", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s utonął i drużyna %d|dostała punkt karny!| |Punktacja:", -- Basketball, Knockball
+ ["Hedgewars-Basketball"] = "Hedgewars-Koszykówka",
+ ["Bat your opponents through the|baskets and out of the map!"] = "Uderzaj swoich przekiwników|wyrzucając przez kosz, poza mapę!",
+ ["Hedgewars-Knockball"] = "Hedgewars-Knockball",
+ ["Bat balls at your enemies and|push them into the sea!"] = "Uderzaj piłkami w swoich przeciwników|i strącaj ich do wody!",
+ ["TrophyRace"] = "TrophyRace",
+ ["Use your rope to get from start to finish as fast as you can!"] = "Użyj liny by jak najszybciej dotrzec od startu do mety",
+ ["You've reached the goal!| |Time: "] = "Dotarłeś do celu!| |Czas: ",
+ ["NEW fastest lap: "] = "NOWE najszybsze okrążenie: ",
+ ["Fastest lap: "] = "Najszybsze okrążenie: ",
+ ["Best laps per team: "] = "Najszybsze okrążenie drużyny: ",
+ ["Team %d: "] = "Drużyna %d: ",
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Locale/pt_BR.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,27 @@
+locale = {
+ ["Aiming Practice"] = "Pratique a sua pontaria", --Bazooka, Shotgun, SniperRifle
+ ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Destrua todos os alvos antes que o tempo acabe.|Você tem munição infinita para esta missão.", --Bazooka, Shotgun, SniperRifle
+ ["Oh no! Time's up! Just try again."] = "Oh não! O tempo acabou! Tente novamente.", --Bazooka, Shotgun, SniperRifle
+ ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Parabéns! Você eliminou todos os alvos|dentro do tempo limite.", --Bazooka, Shotgun, SniperRifle
+ ["Hunter"] = "Artilheiro", --Bazooka, Shotgun, SniperRifle
+ ["Bazooka Training"] = "Treino com a Bazuca",
+ ["'Zooka Team"] = "Bazuqueiros",
+ ["Shotgun Training"] = "Treino com a Escopeta",
+ ["Shotgun Team"] = "Carabineiros",
+ ["Sniper Training"] = "Treino com o Rifle Sniper",
+ ["Sniperz"] = "Franco-Atiradores",
+ ["Not So Friendly Match"] = "Partida não muito amigável", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a point!| |Score:"] = "%s está fora e a Equipe %d|marcou um ponto!| |Pontuação:", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s está fora e a Equipe %d|sofreu uma penalidade!| |Pontuação:", -- Basketball, Knockball
+ ["Hedgewars-Basketball"] = "Hedgewars-Basketball",
+ ["Bat your opponents through the|baskets and out of the map!"] = "Rebata seus oponentes para|fora do mapa através dos cestos!",
+ ["Hedgewars-Knockball"] = "Hedgewars-Knockball",
+ ["Bat balls at your enemies and|push them into the sea!"] = "Rebata as bolas em direção ao seus|e derrube-os no mar!",
+ ["TrophyRace"] = "TrophyRace",
+ ["Use your rope to get from start to finish as fast as you can!"] = "Use sua corda para ir do início ao fim o mais rápido que você puder!",
+ ["You've reached the goal!| |Time: "] = "Você alcançou o objetivo!| |Tempo: ",
+ ["NEW fastest lap: "] = "NOVA volta mais rápida: ",
+ ["Fastest lap: "] = "Volta mais rápida: ",
+ ["Best laps per team: "] = "Melhor volta por equipe: ",
+ ["Team %d: "] = "Equipe %d: ",
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Locale/pt_PT.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,27 @@
+locale = {
+ ["Aiming Practice"] = "Pratica a tua pontaria", --Bazooka, Shotgun, SniperRifle
+ ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Destrói todos os alvos antes do tempo terminar.|Tens munições infinitas para esta missão.", --Bazooka, Shotgun, SniperRifle
+ ["Oh no! Time's up! Just try again."] = "Oh não! Acabou o tempo! Tenta novamente.", --Bazooka, Shotgun, SniperRifle
+ ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Parabéns! Eliminaste todos os alvos|dentro do tempo limite.", --Bazooka, Shotgun, SniperRifle
+ ["Hunter"] = "Comando", --Bazooka, Shotgun, SniperRifle
+ ["Bazooka Training"] = "Treino com Bazuca",
+ ["'Zooka Team"] = "Bazuqueiros",
+ ["Shotgun Training"] = "Treino com Caçadeira",
+ ["Shotgun Team"] = "Caçadores",
+ ["Sniper Training"] = "Treino com Sniper",
+-- ["Sniperz"] =
+ ["Not So Friendly Match"] = "Partida não muito amigável", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a point!| |Score:"] = "%s está fora e a equipa %d|soma um ponto!| |Pontuação:", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s está fora e a equipa %d|perde um ponto!| |Pontuação:", -- Basketball, Knockball
+ ["Hedgewars-Basketball"] = "Hedgewars-Basketball",
+ ["Bat your opponents through the|baskets and out of the map!"] = "Bate os teus adversarios|fora do mapa acertando com eles no cesto!",
+ ["Hedgewars-Knockball"] = "Hedgewars-Knockball",
+ ["Bat balls at your enemies and|push them into the sea!"] = "Bate bolas contra os teus|enimigos e empurra-os ao mar!",
+ ["TrophyRace"] = "TrophyRace",
+ ["Use your rope to get from start to finish as fast as you can!"] = "Utilizando a corda, percorre o percurso do inicio ao fim o mais rápido que conseguires!",
+ ["You've reached the goal!| |Time: "] = "Chegaste ao fim!| |Tempo: ",
+ ["NEW fastest lap: "] = "NOVA volta recorde: ",
+ ["Fastest lap: "] = "Volta mais rápida: ",
+ ["Best laps per team: "] = "Melhores voltas por equipa: ",
+ ["Team %d: "] = "Equipa %d: ",
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Locale/sk.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,27 @@
+locale = {
+ ["Aiming Practice"] = "Tréning presnosti", --Bazooka, Shotgun, SniperRifle
+ ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Zneškodnite všetky ciele pred vypršaním času.|Na túto misiu máte neobmedzené množstvo streliva.", --Bazooka, Shotgun, SniperRifle
+ ["Oh no! Time's up! Just try again."] = "Ale nie! Čas vypršal! Tak to skúste znovu.", --Bazooka, Shotgun, SniperRifle
+ ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Gratulujem! Zneškodnili ste všetky ciele|v stanovenom čase.", --Bazooka, Shotgun, SniperRifle
+ ["Hunter"] = "Lovec", --Bazooka, Shotgun, SniperRifle
+ ["Bazooka Training"] = "Tréning s bazukou",
+ ["'Zooka Team"] = "Bazuka tím",
+ ["Shotgun Training"] = "Tréning s brokovnicou",
+ ["Shotgun Team"] = "Shotgun tím",
+ ["Sniper Training"] = "Tréning pre ostreľovačov",
+ ["Sniperz"] = "Ostreľovači",
+ ["Not So Friendly Match"] = "Nie tak celkom priateľský zápas", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a point!| |Score:"] = "%s je mimo hru a tím %d|získal bod!| |Skóre:", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s je mimo hru a tím %d|dostal trestný bod!| |Skóre:", -- Basketball, Knockball
+ ["Hedgewars-Basketball"] = "Hedgewars-Basketbal",
+ ["Bat your opponents through the|baskets and out of the map!"] = "Odpálkujte vašich súperov do koša|a von z mapy!",
+ ["Hedgewars-Knockball"] = "Hedgewars-Knockball",
+ ["Bat balls at your enemies and|push them into the sea!"] = "Loptami triafajte vašich nepriateľov|a zhoďte ich tak do mora!",
+ ["TrophyRace"] = "Preteky o trofej",
+ ["Use your rope to get from start to finish as fast as you can!"] = "Použite lano na presun zo štartovnej pozície do cieľa tak rýchlo, ako to len viete!",
+ ["You've reached the goal!| |Time: "] = "Dosiahli ste cieľ!| |Čas: ",
+ ["NEW fastest lap: "] = "NOVÉ najrýchlejšie kolo: ",
+ ["Fastest lap: "] = "Najrýchlejšie kolo: ",
+ ["Best laps per team: "] = "Najrýchlejšie kolá podľa tímov: ",
+ ["Team %d: "] = "Tím %d: ",
+ }
--- a/share/hedgewars/Data/Locale/sk.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/sk.txt Sun Dec 19 13:31:55 2010 -0500
@@ -93,6 +93,7 @@
02:00=Škoda, že %1 nemá ešte jeden život
02:00=%1 odišiel za lepším
02:00=%1 už nespotrebováva pamäť tohto počítača
+02:00=%1 odišiel a už sa nevrátil
; Ježko (%1) sa utopil
02:01=%1 sa hrá na ponorku!
02:01=%1 napodobnil Titanik!
@@ -238,7 +239,7 @@
03:41=Skalný fanúšik škriekania
03:42=Tu si urobím poznámku...
03:43=Zahrať Beathovenovu smrteľnú sonátu
-03:44=Spotrebovať do: 1923
+03:44=Spotrebujte do: 1923
03:45=Sila vedy
03:46=Hot Hot Hot!
03:47=Prilepte ich niekam šikovne!
@@ -253,14 +254,14 @@
04:04=Zaútočte na vašich nepriateľov brokovnicou s dvoma|výstrelmi. Vďaka jej rozptylu nepotrebujete|zasiahnuť protivníkov priamym zásahom|Útok: Výstrel (viacnásobný)|
04:05=Rýchlo pod zem! Použite zbíjačku na vyvŕtanie|dieri v zemi a dosiahnutie ďalších miest.|Útok: Začatie alebo skončenie vŕtania|
04:06=Unudený? Útok nie je možný? Chcete ušetriť náboje?|Nie je problém! Stačí preskočiť ťah, zbabelec!|Útok: Ukončí ťah bez boja|
-04:07=Zdolajte veľké vzdialenosti pomocou dobre|načasovaných výstrelov lana. Využite zotrvačnosť|na posúvanie ostatných ježkov alebo z výšky|zhadzujte bomby a iné zbrane|Útok: Vystrelenie alebo pustenie sa lana Dlhý|skok: Zhodenie granátov alebo podobných zbraní|
+04:07=Zdolajte veľké vzdialenosti pomocou dobre|načasovaných výstrelov lana. Využite zotrvačnosť|na posúvanie ostatných ježkov alebo z výšky|zhadzujte bomby a iné zbrane|Útok: Vystrelenie alebo pustenie sa lana|Dlhý skok: Zhodenie granátov alebo podobných zbraní|
04:08=Udržujte nepriateľov v bezpečnej vzdialenosti|položením míny na rovinu alebo priamo pod nich.|Uistite sa, že ste v dostatočnej vzdialenosti, keď|sa aktivujú!|Útok: Položí mínu na vašu aktuálnu pozíciu|
04:09=Nie ste si istý svojou muškou? Použite Desert|Eagle, ktorý má až štyri výstrely.|Útok: Výstrel (viacnásobný)|
04:10=Útok hrubou silou sa dá použiť vždy. Umiestnite|túto klasickú trhavinu vedľa vášho nepriateľa a|vzdiaľte sa.|Útok: Položí mínu na vašu aktuálnu pozíciu|
04:11=Zbavte sa nepriateľských ježkov tak, že ich|odpálkujete mimo hranice mapy alebo do vody. Alebo|máte chuť svojim kamarátom poslať nejaké míny?|Útok: Odpálkuje čokoľvek, čo stojí pred vami|
04:12=Aby ste mohli použiť túto takmer smrtiacu techniku|bojového umenia musíte stáť blízko nepriateľa.|Útok: Vykoná Úder ohňa|
04:13=UNUSED|
-04:14=Máte strach z výšok? Radšej si vezmite padák. Sám|sa otvorí, keď spadnete príliš hlboko a uchráni|vášho ježka pred zranením pádom.|Útok: Otvorenie padáku Dlhý skok: Zhodenie|granátov alebo podobných zbraní|
+04:14=Máte strach z výšok? Radšej si vezmite padák. Sám|sa otvorí, keď spadnete príliš hlboko a uchráni|vášho ježka pred zranením pádom.|Útok: Otvorenie padáku|Dlhý skok: Zhodenie granátov alebo podobných zbraní|
04:15=Privolajte leteckú podporu a zdecimujte vašich|nepriateľov bombardovaním.|Vľavo/Vpravo: Určenie smeru útoku|Kurzor: Výber cieľa bombardovania|
04:16=Privolajte leteckú podporu, ktorá do cieľovej|oblasti vypustí niekoľko mín.|Vľavo/Vpravo: Určenie smeru útoku|Kurzor: Výber cieľa útoku|
04:17=Hľadáte úkryt? Použitie lampu na vyhĺbenie tunela|do zeme, ktorá vám poskytne ochranu.|Útok: Začatie alebo skončenie kopania|
@@ -274,10 +275,10 @@
04:25=Použite túto maskovaciu súpravu, aby ste prinútili|nepriateľských ježkov skočiť smerom k vášmu|ježkovi (do vody alebo priepasti).|Útok: Použije súpravu a skúsi zviesť iného ježka|
04:26=Hodí tento šťavnatý melón na vašich nepriateľov.|Po vypršaní časomiery sa rozpadne na niekoľko|vybuchujúcich kúskov.|1‐5: Nastaví časovač melóna|Útok: Držanie tlačidla zvyšuje silu hodu|
04:27=Zošlite pekelné plamene na vašich súperov vďaka|tejto nepriateľskej výbušnine. Nezostaňte príliš|blízko k explózii, pretože malé plamienky môžu|horieť dlhšie.|Útok: Držanie tlačidla zvyšuje silu hodu|
-04:28=Chvíľku po vypustení tejto rakety sa začne|prevŕtavať do zeme a vybuchne vtedy, keď vyprší|jej časová poistka alebo sa objaví znova na|povrchu.|Útok: Držanie tlačidla zvyšuje silu výstrelu|
+04:28=Chvíľku po vypustení sa táto raketa začne|prevŕtavať do zeme a vybuchne vtedy, keď vyprší|jej časová poistka alebo sa objaví znova na|povrchu.|Útok: Držanie tlačidla zvyšuje silu výstrelu|
04:29=Toto nie je nič pre malé deti! Loptičkový guľomet|vypáli množstvo malých farebných guličiek|naplnených výbušninami.|Útok: Výstrel v plnej sile|Hore/Dole: Mierenie počas pálenia guličiek|
-04:30=Privolajte leteckú podporu, ktorá spustí silný|napalmový útok. S dobrým mierením dokáže tento|útok odstrániť veľké časti krajiny vrátane ježkov,|ktorý majú smolu v tom, že na nej stoja.|Vľavo/Vpravo: Určenie smeru útoku|Kurzor: Výber cieľovej oblasti|
-04:31=Bezpilotný bombardér je ideálnou zbraňou na|pozbieranie krabíc alebo na zaútočenie ježkov,|ktorí sú príliš ďaleko. Buď ho navigujte priamo na|nepriateľov alebo najprv zhoďte zopár bômb.|Útok: Vypustenie lietadla alebo zhodenie bômb Dlhý|skok: Umožní vstup do boja valkýram|Hore/Dole: Navigovanie lietadla|
+04:30=Privolajte leteckú podporu, ktorá vypustí silný|napalmový útok. S dobrým mierením dokáže tento|útok odstrániť veľké časti krajiny vrátane ježkov,|ktorý majú smolu v tom, že na nej stoja.|Vľavo/Vpravo: Určenie smeru útoku|Kurzor: Výber cieľovej oblasti|
+04:31=Bezpilotný bombardér je ideálnou zbraňou na|pozbieranie krabíc alebo na zaútočenie na ježkov,|ktorí sú príliš ďaleko. Buď ho navigujte priamo na|nepriateľov alebo najprv zhoďte zopár bômb.|Útok: Vypustenie lietadla alebo zhodenie bômb|Dlhý skok: Umožní vstup do boja valkýram|Hore/Dole: Navigovanie lietadla|
04:32=Nízka gravitácia je účinnejšia ako ktorákoľvek|diéta! Skáčte vyššie a ďalej alebo nechajte vašich|nepriateľov letieť ešte ďalej.|Útok: Aktivácia|
04:33=Niekedy všetko čo potrebujete je len o trošku|väčšia sila, aby ste spôsobili ešte väčšiu škodu.|Útok: Aktivácia|
04:34=Nedotýkaj sa ma!|Útok: Aktivácia|
@@ -285,7 +286,7 @@
04:36=No, niekedy proste nemáte mušku. Zapnite si|podporu mierenia, ktorá podporuje najmodernejšie|technológie.|Útok: Aktivácia|
04:37=Nebojte sa denného svetla. Vydrží len jeden ťah,|ale umožní vám vstrebať škodu, ktorú spôsobíte|iným ježkom.|Útok: Aktivácia|
04:38=Ostreľovačka dokáže byť najdrvivejšou zbraňou v|celom vašom arzenále, je však veľmi neefektívna|pre blízke ciele. Škoda, ktorú spôsobí sa zvyšuje|so zvyšujúcou sa vzdialenosťou k cieľu.|Útok: Výstrel (dvakrát)|
-04:39=Preleťte na iné miesta mapy v lietajúcom tanieri.|Táto komplikovane sa ovládajúca pomôcka je schopná|vás preniesť na takmer akúkoľvek pozíciu na mape.|Útok: Aktivácia|Hore/Vľavo/Vpravo: Použiť silu v jednom smere Dlhý|skok: Zhodiť granáty alebo iné zbrane|
+04:39=Preleťte na iné miesta mapy v lietajúcom tanieri.|Táto komplikovane sa ovládajúca pomôcka je schopná|vás preniesť na takmer akúkoľvek pozíciu na mape.|Útok: Aktivácia|Hore/Vľavo/Vpravo: Použiť silu v jednom smere|Dlhý skok: Zhodiť granáty alebo iné zbrane|
04:40=Podpáľte kúsok zeme použitím tejto fľaše naplnenej|zápalnou tekutinou.|Útok: Držanie tlačidla zvyšuje silu hodu|
04:41=Dôkaz, že príroda môže dokonca predčiť lietajúci|tanier. Vtáčisko dokáže niesť vášho ježka a znášať|vajcia na vašich nepriateľov!|Útok: Aktivácia a zhadzovanie vajec|Hore/Vľavo/Vpravo: Mávanie krídiel v jednom smere|
04:42=Toto prenosné portálové zariadenie je schopné|okamžite preniesť vás, vašich nepriateľov alebo|zbrane medzi miestami na mape. Použite ho rozvážne|a vaše ťaženie bude... OBROVSKÝM ÚSPECHOM|Útok: Vystrelenie portálu|Prepnutie: Rotovanie portálových farieb|
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Locale/sv.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,27 @@
+locale = {
+ ["Aiming Practice"] = "Siktesövning", --Bazooka, Shotgun, SniperRifle
+ ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Förstör alla målen innan din tid tar slut.|Du har obegränsad ammunition för deta uppdrag", --Bazooka, Shotgun, SniperRifle
+ ["Oh no! Time's up! Just try again."] = "Åh nej! Tiden är ute! Pröva igen.", --Bazooka, Shotgun, SniperRifle
+ ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Grattis! Du har förstört alla målen inom den|tillåtna tidsramen.", --Bazooka, Shotgun, SniperRifle
+ ["Hunter"] = "Jägare", --Bazooka, Shotgun, SniperRifle
+ ["Bazooka Training"] = "Bazookaträning",
+ ["'Zooka Team"] = "Bazookalaget",
+ ["Shotgun Training"] = "Hagelgevärsträning",
+ ["Shotgun Team"] = "Hagelgevärslaget",
+ ["Sniper Training"] = "Prickskyttesträning",
+ ["Sniperz"] = "Prickskyttarna",
+ ["Not So Friendly Match"] = "En inte så vänlig match", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a point!| |Score:"] = "%s är ute och lag %d|fick ett poäng!| |Poängställning:", -- Basketball, Knockball
+ ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s är ute och lag %d|fick ett straff!| |Poängställning:", -- Basketball, Knockball
+ ["Hedgewars-Basketball"] = "Hedgewars-Basket",
+ ["Bat your opponents through the|baskets and out of the map!"] = "Slå ner dina motståndare i|korgarna och ut ur kartan!",
+ ["Hedgewars-Knockball"] = "Hedgewars-Knockball",
+ ["Bat balls at your enemies and|push them into the sea!"] = "Slå bollar mot dina fiender|och slå ner dem i havet",
+ ["TrophyRace"] = "TrophyRace",
+ ["Use your rope to get from start to finish as fast as you can!"] = "Använd ditt rep för att ta dig från start till mål så fort som möjligt!",
+ ["You've reached the goal!| |Time: "] = "Du har nått målet!| |Tid: ",
+ ["NEW fastest lap: "] = "NYTT snabbast varv: ",
+ ["Fastest lap: "] = "Snabbast varv: ",
+ ["Best laps per team: "] = "Bästa varv per lag: ",
+ ["Team %d: "] = "Lag %d: ",
+ }
--- a/share/hedgewars/Data/Locale/uk.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/uk.txt Sun Dec 19 13:31:55 2010 -0500
@@ -3,7 +3,7 @@
00:00=Граната
00:01=Кластерна бомба
00:02=Базука
-00:03=Наводима Бджілка
+00:03=Навідна Бджілка
00:04=Рушниця
00:05=Відбійний молоток
00:06=Пропустити хід
@@ -42,10 +42,15 @@
00:39=Літаюча тарілка
00:40=Коктейль Молотова
00:41=Пташечка
-00:42=Portable Portal Device
-00:43=Piano Strike
-00:44=Gas grenade
-00:45=Sine Gun
+00:42=Портативний портал
+00:43=Напад піаніно
+00:44=Старий лімбургський сир
+00:45=Синусна рушниця (beta)
+00:46=Вогнемет
+00:47=Липка міна
+00:48=Молоток
+00:49=Воскрешатор
+00:50=Напад дрелі
01:00=Вперед до перемоги!
01:01=Нічия
@@ -59,8 +64,9 @@
01:09=Синхронізація...
01:10=Використання цього засобу не завершить хід!
01:11=Ця зброя чи засіб ще не доступний!
-01:12=Last round till Sudden Death!
-01:13=%1 rounds till Sudden Death!
+01:12=Останній раунд до Раптової Смерті!
+01:13=%1 раундів до Раптової Смерті!
+01:14=Приготуйся, %1!
; Event messages
; Hog (%1) died
@@ -262,15 +268,22 @@
03:39=Пристрій для Переміщення
03:40=Спалююча Граната
03:41=Фанат Криків
-03:42=I'm making a note here...
+03:42=Я занотовую...
; the misspelled "Beethoven" is intentional (-> to beat)
-03:43=Performing Beathoven's deadly sonata
+03:43=Виконання смертельної сонати Бетховена
+03:44=Кращий до: 1923
+03:45=Сила науки
+03:46=Гаряче Гаряче Гаряче!
+03:47=Приліпіть їх де треба!
+03:48=Час молотка!
+03:49=Робить те, що ви подумали
+03:50=Кротячий фанат
; Weapon Descriptions (use | as line breaks)
04:00=Атакуй ворогів використовуючи просту гранату.|Вона вибухне як тільки її таймер доходить до нуля.|1-5: Вистав таймер гранати|Атака: Утримуй щоб метнути сильніше
04:01=Атакуй ворогів використовуючи кластерну|бомбу. Вона розділиться на менші бомби|коли таймер досягає нуля.|1-5: Вистав таймер гранати|Атака: Утримуй щоб метнути сильніше
04:02=Атакуй ворогів балістичним снарядом,|на політ якого впливає вітер.|Атака: Утримуй щоб стрельнути сильніше
-04:03=Запусти вибухонебезпечну бджолу, яка|полетить до вибраної цілі. Не стріляй на|повну силу щоб поліпшити її точність.|Курсор: Вибери ціль|Атака: Утримуй щоб стрельнути сильніше
+04:03=Запусти вибухо-небезпечну бджолу, яка|полетить до вибраної цілі. Не стріляй на|повну силу щоб поліпшити її точність.|Курсор: Вибери ціль|Атака: Утримуй щоб стрельнути сильніше
04:04=Атакуй ворогів використовуючи рушницю з двома|пострілами.Завдяки її розмаху тобі не потрібні точні|попадання щоб зашкодити супернику.|Атака: Стріляй (кілька разів)
04:05=Прямуй під землю! Візьми відбійний молоток,|просвердли в землі дірку та досягни інших областей.|Атака: Почни або заверши рити
04:06=Засмутився? Немає можливості атакувати? Хочеш зберегти|боєприпаси? Без проблем! Просто пропусти хід, боягузе!|Атака: Пропусти свою чергу без бою
@@ -309,8 +322,14 @@
04:39=Лети до іншої частини карти на літаючій тарілці.|Цей важко керований пристрій здатний перенести|тебе на практично будь-яку позицію поля бою.|Атака: Активувати|Вверх/Вліво/Вправо: Приклади зусилля в одному напрямку|Довгий Стрибок: Кинь гранати чи подібну зброю
04:40=Покрий землю вогнем, використавши цю плашечку|наповнену горючою (незабаром) рідиною.|Атака: Утримуй щоб стрельнути сильніше
04:41=Природа може переплюнути навіть літаючу|тарілку. Пташка може поносити їжака|навколо та скинути яйця на ворогів!|Атака: Активуй та скинь яйця|Вверх/Вліво/Вправо: Лети в одному напрямку
-04:42=ВЕЛИЧЕЗНИЙ УСПІХ| | |(але текст відсутній!)
-04:43=(текст відсутній)
+04:42=Цей портативний портал здатний миттєво преренести|вас, ваших ворогів, чи ваше озброєння між двома|точками на місцевості.|Використовуйте його з розумом і ваша кампанія буде...|ДУЖЕ УСПІШНОЮ!|Атака: Вистріли портал|Переключити: Змінюй колір порталу
+04:43=Проведи свій музичний дебют з величезним|успіхом! Скинь фортепіано з небес, але май|на увазі...хтось повинен на ньому грати,|і це може коштувати тобі життя!|Курсор: Вкажи цільовий регіон|F1-F9: Грай на піаніно
+04:44=Це не просто сир, це біологічна зброя! Він не|нанесе багато шкоди, коли таймер досягне нуля,|але він точно отруїть всіх, хто відчув його запах!|1-5: Встановити таймер гранати|Атака: Утримуй щоб метнути сильніше
+04:45=Всі ці класи фізики нарешті окупились, пусти|руйнівну Синусну хвилю на ворогів. Бережись,|ця зброя не іграшка. (Ця зброя не завершена)|Атака: Стріляй
+04:46=Облий противників шипучим рідким вогнем.|Аж зігріває серце!|Атака: Активувати|Вверх/Вниз: Продовжуй цілитись|Вліво/Вправо: Змінюй силу пострілів
+04:47=Подвійні веселощі з двома гострими, підлими,|липкими мінами. Налаштуй ланцюгову реакцію|або захищайся (або і те і те!)|Атака: Утримуй щоб кинути сильніше (двічі)
+04:48=Чому всі образи повинні отримати кроти?|Зробити з їжака божевільного теж весело!|Удар цим молотком забере у їжака|третину здоров'я і заб'є його під землю.|Атака: Активуй
+04:49=Воскреси своїх друзів! Але май на|увазі що це воскресить також і ворогів.|Атака: Утримуй атаку для повільного відновлення|Вверх: Пришвидш відновлення
; Game goal strings
05:00=Режими Гри
@@ -329,3 +348,8 @@
05:13=Мінні Таймери: Міни здетонують негайно
05:14=Мінні Таймери: Міни здетонують через 0 - 3 секунди
05:15=Модифікатор Шкоди: Будь-яка зброя наноситиме %1% шкоди
+05:16=Здоров'я всіх їжаків скидається на кінці ходу
+05:17=AI їжаки відроджуються після смерті
+05:18=Необмежені Атаки
+05:19=Зброя скидається на кінці ходу
+05:20=Зброя не розподіляється між їжаками
--- a/share/hedgewars/Data/Locale/zh_CN.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Locale/zh_CN.txt Sun Dec 19 13:31:55 2010 -0500
@@ -1,6 +1,6 @@
-; Simplified Chinese locale, Translated by Tonghuix (tonghuix@gmail.com) 21 Oct 2010
+; Simplified Chinese locale
-00:00=手榴蛋蛋
+00:00=手榴弹
00:01=集束炸弹
00:02=反坦克火箭筒
00:03=归巢的蜜蜂
@@ -12,9 +12,9 @@
00:09=沙漠之鹰
00:10=炸药
00:11=球棒
-00:12=喔嘻嘻呦拳
+00:12=升龙拳
00:13=秒
-00:14=降落伞
+00:14=空降
00:15=空袭
00:16=地雷空袭
00:17=喷灯
@@ -25,7 +25,7 @@
00:22=鞭子
00:23=神风特工队
00:24=蛋糕
-00:25=色诱
+00:25=引诱
00:26=西瓜炸弹
00:27=地狱礼花
00:28=钻头火箭
@@ -49,6 +49,8 @@
00:46=火焰喷射器
00:47=固定地雷
00:48=大锤
+00:49=复苏
+00:50=电钻空袭
01:00=开战!
01:01=平局
@@ -56,285 +58,284 @@
01:03=音量 %1%
01:04=暂停
01:05=确定要退出? (是Y/否Esc)
-01:06=突然死亡模式!
+01:06=死亡模式!
01:07=%1 剩余
01:08=燃料
01:09=同步中...
01:10=使用本工具不会结束回合!
01:11=您还不能用它!
-01:12=突然死亡模式前最后一回合!
+01:12=死亡模式前最后一回合!
01:13=%1 回合倒计时!
01:14=预备上, %1!
; Event messages
; Hog (%1) died
; 02:00=%1 has kicked the bucket!
-02:00=%1踢到了春哥的腿!
+02:00=%1 离去!
; 02:00=%1 has seen the light!
-02:00=%1看到了小野妹子在向他招手!
+02:00=%1 目睹圣光降临!
; 02:00=%1 never saw that coming!
-02:00=阿西BUG!%1被人暗算了!
+02:00=%1 无法瞑目
; 02:00=%1 waves goodbye!
-02:00=%1我嘞个去!哪个混蛋竟用这个绝招!
+02:00=%1 向大家挥手道别。
; 02:00=%1 has gone to a better place!
-02:00=%1:你竟然敢背叛组织!
+02:00=%1 去了极乐世界!
; 02:00=%1 meets his maker!
-02:00=我嘞个去!这货不是%1!这货不是%1!
+02:00=%1 去见造物主了!
; 02:00=%1 can hang on no longer!
-02:00=真悲剧%1平田君(头顶内裤的哥们)!
+02:00=%1 再也受不了了!
; 02:00=%1 has done his duty!
-02:00=%1再也不会蛋疼了!
+02:00=%1 完成了他的使命!
; 02:00=%1 makes the ultimate sacrifice!
-02:00=%1:剩下的哥们,加嘞个油!!
+02:00=%1 做了最大的牺牲!
; 02:00=%1 departs this mortal coil!
-02:00=%1想玩“移形幻影”,失败了!
+02:00=%1 摆脱了躯壳的束缚!
; 02:00=%1 makes like a tree and leaves!
-02:00=%1啊~内裤!我这辈子值啦!~
+02:00=%1 叶落归根。
; 02:00=%1 has timed out!
-02:00=%1的人生杯具了
+02:00=%1 大限已至。
; 02:00=%1 says peace out!
-02:00=%1中了[喔嘻嘻呦拳]。。。这辈子值了!
+02:00=%1 悄然离场了。
; 02:00=%1 will be fondly remembered!
-02:00=不嘞个是吧!%1竟然会死!
+02:00=%1 永远活在我们心中!
; 02:00=%1 has an aneurysm!
-02:00=湿父,让%1起死回生吧!
+02:00=%1 不治而亡。
; 02:00=%1 leaves behind a wife and child
-02:00=%1 留下一家孤儿寡母。。。
+02:00=%1 留下一家孤儿寡母。
; 02:00=%1 has launched his last bazooka
-02:00=%1发射了最后一发火箭弹
+02:00=%1 发射了最后一发火箭弹
; 02:00=%1 has tossed his last grenade
-02:00=%1扔出了最后一枚手榴弹
+02:00=%1 扔出了最后一枚手榴弹
; 02:00=%1 has baked his last cake
-02:00=%1烘烤了最后一块蛋糕
+02:00=%1 烘烤了最后一块蛋糕
; 02:00=%1 has swung on his last rope
-02:00=%1甩出了最后一根绳索
+02:00=%1 最后一次甩出了绳索
; 02:00=%1 has called his last airstrike
-02:00=%1呼叫了最后一次空袭
+02:00=%1 最后一次呼叫空袭
; 02:00=%1 has pumped his last shotgun
-02:00=%1抽出了最后一把霰弹枪
+02:00=%1 最后一次抽出了霰弹枪
; 02:00=%1 has thrown his last melon
-02:00=%1扔出了最后一个西瓜炸弹
+02:00=%1 最后一次扔出了西瓜炸弹
; 02:00=%1 has drawn his last deagle
-02:00=%1拔出了最后一把沙鹰
+02:00=%1 最后一次拔出了沙鹰
; 02:00=%1 took one shot too many
-02:00=%1好像看到那谁家的小谁了~~
+02:00=%1 挨了太多枪了
; 02:00=%1 could really have used a health crate
-02:00=%1还没打倒“肉山大魔王”呢~
+02:00=%1 真该用下医疗包的
; 02:00=%1 has gone to play a better game
-02:00=徘句之神一屁股糊%1熊脸上了!
+02:00=%1 去玩更有意思的游戏去了
; 02:00=%1 has ragequit life
-02:00=%1还没看到这个游戏的主线目标呢!
+02:00=%1 拔网线了!
; 02:00=%1 fails
-02:00=洒家,%1还会再来的!
+02:00=%1 失败了
; 02:00=Poor poor %1...
-02:00=%1的人生简直就是一茶几(杯具+餐具)
+02:00=可怜的 %1...
; 02:00=%1 prefers wormux
-02:00=%1老湿,这游戏不给力啊!
+02:00=%1 更喜欢 Wormux
; 02:00=%1 has been blocking shots with his face
-02:00=%1杯具啊!菊花要爆啦!
+02:00=%1 勇于面对,结果相当惨烈
; 02:00=%1 is a hero amongst me...err..hogs
-02:00=我嘞个去!竟然有人爆%1的菊花!
+02:00=%1 是我的英雄!
; 02:00=%1 finds his place in Valhalla
-02:00=好好干吧!要不然,过世的%1会很伤心的!~
+02:00=%1 在勇者纪念碑上找到了位置
; 02:00=%1 has left the building
-02:00=不要破坏团队合作!否则过世的%1会很伤心的!~
+02:00=%1 离开了这间屋子
; 02:00=%1 goes the way of the dinosaurs
-02:00=%1又开始蛋疼了!
+02:00=%1 步上了恐龙的道路
; 02:00=%1 brings hedgehogs one step closer to extinction
-02:00=我嘞个擦!%1要让刺猬灭绝了
+02:00=%1 让刺猬物种灭绝更近了一步
; 02:00=%1 brings a tear to my eye
-02:00=我擦嘞!%1死的太突然那了!
+02:00=%1 带走了我一滴眼泪
; 02:00=%1 is an ex-hog
-02:00=%1的必杀技是——变成食物——开玩笑,呵呵
+02:00=%1 生前是一只刺猬
; 02:00=%1 is pushing up the daisies
-02:00=%1诅咒害他那人蛋疼菊紧!
+02:00=%1 被菊花簇拥
; 02:00=%1 has ceased to be
-02:00=%1:啊呀!这种插法,为湿多疼啊!~
+02:00=%1 被删除了
; 02:00=Say goodbye to %1
-02:00=比任何人都想去天竺的八戒,已经魂归天际啦!
+02:00=对 %1 说再见
; 02:00=No hope left for %1
-02:00=坑爹呢!为什么残念的%1会死!~
+02:00=%1 没有希望了
; 02:00=%1 faces the final curtain
-02:00=%1:我杀了你们的朋友,现在搞我是吧!
+02:00=%1 面容被落下的帷幕遮住了
; 02:00=Smoke 'em if you got 'em, %1
-02:00=%1心目中的世界观根本就是个BUG啊!
+02:00=%1 抓紧时间实现你最后的愿望吧
; 02:00=%1 suffers a Spontaneous Massive Existence Failure
-02:00=%1休斯顿,我们出问题了!(出自阿波罗13)
+02:00=%1 遭遇了自发性大规模故障
; 02:00=%1 has passed on
-02:00=%1被天朝“墙”了!
+02:00=%1 走了
; 02:00=%1 is stone dead
-02:00=%1被凤姐吻的不行了!~
+02:00=%1 永垂不朽
; 02:00=%1 is no more
-02:00=春哥需要你,%1!
+02:00=%1 不在了
; 02:00=%1 has expired
-02:00=%1被光腚总菊河蟹了!~~
+02:00=%1 已故
; 02:00=Bereft of life, %1 rests in peace
-02:00=%1说,这位玩家的表情太猥琐了
+02:00=%1 安详地躺着
; 02:00=%1 joins the choir invisible
-02:00=%1用尽了全部的查克拉~
+02:00=%1 加入了隐形唱诗班
; 02:00=Farewell %1, we hardly knew ye!
-02:00=%1后悔没信春哥!
+02:00=%1, 永别了,我们还没熟悉你呢!
; 02:00=%1 had a low tolerance for being shot
-02:00=%1想说,他一直暗恋凤姐很久了!~
+02:00=%1 抗打击能力不足
; 02:00=%1 could have used an extra life
-02:00=下一局,%1一定会妥妥儿的!~噢嗬!
+02:00=%1 本该用另一条命的
; 02:00=Is there a doctor in the house?
-02:00=擦!擦!玩儿蛋去!
+02:00=有医生吗?
; Hog (%1) drowned
; 02:01=%1 plays submarine!
-02:01=%1感觉自己内心清澈,心静如水~
+02:01=%1 以为自己是潜水艇!
; 02:01=%1 mimics the Titanic!
-02:01=%1想看波~~波~~
+02:01=%1 学泰坦尼克去了!
; 02:01=%1 swims like a stone!
-02:01=%1想在水下淫出一首好湿!
+02:01=%1 石沉大海!
;02:01=%1 checks out the deep end
-02:01=%1说凤姐在水下等她呢。。。
+02:01=%1 说要去检查深水区
;02:01=%1 goes glug glug glug
-02:01=%1 :菠萝菠萝蜜得隆东强~
-; 02:01=%1 goes splash
-02:01=芭蕉桑~你快醒醒吧~
-; 02:01=%1 forgot his armbands
-02:01=阿西BUG~!%1杯具了!
+02:01=%1 :“咕噜咕噜咕噜……”
+;02:01=%1 goes splash
+02:01=%1 栽入水花里
+;02:01=%1 forgot his armbands
+02:01=%1 忘记了戴臂章
;02:01=%1 really should have taken swimming lessons
-02:01=%1的遗言:信春哥得永生!
+02:01=%1 真的该去学游泳的
;02:01=%1 left his surfboard at home
-02:01=不给力啊!老湿!
+02:01=%1 把救生圈忘家了
;02:01=%1 is washed up
-02:01=%1庆幸自己没掉马桶里!
+02:01=%1 冲走了
;02:01=%1 is one soggy hog
-02:01=%1生前是个拳湿~~
+02:01=%1 湿掉了
;02:01=%1 forgot to bring his life jacket
-02:01=我擦泪!下水前%1忘了脱内裤!
+02:01=%1 忘记带救生衣了
;02:01=%1 goes splish splash splish
-02:01=我嘞个去!%1怎么穿着内裤就掉下去了~
+02:01=%1 实现了水上飘,身后一片水花荡漾
;02:01=%1 is sleeping with the fishes
-02:01=%1看到美人鱼在脱衣服~
+02:01=%1 将会和鱼睡在一起
;02:01=%1 thinks the water physics suck in this game
-02:01=%1认为这次元还真是个不毛之地啊!
+02:01=%1 认为这游戏的设定糟糕透了
;02:01=%1 looks thirsty
-02:01=这次元怎么连根毛都没有~
+02:01=%1 好像很渴
;02:01=the sea claims %1
-02:01=雅买歹~~(河蟹)
+02:01=大海吞没了 %1
;02:01=%1 is lost at sea
-02:01=%1宁愿自我河蟹~~
+02:01=%1 在海上迷失了
;02:01=%1 should have brought his scuba gear
-02:01=水表示鸭梨很大~~
+02:01=%1 应该要带潜水工具的
;02:01=%1 gets a burial at sea
-02:01=%1,春哥要你
+02:01=%1 享受到了海葬待遇
;02:01=%1 has that sinking feeling
-02:01=%1曾哥在水下唱“狮子座”
+02:01=%1 觉得自己在下沉
;02:01=%1 is practicing his backstroke
-02:01=%1的内裤是粉红色的哦!
+02:01=%1 终于能实践自己的游泳理论了
;02:01=%1 goes in search of the Titanic
-02:01=水下竟然有神兽!
+02:01=%1 去泰坦尼克号寻宝了
;02:01=%1 is not Jesus
-02:01=%1正在观看河蟹狂吃草泥马~
+02:01=很遗憾 %1 不是耶稣
;02:01=%1 is finding Nemo
-02:01=%1觉得陆地上房价太高了
+02:01=%1 正在寻找Nemo
;02:01=%1 springs a leak
-02:01=%1表示鸭梨很大~
-;02:01=%1 has tha
-02:01=%1想去看凤姐的内裤颜色~
+02:01=%1 钻入了一个水洼
;02:01=You've gotta wonder how many hogs are down there
-02:01=你会知道出师未捷身先死的八戒在下面等你呢
+02:01=你会知道海底还会有多少同伴的
;02:01=%1 makes the ocean slightly higher
02:01=%1 让海平面高了那么一点, 就一点
;02:01=%1 didn't enlist in the Navy
-02:01=%1害怕城管来抓他~!
+02:01=很明显 %1 没在海军服役过
;02:01=%1 is doing his impersonation of a dead fish
-02:01=菲律宾警察营救%1失败~
+02:01=%1 其实是在模仿死鱼啦
;02:01=At least you didn't go down the toilet, %1
-02:01=%1撅着个腚飞起来啦~
+02:01=还好 %1 你不是掉进了厕所
;02:01=Sonic couldn't swim and neither can %1
-02:01=海底有个如意按摩棒~~
+02:01=索尼克不能游泳, %1 也一样
;02:01=%1 wants to play Ecco the dolphin
-02:01=%1想当水下波霸~!
+02:01=%1 想玩海底漫步
;02:01=%1 has gone to visit Aquaria
-02:01=%1被气得忿忿儿的!
+02:01=%1 去水族馆报到了
;02:01=%1 has found the lost city of Atlantis
-02:01=%1被爆菊了,要到水下清洗一下!
+02:01=%1 找到了传说中的亚特兰蒂斯城
;02:01=%1 aims for the lead role in Bioshock 3
-02:01=%1华丽丽的掉下去啦~
+02:01=%1 的目的是为了在生化奇兵3中起带头作用
;02:01=Your doggy paddle could use a little work, %1
-02:01=%1实在是太V5啦!连光腚总菊都拿他没辙!
+02:01=狗爬式会有用的, %1
;02:01=%1 should have brought a jet ski
-02:01=%1还没来得及吐槽!阿西BUG!
+02:01=%1 竟然没带摩托艇
;02:01=%1 doesn't like watersports
-02:01=%1的伪娘气质还没表现出来呢
+02:01=%1 不喜欢水上运动
;02:01=%1 is forever blowing bubbles
-02:01=%1落水时的体位亮了~
+02:01=%1 学会了绝技: 神风吹泡泡
;02:01=%1 is short of a raft
-02:01=%1被天朝屏蔽了~
+02:01=%1 腿太短了
;02:01=%1 thinks salt water is good for the skin
-02:01=%1认为天朝实在是个伟大的国度
+02:01=%1 认为盐水对皮肤有好处
;02:01=%1 gets salt water in his wounds
-02:01=%1大喊:不给力啊,你个白痴老湿!
+02:01=%1 的伤口沾上了盐水
;02:01=%1 has walked the plank
-02:01=太不给力啦,老湿!
+02:01=%1 错过了那块木板
;02:01=%1 has a bath
-02:01=这游戏不带感啊!
+02:01=%1 洗澡去了
;02:01=%1 is wet wet wet
-02:01=亮点永远都在最后
+02:01=%1 全身是水
;02:01=%1 gets his quills wet
-02:01=%1把屁股弄湿了
+02:01=%1 把刚毛弄湿了
;02:01=It's Davy Jones' locker for %1
-02:01=天朝正在水下等%1呢
+02:01=深海阎王正在等待 %1
; Round starts
; 02:02=Let's fight!
+02:02=开战!
; 02:02=Armed and ready!
-02:02=开战!
02:02=准备!
;02:02=Let's get ready to rumble!
02:02=准备对轰!
;02:02=Let's get it on!
-02:02=让我们取得胜利!
+02:02=让我们得到胜利!
;02:02=Let's get this party started
02:02=这个Party要开始了
;02:02=Last hog standing wins
-02:02=胜利属于信春哥的人
+02:02=胜利属于最后一个生还者
;02:02=Let's go!
02:02=出发吧!
;02:02=Let's rock!
+02:02=起点
;02:02=Let's jam!
;02:02=It's beginning...
-02:02=开始了...
+02:02=开始了
;02:02=This is the start of something big
02:02=这是一个伟大的开始
;02:02=Welcome to Hedgewars
-02:02=欢迎来到“刺猬杀”!
+02:02=欢迎来到刺猬大作战
;02:02=Welcome to the front lines
02:02=欢迎来到前线
;02:02=Crush your enemies!
-02:02=目标:吃掉你的敌人!
+02:02=目标:粉碎你的敌人!
;02:02=May the best hog win
-02:02=胜利属于会打飞机的那只!
+02:02=祝愿胜利属于最厉害的刺猬!
;02:02=Victory or death
02:02=胜利或死亡
;02:02=To the victor goes the spoils
02:02=战利品只属于胜利者
;02:02=Losing is not an option
-02:02=加嘞个油!老湿不能输啊!
+02:02=字典里面应该没有"输"这个字的
;02:02=Cry havoc! Let loose the hogs of war!
-02:02=哭吧! 这是刺猬的
+02:02=放声哭吧! 这是刺猬的战争!
;02:02=Hedgewars, brought to you by Hedgewars.org
-02:02=欢迎来到刺猬大作战, 官方网站 Hedgewars.org
+02:02=欢迎来到刺猬大作战, Hedgewars.org 为你呈现
02:02=GL HF
;02:02=Just count yourself lucky you're not up against Tiyuri
-02:02=你看你多幸运你不是在对战 Tiyuri
+02:02=你看你多幸运不是在对战 Tiyuri
;02:02=Just count yourself lucky you're not up against unC0Rr
-02:02=你看你多幸运你不是在对战 unC0Rr
+02:02=你看你多幸运不是在对战 unC0Rr
;02:02=Just count yourself lucky you're not up against Nemo
-02:02=你看你多幸运你不是在对战 Nemo
+02:02=你看你多幸运不是在对战 Nemo
;02:02=Just count yourself lucky you're not up against Smaxx
-02:02=你看你多幸运你不是在对战 Smaxx
+02:02=你看你多幸运不是在对战 Smaxx
;02:02=Just count yourself lucky you're not up against Jessor
-02:02=你看你多幸运你不是在对战 Jessor
+02:02=你看你多幸运不是在对战 Jessor
;02:02=Give it your all!
02:02=展现你的一切吧!
;02:02=The losers do the cleaning up!
-02:02=输的要去吻凤姐!
+02:02=输的要罚扫厕所!
;02:02=Let the fight of the millenium begin
02:02=宇宙之战开始了
;02:02=Let the fight of the century begin
@@ -350,7 +351,7 @@
;02:02=Let the fight of the day begin
02:02=本日最强入围赛开始了
;02:02=Let the fight of the hour begin
-02:02=我们能狂玩一小时!
+02:02=我们能战一小时!
;02:02=Do your best!
02:02=诸君努力!
;02:02=Destroy the enemy!
@@ -358,30 +359,31 @@
;02:02=Good luck
02:02=祝你好运
;02:02=Have fun~
-02:02=玩儿蛋去~
+02:02=开心玩~
;02:02=Fight the good fight
-02:02=要赢!
+02:02=漂亮的战斗
;02:02=Fight dirty
-02:02=不择手段也行!
+02:02=不择手段
;02:02=Fight with honour
-02:02=请注意文明用语
+02:02=满载荣誉而战
;02:02=Don't give up
-02:02=出师未捷身先死的教练: 别放弃
+02:02=教练告诉你: 别放弃
;02:02=Never surrender
02:02=永不屈服!
;02:02=Rock 'em and sock 'em!
-02:02=刺猬杀!杀!杀!
+02:02=蹂虐对手
;02:02=Let the fragfest begin!
02:02=积分赛开始!
;02:02=I hope you're ready for a tussle!
02:02=你准备好恶战了么?
-02:02=Go Go Go!
+;02:02=Go Go Go!
+02:02=上!
;02:02=Hedgehogs advance!
-02:02=刺猬历险记!
+02:02=刺猬向前冲!
;02:02=Bring it to them!
02:02=炸飞他们!
;02:02=Have no fear!
-02:02=勇敢前进!
+02:02=无所畏惧!
;02:02=Be brave and conquer
02:02=敢于征服!
@@ -397,33 +399,33 @@
;02:05=Medic!
02:05=急救包!
;02:05=First aid from the skies!
-02:05=最NB的东西空运来了!
+02:05=救援物资空运来了!
;02:05=A health pack for you
02:05=你的医疗包到了
;02:05=Good health.. in box form!
-02:05=凤姐的内裤就在那箱子里!
+02:05=生命就在那箱子里!
;02:05=The doctor calls
-02:05=人在江湖飘啊,谁能不挨刀啊!PIA~PIA~
+02:05=医生的紧急呼叫
;02:05=Fresh band-aids!
02:05=新鲜创可贴!
;02:05=This will make you feel better
-02:05=吃了这个感觉像在吻春哥...
+02:05=吃了这个感觉会好些的...
;02:05=A Hi-Potion! Whoops wrong game
-02:05=伟哥!呃。。。走错地方了
+02:05=兴奋剂!呃。。。走错地方了
;02:05=A pick-me-up!
02:05=万金油!
;02:05=Grab it
-02:05=就是它了!
+02:05=捉住它
;02:05=A healthy snack
-02:05=春哥的吻如期而至~
+02:05=健康食品
;02:05=A remedy to pain
-02:05=这货不是药包!这货不是药包!貌似这货就是药包。。。
+02:05=止痛饼来了
;02:05=Correct Dosage: as many as you can find!
-02:05=凤姐诚心提醒:这东西很管用
+02:05=使用方法: 吃得越多越好
;02:05=Urgent delivery
-02:05=请小心使用
+02:05=紧急物资
;02:05=Supplies!
-02:05=里面没有TT
+02:05=补给!
; New ammo crate
; 02:06=More weapons!
@@ -431,79 +433,79 @@
;02:06=Reinforcements!
02:06=增援!
;02:06=Lock and load!
-02:06=凤姐的及时雨!
+02:06=准备!
;02:06=I wonder what weapon is in there?
-02:06=尿布湿...
+02:06=我要的那个会在的吧...
;02:06=Supplies!
-02:06=也许有伟哥哦!
+02:06=补给!
;02:06=What could be inside?
02:06=里面会有啥呢?
;02:06=Christmas comes early in Hedgewars
-02:06=刺猬杀特别派送~
+02:06=刺猬大作战每天都是圣诞节
;02:06=A present!
-02:06=今年过节不收礼!
+02:06=礼物送到!
;02:06=Special delivery!
-02:06=特快专递,收件人付费!
+02:06=特快专递!
;02:06=It was a nightmare getting this through customs
-02:06=“肉山大魔王”来了
+02:06=本局的噩梦来了
;02:06=Destructive toys from the heavens
-02:06=吃了这个可以找凤姐
+02:06=玩具从天堂掉下来了
;02:06=Warning! Contents Volatile
-02:06=警告! 小心喷鼻血~
+02:06=警告! 内含危险物品
;02:06=Pick it up or blow it up, choice is yours
-02:06=拿走或爆掉, 随你
+02:06=拿走或打爆, 随你
;02:06=Goodies!
-02:06=貌似没有凤姐的内裤!
+02:06=好玩意儿!
;02:06=Mmmmm Ammo
02:06=弹药!!!!
;02:06=A box of destructive power
-02:06=潘朵拉的宝盒
+02:06=潘朵拉之盒
;02:06=Airmail!
-02:06=航空邮件,收件人付费!
+02:06=天降之物!
;02:06=Whatever's in that box, it ain't pizza
-02:06=无论里面是啥, 那肯定不会是小野妹子
+02:06=无论里面是啥, 那肯定不会是软妹子
;02:06=Get it!
02:06=拿走它!
;02:06=Weapon drop incoming
02:06=武器掉下来了!
;02:06=Don't let the enemy grab that!
-02:06=别让平田君拿了!
+02:06=别让敌人拿了!
;02:06=Shiny new toys!
-02:06=把这玩意装备上!
+02:06=新玩具!
;02:06=A mysterious box!
-02:06=迷一般的玩意...
+02:06=谜的箱子...
; New utility crate
; 02:07=Tooltime!
02:07=工具箱!
;02:07=This could come in handy...
-02:07=这货不是工具箱!貌似这货就是工具箱...
+02:07=这可能派上用场
;02:07=Utilities!
02:07=工具!
;02:07=Utilise this box
02:07=工具在这里!
;02:07=Watch out below
-02:07=令人蛋疼的东西!
+02:07=快看这里!
;02:07=More utilities!
02:07=更多选择更多欢笑, 尽在工具包
;02:07=Tools for you!
-02:07=爆菊用的, 送给你!
+02:07=一堆工具, 送给你!
;02:07=This should be good!
-02:07=菊花表示压力很大...
+02:07=这看见起来蛮好...
;02:07=Use this wisely
02:07=使用这个才是明智的选择
;02:07=Ooo this box is heavy
-02:07=这东西让所有刺猬为之一震
+02:07=好重...好重...
;02:07=You might need this
02:07=会有用的
; Hog (%1) skips his turn
; 02:08=%1 is sooo boring...
-02:08=%1太无聊了...
+02:08=%1 太无聊了...
;02:08=%1 couldn't be bothered
-02:08=%1要去找凤姐!
+02:08=%1 不想被打扰!
;02:08=%1 is one lazy hog
-02:08=%1太懒了
+02:08=%1 太懒了
;02:08=%1 is thoughtless
02:08=%1 太轻率了
;02:08=%1 gave up
@@ -571,163 +573,89 @@
;02:08=%1 has fallen asleep
02:08=%1 睡着了
-; Hog (%1) skips his turn
-; 02:08=%1 is sooo boring...
-02:08=%1 太无聊了...
-;02:08=%1 couldn't be bothered
-02:08=%1要去找凤姐!
-;02:08=%1 is one lazy hog
-02:08=%1找春哥要签名去了!
-;02:08=%1 is thoughtless
-02:08=%1吻凤姐去
-;02:08=%1 gave up
-02:08=%1阿西BUG!
-;02:08=You snooze you lose, %1
-02:08=%1无可奈何!
-;02:08=%1 shamelessly skips
-02:08=%1无耻的跳过了本回合
-;02:08=%1 is really lazy
-02:08=%1貌似长痔疮了!
-;02:08=%1 needs a little more motivation
-02:08=%1觉得自己需要伟哥
-;02:08=%1 is a pacifist
-02:08=%1脱了去
-;02:08=%1 has a breather
-02:08=%1正在吃饭呢
-;02:08=%1 has a rest
-02:08=%1需要食物
-;02:08=%1 chills out
-02:08=%1想要爱爱了
-;02:08=%1 has no faith in his own abilities
-02:08=%1做啥都没信心了
-;02:08=%1 decides to do nothing at all
-02:08=%1决定找凤姐一块玩
-;02:08=%1 lets the enemy destroy itself
-02:08=%1认为凤姐会来杀敌的
-;02:08=%1 would be terrible at parties
-02:08=%1撅着屁股摆体位
-;02:08=%1 hides out
-02:08=%1会隐身术
-;02:08=%1 has decided to pass on this opportunity
-02:08=%1已经决定放弃这个机会
-;02:08=%1 decides the best thing he can do is...nothing
-02:08=%1决定他现在最应该做的是......去找凤姐
-;02:08=%1 is a big wuss
-02:08=%1真是太蠢了!
-;02:08=Buck Buck Buck, %1 is a chicken
-02:08=%1找个内裤来玩玩
-;02:08=%1 is looking a little yellow
-02:08=%1看来有点印堂发黑
-;02:08=%1 is a coward!
-02:08=%1是圣德太子!
-;02:08=%1 is waiting for sudden death
-02:08=%1在等待突然死亡模式
-;02:08=%1 is not the fighting type
-02:08=%1妥妥儿的
-;02:08=%1 is reconsidering his purpose in life
-02:08=%1正在思考凤姐内裤的颜色
-;02:08=%1 was never much of a good shot anyway
-02:08=%1从来就没玩好过
-;02:08=%1 didn't want to join the army in the first place
-02:08=%1不想玩这游戏
-;02:08=Stop wasting our time, %1
-02:08=别浪费时间了! %1
-;02:08=I'm dissapointed in you, %1
-02:08=拳湿对你失望了,平田君
-;02:08=Come on, you can do better than that %1
-02:08=%1我嘞个去!
-;02:08=%1's will has broken
-02:08=%1正在打飞机
-;02:08=%1 apparently has better things to do
-02:08=%1显然有更好的事情等着做
-;02:08=%1 is scared stiff
-02:08=%1怕刺激
-;02:08=%1 has fallen asleep
-02:08=%1睡着了
-
; Hog (%1) hurts himself only
; 02:09=%1 should practice aiming!
-02:09=%1该练练瞄准了!
+02:09=%1 该练练瞄准了!
; 02:09=%1 seems to hate himself.
-02:09=%1似乎看自己很不爽。
+02:09=%1 似乎看自己很不爽。
; 02:09=%1 is standing on the wrong side!
-02:09=%1在表演狗吃屎!
+02:09=%1 在表演乌龙!
; 02:09=%1 makes like an emo
-02:09=%1以为自己是拳湿
+02:09=%1 以为自己无敌
; 02:09=%1 was holding his weapon the wrong way around
-02:09=%1好像把武器拿错方向了
+02:09=%1 好像把武器拿错方向了
;02:09=%1 is a little sadistic
-02:09=%1更喜欢凤姐来玩
+02:09=%1 有点施虐狂
;02:09=%1 is a masochist
-02:09=%1是更喜欢春哥来玩
+02:09=%1 是受虐狂
;02:09=%1 has no instinct of self-preservation
-02:09=%1根本不会自我保护
+02:09=%1 根本不会自我保护
;02:09=%1 messed up
-02:09=%1吐槽了
+02:09=%1 乱套了
;02:09=%1 screwed up
-02:09=%1体位搞错了
+02:09=%1 搞砸了
;02:09=That was a poor shot, %1
-02:09=%1这一发真坑爹的!
+02:09=%1 这一发真渣
;02:09=%1 is a little too careless with dangerous weapons
-02:09=%1太不小心用那些危险的玩意了
+02:09=%1 太不小心用那些危险的玩意了
;02:09=%1 should consider a change of career
-02:09=%1正在考虑玩凤姐
+02:09=%1 正在考虑转职
;02:09=Worst. Shot. Ever!
-02:09=值啦! 值啦! 太值啦!
+02:09=更差! 最差! 非常差!
;02:09=No no no %1, you shoot at the ENEMY!
-02:09=%1, 你要打敌人!不要打飞机!
+02:09=No no no %1, 你要打敌人!
;02:09=%1 should only be destroying the enemy
-02:09=%1应该消灭宿敌啊
+02:09=%1 应该消灭敌人才对
;02:09=%1 moves one step closer to suicide
-02:09=%1需要吃蘑菇了
+02:09=%1 正在走向自杀
;02:09=%1 aids the enemy
-02:09=%1感觉自己蛋疼
+02:09=%1 帮助敌人
;02:09=That was stupid %1
-02:09=%1感觉自己菊紧
+02:09= %1 是笨蛋
;02:09=%1 lives by the mantra of "no pain, no gain"
-02:09=%1突然有点乳酸
+02:09=%1 贯彻“不付出,何收获“的原则
;02:09=%1 is confused
-02:09=%1貌似吃错药了
+02:09=%1 思维混乱了
;02:09=%1 hurt itself in its confusion
-02:09=%1吃错药而打错人
+02:09=%1 在混乱中攻击自己
;02:09=%1 has a knack for embarrassing himself
-02:09=%1感觉菊花鸭梨很大
+02:09=%1 正在为自己尴尬
;02:09=%1 is a klutz!
-02:09=%1要受不了啦
+02:09=%1 就是一个笨蛋!
;02:09=%1 is clumsy
-02:09=%1实在是笨到水了
+02:09=%1 笨手笨脚的
;02:09=%1 shows the enemy what he's capable of
-02:09=%1真是太杯具了
+02:09=%1 展示了自己的能力
;02:09=%1 can't be expected to be perfect all the time
-02:09=%1感觉自己的人生就一茶几
+02:09=%1 不能每次都完美
;02:09=Don't worry %1, pobody's nerfect
-02:09=杯具啊!
+02:09=不用担心 %1 , 人都不是完美的
;02:09=%1 totally did that on purpose
-02:09=爆菊啦!
+02:09=%1 这么做真的是有目的
;02:09=I won't tell anyone if you don't, %1
-02:09=脑仁疼啊!
+02:09=我不会把 %1 的事情到处说的
;02:09=How embarrassing!
-02:09=内裤找不到啦,害羞!
+02:09=何等的失态!
;02:09=I'm sure nobody saw that %1
-02:09=这游戏是谁发明的,画个圈圈诅咒他。。。
+02:09=保证,决没人看到 %1 做什么
;02:09=%1 needs to review his field manual
-02:09=%1不看说明书就上场
+02:09=%1 需要复习说明书
;02:09=%1's weapon clearly malfunctioned
-02:09=%1被谁爆菊了吧
+02:09=%1 的武器很明显坏了
; Hog shot an home run (using the bat and another hog)
; 02:10=Home Run!
02:10=全垒打!
; 02:10=A bird, a plane, ...
-02:10=看!灰机!来打灰机啊!...
+02:10=一只鸟,一架飞机,...
; 02:10=That one is out!
-02:10=太差劲了,出局!
+02:10=那一位出界了!
; Hog (%1) has to leave (team is gone)
-02:11=%1必须找凤姐上床了
-02:11=%1玩的过火了,找犀利哥替代一下
-02:11=发射!这位已经被射出去。。。
-02:11=%1必须颠菜了
+02:11=%1 必须上床了
+02:11=%1 玩的过火了,休息一下
+02:11=发射!这位已经被送出去
+02:11=%1 必须走了
; Weapon Categories
03:00=定时手雷
@@ -743,11 +671,11 @@
03:10=BOOM!
03:11=咚!
03:12=武术
-03:13=UNUSED
+03:13=未使用
03:14=移动工具
03:15=空投打击
03:16=空投打击
-03:17=钻孔工具
+03:17=打洞工具
03:18=工具
03:19=移动工具
03:20=动作
@@ -755,7 +683,7 @@
03:22=叫我主人!
03:23=武术 (真的!)
03:24=蛋糕不是谎言!
-03:25=儿童不宜
+03:25=化妆的诱惑
03:26=果汁手雷
03:27=烫手手雷
03:28=弹道武器
@@ -772,10 +700,9 @@
03:39=移动工具
03:40=燃烧弹
;03:41=Huge fan of Squawks
-03:41=强烈的震撼
+03:41=噪音
;03:42=I'm making a note here...
-03:42=我将名垂青湿...
-
+03:42=我将在此记录...
; the misspelled "Beethoven" is intentional (-> to beat)
;03:43=Performing Beathoven's deadly sonata
03:43=特殊的圣诞表演
@@ -789,7 +716,10 @@
03:47= 呆在有利的地方!
;03:48=It's Hammer time!
03:48=大锤威武!
-
+;03:49=Does what you guess
+03:49=尽情猜想
+;03:50=Moles fan
+03:50=地道战
; Weapon Descriptions (use | as line breaks)
04:00=使用简单的手榴弹攻击敌人.|定时器倒数到0就会爆炸.|1-5: 设定定时器|攻击键: 按住蓄力.
@@ -810,9 +740,9 @@
04:15=呼叫一架飞机轰炸你的敌人.|左/右方向键: 决定攻击方向|光标: 选定目标
04:16=呼叫一架飞机投下大量地雷.|左/右方向键: 决定攻击方向|光标: 选定目标
04:17=需要个安全的地方? 使用喷灯为你挖掘一条安全的隧道!|攻击键: 开始/停止挖掘
-04:18=钻洞器还不够?还要个更安全的地方?|建造若干条大梁挡住吧.|左/右方向键: 选择梁的方向|光标: 建造
+04:18=喷灯还不够?还要个更安全的地方?|建造若干条大梁挡住吧.|左/右方向键: 选择梁的方向|光标: 建造
04:19=适当的时候撤退是比所有的攻击|更安全的选择|光标: 选择传送目标
-04:20=可以让你更换当前使用的刺猬.|攻击键: 启动切换功能|TAB:切换刺猬
+04:20=可以让你更换当前使用的刺猬.|攻击键: 启动切换功能
04:21=用炮弹发射器发射一个手榴弹样|的东西. 在爆炸之后会裂开成小块|攻击键: 全力发射
04:22=这不只是女王才用的东西!|这鞭子能解决很多问题, 比如说那些|喜欢站在悬崖边上的小屁孩.|攻击键: 鞭打你面前的一切东西
04:23=自杀式炸弹袭击向来好用!|用你的一条命攻击直线上的一切东西并爆炸.|攻击键: 启动自杀性攻击
@@ -834,20 +764,21 @@
04:39=驾驶飞碟可以飞到地图上的任何角落.|不过这个东西连发明者都认为很难用.|攻击键: 激活|上/左/右方向键: 向某方向飞|前跳:攻击敌人
04:40=把地面填满汽油然后....|攻击键: 按住蓄力.
;04:41=自然的力量要盖过飞盘。|带着刺猬的鸟竟然毫不犹豫的空中下蛋!|攻击键: 激活和放蛋|上/左/右方向键: 向某方向飞
-;04:42=这玩意可以,|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: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:42=移动传送装置|迅速传输自己或者敌人或者|你的武器,直接连接|地表的两个不同位置。|用的聪明那么。。。|攻击键: 发射一个传送点|切换键: 改变颜色
;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:43=音乐细胞的迸发!|钢琴从天堂降落,带|着演奏者最终回归天堂|光标: 选择目标区域|F1-F9:演奏钢琴
-04:44=这货不是奶酪!貌似是生化武器!|爆炸只有一次,带来的毒害是深远的!|1-5: 设定定时器|攻击键: 按住蓄力
+04:44=这不是奶酪!而是生化武器!|爆炸只有一次,带来的毒害是深远的!|1-5: 设定定时器|攻击键: 按住蓄力
;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:45=全部物理阶级最终|转化为正弦波动|留心,力是相对的|攻击键: 发射
;04:46=Cover your foes with sizzling liquid flame.|Heartwarming!|Attack: Activate|Up/Down: Continue aiming|Left/Right: Modify spitting power
04:46= 用满腔的火焰虐待你的对手吧。|攻击键: 激活|上/下方向键: 改变攻击方向|左/右方向键: 调整喷射距离
;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:47=两次机会双重乐趣,隐蔽且固定的地雷。|利用脑力造成连锁反应!|攻击键: 按住蓄力(两发)
+04:47=两次机会双重乐趣,隐蔽且黏着的地雷。|利用脑力造成连锁反应!|攻击键: 按住蓄力(两发)
;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:48=痛扁刺猬:用力一锤|将使中者镶入地表,削减它生命值的1/3.|攻击键: 击打
-
+04:48=痛扁刺猬:用力一锤|将使中者镶入地表,削减它健康的1/3.|攻击键: 打
+;04:49=Resurrect your friends!|But beware that this also resurrects your foes.|Attack: Keep attack pressed to resurrect slowly|Up: Accelerate resurrection
+04:49=复苏|注意,一视同仁|使用: 按住使用键|上: 提高速率
; Game goal strings
;05:01=The following rules apply
@@ -859,7 +790,7 @@
;05:04=Invulnerability: Hogs are (almost) invulnerable
05:04=无敌: 刺猬不受伤害
;05:05=Vampirism: Hogs will be healed for the damage dealt
-05:05=吸血: 敌人失去的就是我得到的
+05:05=吸血: 敌人失去的就是我的
;05:06=Karma: Hogs will be damaged for the damage dealt
05:06=因果效应: 伤害有多少,自己都知道
;05:07=Protect the King: Don't let your king die!|Place the King: Pick a protected starting point for your King
@@ -880,3 +811,13 @@
05:14=地雷定时器: 0-3 秒起爆
;05:15=Damage Modifier: All weapons will do %1% damage
05:15=伤害修正: 武器伤害使用 %1% 修正值
+;05:16=Health of all hogs is reset on end of turn
+05:16=所有活着的刺猬回合结尾时彻底恢复健康
+;05:17=AI hogs respawn on death
+05:17=AI刺猬即时复活
+;05:18=Unlimited Attacks
+05:18=无限攻击法则
+;05:19=Weapons are reset on end of turn
+05:19=武器在回合结束时重置
+;05:20=Weapons are not shared between hogs
+05:20=刺猬的武器无法分享
Binary file share/hedgewars/Data/Maps/Bamboo/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/BambooPlinko/preview@2x.png has changed
--- a/share/hedgewars/Data/Maps/Basketball/map.lua Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Maps/Basketball/map.lua Sun Dec 19 13:31:55 2010 -0500
@@ -1,100 +1,6 @@
-- Hedgewars - Basketball for 2+ Players
-local caption = {
- ["en"] = "Hedgewars-Basketball",
- ["de"] = "Hedgewars-Basketball",
- ["es"] = "Hedgewars-Baloncesto",
- ["pl"] = "Hedgewars-Koszykówka",
- ["pt_PT"] = "Hedgewars-Basketball",
- ["sk"] = "Hedgewars-Basketbal",
- ["sv"] = "Hedgewars-Basket",
- ["pt_BR"] = "Hedgewars-Basketball"
- }
-
-local subcaption = {
- ["en"] = "Not So Friendly Match",
- ["de"] = "Kein-so-Freundschaftsspiel",
- ["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ľský zápas",
- ["sv"] = "En inte så vänlig match",
- ["pt_BR"] = "Partida não muito amigável"
- }
-
-local goal = {
- ["en"] = "Bat your opponents through the|baskets and out of the map!",
- ["de"] = "Schlage deine Widersacher durch|die Körbe und aus der Karte hinaus!",
- ["es"] = "¡Batea a tus oponentes fuera del mapa a través de la canasta!",
- ["pl"] = "Uderzaj swoich przekiwników|wyrzucając przez kosz, poza mapę!",
- ["pt_PT"] = "Bate os teus adversarios|fora do mapa acertando com eles no cesto!",
- ["sk"] = "Odpálkujte vašich súperov do koša|a von z mapy!",
- ["sv"] = "Slå ner dina motståndare i|korgarna och ut ur kartan!",
- ["pt_BR"] = "Rebata seus oponentes para|fora do mapa através dos cestos!"
- }
-
-local scored = {
- ["en"] = " scored a point!",
- ["de"] = " erhält einen Punkt!",
- ["es"] = " anotó un tanto!",
- ["pl"] = " zdobyła punkt!",
- ["pt_PT"] = " marca um cesto!",
- ["sk"] = " skóruje!",
- ["sv"] = " fick ett poäng",
- ["pt_BR"] = " fez uma cesta"
- }
-
-local failed = {
- ["en"] = " scored a penalty!",
- ["de"] = " erhält eine Strafe!",
- ["es"] = " anotó una falta!",
- ["pl"] = " zdobyła punkt karny!",
- ["pt_PT"] = " perde um ponto!",
- ["sk"] = " dostáva trestný bod!",
- ["sv"] = " fick ett straff",
- ["pt_BR"] = " sofre uma penalidade"
- }
-
- local sscore = {
- ["en"] = "Score",
- ["de"] = "Punktestand",
- ["es"] = "Puntuación",
- ["pl"] = "Punktacja",
- ["pt_PT"] = "Pontuação",
- ["sk"] = "Skóre",
- ["sv"] = "Poängställning",
- ["pt_BR"] = "Pontuação"
- }
-
-local team = {
- ["en"] = "Team",
- ["es"] = "Equipo",
- ["pl"] = "Drużyna",
- ["pt_PT"] = "Equipa",
- ["sk"] = "Tím",
- ["sv"] = "Lag",
- ["pt_BR"] = "Equipe"
- }
-
-local drowning = {
- ["en"] = "is out and",
- ["de"] = "ist draußen und",
- ["es"] = "cayó y",
- ["pl"] = "jest wyautowany i",
- ["pt_PT"] = "está fora e",
- ["sk"] = "je mimo hru a",
- ["sv"] = "är ute och",
- ["pt_BR"] = "está fora e"
- }
-
-local function loc(text)
- if text == nil then return "**missing**"
- elseif text[L] == nil then return text["en"]
- else return text[L]
- end
-end
-
----------------------------------------------------------------
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0}
@@ -111,7 +17,7 @@
end
function onGameStart()
- ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0);
+ ShowMission(loc("Hedgewars-Basketball"), loc("Not So Friendly Match"), loc("Bat your opponents through the|baskets and out of the map!"), -amBaseballBat, 0)
started = true
end
@@ -132,16 +38,18 @@
end
if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then
local clan = GetHogClan(CurrentHedgehog)
- local s = GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " "
- if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then
- score[clan] = score[clan] + 1
- s = s .. loc(scored)
- else
- score[clan] = score[clan] - 1
- s = s .. loc(failed)
+ local s
+ if clan ~= nil then
+ if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then
+ score[clan] = score[clan] + 1
+ s = string.format(loc("%s is out and Team %d|scored a point!| |Score:"), GetHogName(gear), clan + 1)
+ else
+ score[clan] = score[clan] - 1
+ s = string.format(loc("%s is out and Team %d|scored a penalty!| |Score:"), GetHogName(gear), clan + 1)
+ end
+ s = s .. " " .. score[0]
+ for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end
+ ShowMission(loc("Hedgewars-Basketball"), loc("Not So Friendly Match"), s, -amBaseballBat, 0)
end
- s = s .. "| |" .. loc(sscore) .. ": " .. score[0]
- for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end
- ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0)
end
end
Binary file share/hedgewars/Data/Maps/Basketball/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Bath/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Battlefield/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Blox/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Bubbleflow/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Cake/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Castle/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Cave/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Cheese/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Cogs/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/CrazyMission/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/EarthRise/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Eyes/preview@2x.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Maps/FlightJoust/map.cfg Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,2 @@
+Nature
+4
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Maps/FlightJoust/map.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,79 @@
+local hogs = {}
+local spawncrate = 0
+
+function mapM_(func, tbl)
+ for i,v in pairs(tbl) do
+ func(v)
+ end
+end
+
+function map(func, tbl)
+ local newtbl = {}
+ for i,v in pairs(tbl) do
+ newtbl[i] = func(v)
+ end
+ return newtbl
+end
+
+function filter(func, tbl)
+ local newtbl = {}
+ for i,v in pairs(tbl) do
+ if func(v) then
+ table.insert(newtbl, v)
+ end
+ end
+ return newtbl
+end
+
+function onGameInit()
+ GameFlags = gfSolidLand + gfDivideTeams
+ TurnTime = 10000
+ CaseFreq = 0
+ MinesNum = 0
+ Explosives = 0
+ Delay = 500
+ SuddenDeathTurns = 99999 -- "disable" sudden death
+ Theme = Compost
+end
+
+function onGameStart()
+ local offset = 50
+ local team1hh = filter(function(h) return GetHogClan(h) == 0 end, hogs)
+ local team2hh = filter(function(h) return GetHogClan(h) == 1 end, hogs)
+
+ for i,h in ipairs(team1hh) do
+ SetGearPosition(h, 250+(i-1)*offset, 1000)
+ end
+ for i,h in ipairs(team2hh) do
+ SetGearPosition(h, 3500-(i-1)*offset, 1000)
+ end
+
+ SpawnHealthCrate(1800, 1150)
+end
+
+function onAmmoStoreInit()
+ SetAmmo(amRCPlane, 9, 0, 0, 0)
+ SetAmmo(amSkip, 9, 0, 0, 0)
+end
+
+function onGearAdd(gear)
+ if GetGearType(gear) == gtRCPlane then
+ SetTimer(gear,60000)
+ end
+ if GetGearType(gear) == gtHedgehog then
+ table.insert(hogs, gear)
+ end
+end
+
+function onGameTick()
+ if (TurnTimeLeft == 9999 and spawncrate == 1) then
+ SpawnHealthCrate(1800, 1150)
+ spawncrate = 0
+ end
+end
+
+function onGearDelete(gear)
+ if GetGearType(gear) == gtCase then
+ spawncrate = 1
+ end
+end
Binary file share/hedgewars/Data/Maps/FlightJoust/map.png has changed
Binary file share/hedgewars/Data/Maps/FlightJoust/preview.png has changed
Binary file share/hedgewars/Data/Maps/FlightJoust/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Hammock/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/HedgeFortress/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Hedgelove/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Hedgewars/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Hogville/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Hydrant/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Islands/preview@2x.png has changed
--- a/share/hedgewars/Data/Maps/Knockball/map.lua Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Maps/Knockball/map.lua Sun Dec 19 13:31:55 2010 -0500
@@ -1,68 +1,6 @@
-- Hedgewars - Knockball for 2+ Players
-local caption = {
- ["en"] = "Hedgewars-Knockball",
- ["de"] = "Hedgewars-Knockball",
- ["es"] = "Hedgewars-Knockball",
- ["pl"] = "Hedgewars-Knockball",
- ["pt_PT"] = "Hedgewars-Knockball",
- ["sk"] = "Hedgewars-Knockball",
- ["sv"] = "Hedgewars-Knockball",
- ["pt_BR"] = "Hedgewars-Knockball"
- }
-
-local subcaption = {
- ["en"] = "Not So Friendly Match",
- ["de"] = "Kein-so-Freundschaftsspiel",
- ["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",
- ["sv"] = "En inte så vänlig match",
- ["pt_BR"] = "Partida não muito amigável"
- }
-
-local goal = {
- ["en"] = "Bat balls at your enemies and|push them into the sea!",
- ["de"] = "Schlage Bälle auf deine Widersacher|und lass sie ins Meer fallen!",
- ["es"] = "¡Batea pelotas hacia tus enemigos|y hazlos caer al agua!",
- ["pl"] = "Uderzaj piłkami w swoich przeciwników|i strącaj ich do wody!",
- ["pt_PT"] = "Bate bolas contra os teus|enimigos e empurra-os ao mar!",
- ["sk"] = "Loptami triafajte vašich nepriateľov|a zhoďte ich tak do mora!",
- ["sv"] = "Slå bollar mot dina fiender|och slå ner dem i havet",
- ["pt_BR"] = "Rebata as bolas em direção ao seus|e derrube-os no mar!"
- }
-
-local scored = {
- ["en"] = "%s is out and Team %d|scored a point!| |Score:",
- ["de"] = "%s ist draußen und Team %d|erhält einen Punkt!| |Punktestand:",
- ["es"] = "¡%s cayó y Equipo %d|anotó un tanto!| |Puntuación:",
- ["pl"] = "%s utonął i drużyna %d|zdobyła punkt!| |Punktacja:",
- ["pt_PT"] = "%s está fora e a equipa %d|soma um ponto!| |Pontuação:",
- ["sk"] = "%s je mimo hru a tím %d|získal bod!| |Skóre:",
- ["sv"] = "%s är ute och lag %d|fick ett poäng!| |Poängställning:",
- ["pt_BR"] = "%s está fora e a Equipe %d|marcou um ponto!| |Pontuação:"
- }
-
-local failed = {
- ["en"] = "%s is out and Team %d|scored a penalty!| |Score:",
- ["de"] = "%s ist draußen und Team %d|erhält eine Strafe!| |Punktestand:",
- ["es"] = "¡%s cayó y Equipo %d|anotó una falta!| |Puntuación:",
- ["pl"] = "%s utonął i drużyna %d|dostała punkt karny!| |Punktacja:",
- ["pt_PT"] = "%s está fora e a equipa %d|perde um ponto!| |Pontuação:",
- ["sk"] = "%s je mimo hru a tím %d|dostal trestný bod!| |Skóre:",
- ["sv"] = "%s är ute och lag %d|fick ett straff!| |Poängställning:",
- ["pt_BR"] = "%s está fora e a Equipe %d|sofreu uma penalidade!| |Pontuação:"
- }
-
-local function loc(text)
- if text == nil then return "**missing**"
- elseif text[L] == nil then return text["en"]
- else return text[L]
- end
-end
-
----------------------------------------------------------------
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0}
@@ -81,7 +19,7 @@
end
function onGameStart()
- ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0)
+ ShowMission(loc("Hedgewars-Knockball"), loc("Not So Friendly Match"), loc("Bat balls at your enemies and|push them into the sea!"), -amBaseballBat, 0)
started = true
end
@@ -98,7 +36,8 @@
if GetGearType(gear) == gtShover then
ball = AddGear(GetX(gear), GetY(gear), gtBall, 0, 0, 0, 0)
if ball ~= nil then
- CopyPV2(gear, ball)
+ local dx, dy = GetGearVelocity(gear)
+ SetGearVelocity(ball, dx * 2, dy * 2)
SetState(ball, 0x200) -- temporary - might change!
SetTag(ball, 8) -- baseball skin
FollowGear(ball)
@@ -118,14 +57,14 @@
if clan ~= nil then
if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then
score[clan] = score[clan] + 1
- s = string.format(loc(scored), GetHogName(gear), clan + 1)
+ s = string.format(loc("%s is out and Team %d|scored a point!| |Score:"), GetHogName(gear), clan + 1)
else
score[clan] = score[clan] - 1
- s = string.format(loc(failed), GetHogName(gear), clan + 1)
+ s = string.format(loc("%s is out and Team %d|scored a penalty!| |Score:"), GetHogName(gear), clan + 1)
end
s = s .. " " .. score[0]
for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end
- ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0)
+ ShowMission(loc("Hedgewars-Knockball"), loc("Not So Friendly Match"), s, -amBaseballBat, 0)
end
end
end
Binary file share/hedgewars/Data/Maps/Knockball/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Lonely_Island/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Mushrooms/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Octorama/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/PirateFlag/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Plane/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Ropes/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Ruler/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Sheep/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/ShoppaKing/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Sticks/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/Trash/preview@2x.png has changed
--- a/share/hedgewars/Data/Maps/Tree/map.cfg Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Maps/Tree/map.cfg Sun Dec 19 13:31:55 2010 -0500
@@ -1,1 +1,1 @@
-Nature
\ No newline at end of file
+Halloween
\ No newline at end of file
Binary file share/hedgewars/Data/Maps/Tree/preview@2x.png has changed
--- a/share/hedgewars/Data/Maps/TrophyRace/map.lua Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Maps/TrophyRace/map.lua Sun Dec 19 13:31:55 2010 -0500
@@ -1,85 +1,6 @@
-- Hedgewars - Roperace for 2+ Players
-local caption = {
- ["en"] = "TrophyRace",
- ["sv"] = "TrophyRace",
- ["pt_PT"] = "TrophyRace",
- ["pl"] = "TrophyRace",
- ["es"] = "TrophyRace",
- ["pt_BR"] = "TrophyRace"
- }
-
-local goal = {
- ["en"] = "Use your rope to get from start to finish as fast as you can!",
- ["sv"] = "Använd ditt rep för att ta dig från start till mål så fort som möjligt!",
- ["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!"
- }
-
-local done = {
- ["en"] = "You've reached the goal!| |Time: ",
- ["sv"] = "Du har nått målet!| |Tid: ",
- ["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: "
- }
-
-local eliminated = {
- ["en"] = "Eliminating worst hedgehog this round...| |%s is OUT!",
- ["sv"] = "Eliminerar sämsta igelkott den här rundan...| |%s är UTE!",
- ["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!"
- }
-
-local newbesttime = {
- ["en"] = "NEW fastest lap: ",
- ["sv"] = "NYTT snabbast varv: ",
- ["pt_PT"] = "NOVA volta recorde: ",
- ["pl"] = "NOWE najszybsze okrążenie: ",
- ["es"] = "NUEVA vuelta rápida: ",
- ["pt_BR"] = "NOVA volta mais rápida: "
- }
-
-local oldbesttime = {
- ["en"] = "Fastest lap: ",
- ["sv"] = "Snabbast varv: ",
- ["pt_PT"] = "Volta mais rápida: ",
- ["pl"] = "Najszybsze okrążenie: ",
- ["es"] = "Vuelta rápida: ",
- ["pt_BR"] = "Volta mais rápida: "
- }
-
-local bestclantimes = {
- ["en"] = "Best laps per team: ",
- ["sv"] = "Bästa varv per lag: ",
- ["pt_PT"] = "Melhores voltas por equipa: ",
- ["pl"] = "Najszybsze okrążenie drużyny: ",
- ["es"] = "Mejores tiempos por equipo: ",
- ["pt_BR"] = "Melhor volta por equipe: "
- }
-
-local clantime = {
- ["en"] = "Team %d: ",
- ["sv"] = "Lag %d: ",
- ["pt_PT"] = "Equipa %d: ",
- ["pl"] = "Drużyna %d: ",
- ["es"] = "Equipo %d",
- ["pt_BR"] = "Equipe %d: "
- }
-
-local function loc(text)
- if text == nil then return "**missing**"
- elseif text[L] == nil then return text["en"]
- else return text[L]
- end
-end
-
----------------------------------------------------------------
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
-- store number of hedgehogs
local numhhs = 0
@@ -132,7 +53,7 @@
end
function onGameStart()
- ShowMission(loc(caption), "", loc(goal), -amRope, 0)
+ ShowMission(loc("TrophyRace"), "", loc("Use your rope to get from start to finish as fast as you can!"), -amRope, 0)
started = true
p=1820
for i = 0, numhhs - 1 do
@@ -188,15 +109,15 @@
if ttime < besttime then
besttime = ttime
besthog = CurrentHedgehog
- hscore = hscore .. loc(newbesttime)
+ hscore = hscore .. loc("NEW fastest lap: ")
else
- hscore = hscore .. loc(oldbesttime)
+ hscore = hscore .. loc("Fastest lap: ")
end
if ttime > worsttime then
worsttime = ttime
worsthog = CurrentHedgehog
end
- hscore = hscore .. GetHogName(besthog) .. " - " .. (besttime / 1000) .. " s | |" .. loc(bestclantimes)
+ hscore = hscore .. GetHogName(besthog) .. " - " .. (besttime / 1000) .. " s | |" .. loc("Best laps per team: ")
if clan == ClansCount -1 then
-- Time for elimination - worst hog is out and the worst hog vars are reset.
@@ -213,10 +134,10 @@
if clantimes[i] == 0 then
tt = "--"
end
- hscore = hscore .. "|" .. string.format(loc(clantime), i+1) .. tt
+ hscore = hscore .. "|" .. string.format(loc("Team %d: "), i+1) .. tt
end
- ShowMission(loc(caption), "", loc(done) .. (ttime / 1000) .. " s" .. hscore, 0, 0)
+ ShowMission(loc("TrophyRace"), "", loc("You've reached the goal!| |Time: ") .. (ttime / 1000) .. " s" .. hscore, 0, 0)
TurnTimeLeft = 0
end
end
Binary file share/hedgewars/Data/Maps/TrophyRace/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/test/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/test2/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/test3/preview@2x.png has changed
Binary file share/hedgewars/Data/Maps/testmap/preview@2x.png has changed
--- a/share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua Sun Dec 19 13:31:55 2010 -0500
@@ -1,5 +1,5 @@
-- IMPORTANT -- THIS IS WORK IN PROGRESS AND VERY LIKELY TO BE CHANGED AGAIN
--- IMPORTANT -- SAVE YOURSELF THE WORK AND DON'T TRANSLATE THE TEXTS IF YOU FEAR STARTING OVER LATER!
+-- IMPORTANT -- DO NOT TRANSLATE THIS AS IT USES THE OLD SYSTEM AND WILL BE UPDATED LATER!
local teamnames = {}
local hognames = {}
@@ -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)
@@ -231,12 +250,12 @@
elseif progress > 0 and ((TurnTimeLeft == 0) or (GetHealth(player) ~= player_health) or (GetHealth(instructor) ~= instructor_health)) then
progress = -1
- ShowMission(loc(caption), loc(subcaption), loc(failed), -amBazooka, 0);
+ ShowMission(loc(caption), loc(subcaption), loc(failed), -amBazooka, 0)
time_start = GameTime
PlaySound(sndNooo)
TurnTimeLeft = 0
elseif GameTime == 0 then
- ShowMission(loc(caption), loc(subcaption), loc(goals[0]), -amBazooka, 0);
+ ShowMission(loc(caption), loc(subcaption), loc(goals[0]), -amBazooka, 0)
TurnTimeLeft = 60000
elseif GameTime == 2500 then
FollowGear(instructor)
@@ -250,7 +269,7 @@
progress = 1
TurnTimeLeft = 10000
elseif progress == 1 then
- local x, y = GetGearPosition(player);
+ local x, y = GetGearPosition(player)
if x < player_start_x - 50 then
progress = 2
FollowGear(instructor)
@@ -258,7 +277,7 @@
TurnTimeLeft = 10000
end
elseif progress == 2 then
- local x, y = GetGearPosition(player);
+ local x, y = GetGearPosition(player)
if x > player_start_x then
progress = 3
FollowGear(instructor)
@@ -272,7 +291,7 @@
HogTurnLeft(player, true)
TurnTimeLeft = 10000
elseif progress == 4 then
- local x, y = GetGearPosition(player);
+ local x, y = GetGearPosition(player)
if y < player_start_y then
progress = 5
FollowGear(instructor)
@@ -289,15 +308,15 @@
elseif progress == 5 and (time_start + 7500 == GameTime) then
FollowGear(instructor)
HogSay(instructor, loc(drill[8]), SAY_SHOUT)
- ShowMission(loc(caption), loc(subcaption), loc(goals[1]), 1, 0);
+ ShowMission(loc(caption), loc(subcaption), loc(goals[1]), 1, 0)
target = AddGear(target_x, target_y, gtTarget, 0, 0, 0, 0)
TurnTimeLeft = 60000
elseif progress == 5 and (time_start + 10000 == GameTime) then
FollowGear(target)
elseif progress == 6 then
progress = 7
- ShowMission(loc(caption), loc(subcaption), loc(goals[2]), 0, 0);
- PlaySound(sndVictory);
+ ShowMission(loc(caption), loc(subcaption), loc(goals[2]), 0, 0)
+ PlaySound(sndVictory)
time_start = GameTime
elseif progress == 7 and (time_start + 2500 == GameTime) then
EndGame()
@@ -317,14 +336,14 @@
AddTeam(loc(teamnames[0]), teamcolor, "Simple", "Island", "Default")
player = AddHog(loc(hognames[0]), 0, player_health, "NoHat")
- SetGearPosition(player, player_start_x, player_start_y);
+ SetGearPosition(player, player_start_x, player_start_y)
AddTeam(loc(teamnames[1]), teamcolor + 1, "Simple", "Island", "Default")
instructor = AddHog(loc(hognames[1]), 0, instructor_health, "NoHat")
SetGearPosition(instructor, player_start_x + 100, player_start_y)
HogTurnLeft(instructor, true)
- FollowGear(player);
+ FollowGear(player)
end
function onAmmoStoreInit()
--- a/share/hedgewars/Data/Missions/Training/Bazooka.lua Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Missions/Training/Bazooka.lua Sun Dec 19 13:31:55 2010 -0500
@@ -8,95 +8,12 @@
-- following "--" is ignored.
---------------------------------------------------------------
--- At first we put all text we'd like to use in some arrays.
--- This way we're able to localize the text to be shown without
--- modifying other files.
--- The language to be used is stored in the global variable
--- 'L' that is set by the game (string).
--- Text may then be accessed using "arrayname[L]".
-
-local caption = {
- ["en"] = "Bazooka Training",
- ["de"] = "Bazooka-Training",
- ["es"] = "Entrenamiento con bazuca",
- ["pl"] = "Trening bazooki",
- ["pt_PT"] = "Treino com Bazuca",
- ["pt_BR"] = "Treino com a Bazuca",
- ["sv"] = "Bazookaträning"
- -- To add other languages, just add lines similar to the
- -- existing ones - don't forget the trailing ","!
- }
-
-local subcaption = {
- ["en"] = "Aiming Practice",
- ["de"] = "Zielübung",
- ["es"] = "Practica tu puntería",
- ["pl"] = "Potrenuj celność",
- ["pt_PT"] = "Pratica a tua pontaria",
- ["pt_BR"] = "Pratique a sua pontaria",
- ["sv"] = "Siktesövning"
- }
-
-local goal = {
- ["en"] = "Eliminate all targets before your time runs out.|You have unlimited ammo for this mission.",
- ["de"] = "Eliminiere alle Ziele bevor die Zeit ausläuft.|Du hast in dieser Mission unbegrenzte Munition.",
- ["es"] = "Destruye todos los objetivos antes de que se agote el tiempo.|La munición en esta misión es ilimitada.",
- ["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"
- }
+-- At first we implement the localization library using loadfile.
+-- This allows us to localize strings without needing to think
+-- about translations.
+-- We can use the function loc(text) to localize a string.
-local timeout = {
- ["en"] = "Oh no! Time's up! Just try again.",
- ["de"] = "Oh nein! Die Zeit ist um! Versuche es nochmal.",
- ["es"] = "¡Oh, no, se te acabó el tiempo! ¿Por qué no lo intentas de nuevo?",
- ["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."
- }
-
-local success = {
- ["en"] = "Congratulations! You've eliminated all targets|within the allowed time frame.",
- ["de"] = "Gratulation! Du hast alle Ziele innerhalb der|verfügbaren Zeit ausgeschaltet.",
- ["es"] = "¡Felicidades! Has destruido todos los objectivos|dentro del tiempo establecido.",
- ["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."
- }
-
-local teamname = {
- ["en"] = "'Zooka Team",
- ["de"] = "Die Knalltüten",
- ["es"] = "Bazuqueros",
- ["pl"] = "Bazookinierzy",
- ["pt_PT"] = "Bazuqueiros",
- ["pt_BR"] = "Bazuqueiros",
- ["sv"] = "Bazookalaget"
- }
-
-local hogname = {
- ["en"] = "Hunter",
- ["de"] = "Jäger",
- ["es"] = "Artillero",
- ["pl"] = "Strzelec",
- ["pt_PT"] = "Comando",
- ["pt_BR"] = "Artilheiro",
- ["sv"] = "Jägare"
- }
-
--- To handle missing texts we define a small wrapper function that
--- we'll use to retrieve text.
-local function loc(text)
- if text == nil then return "**missing**"
- elseif text[L] == nil then return text["en"]
- else return text[L]
- end
-end
-
----------------------------------------------------------------
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
-- This variable will hold the number of destroyed targets.
local score = 0
@@ -164,10 +81,10 @@
Theme = "Bamboo"
-- Create the player team
- AddTeam(loc(teamname), 14483456, "Simple", "Island", "Default")
+ AddTeam(loc("'Zooka Team"), 14483456, "Simple", "Island", "Default")
-- And add a hog to it
- player = AddHog(loc(hogname), 0, 1, "NoHat")
- SetGearPosition(player, 1960, 1160);
+ player = AddHog(loc("Hunter"), 0, 1, "NoHat")
+ SetGearPosition(player, 1960, 1160)
end
-- This function is called when the round starts
@@ -183,7 +100,7 @@
-- A negative icon parameter (-n) represents the n-th weapon icon
-- A positive icon paramter (n) represents the (n+1)-th mission icon
-- A timeframe of 0 is replaced with the default time to show.
- ShowMission(loc(caption), loc(subcaption), loc(goal), -amBazooka, 0);
+ ShowMission(loc("Bazooka Training"), loc("Aiming Practice"), loc("Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."), -amBazooka, 0)
end
-- This function is called every game tick.
@@ -197,9 +114,9 @@
if TurnTimeLeft == 1 and score < score_goal then
game_lost = true
-- ... and show a short message.
- ShowMission(loc(caption), loc(subcaption), loc(timeout), -amSkip, 0);
+ ShowMission(loc("Bazooka Training"), loc("Aiming Practice"), loc("Oh no! Time's up! Just try again."), -amSkip, 0)
-- How about killing our poor hog due to his poor performance?
- SetHealth(player, 0);
+ SetHealth(player, 0)
-- Just to be sure set the goal time to 1 ms
time_goal = 1
end
@@ -246,7 +163,7 @@
else
if not game_lost then
-- Otherwise show that the goal was accomplished
- ShowMission(loc(caption), loc(subcaption), loc(success), 0, 0);
+ ShowMission(loc("Bazooka Training"), loc("Aiming Practice"), loc("Congratulations! You've eliminated all targets|within the allowed time frame."), 0, 0)
-- Also let the hogs shout "victory!"
PlaySound(sndVictory)
-- Save the time left so we may keep it.
--- a/share/hedgewars/Data/Missions/Training/Shotgun.lua Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Missions/Training/Shotgun.lua Sun Dec 19 13:31:55 2010 -0500
@@ -8,95 +8,12 @@
-- following "--" is ignored.
---------------------------------------------------------------
--- At first we put all text we'd like to use in some arrays.
--- This way we're able to localize the text to be shown without
--- modifying other files.
--- The language to be used is stored in the global variable
--- 'L' that is set by the game (string).
--- Text may then be accessed using "arrayname[L]".
-
-local caption = {
- ["en"] = "Shotgun Training",
- ["de"] = "Schrotflinten-Training",
- ["es"] = "Entrenamiento con escopeta",
- ["pl"] = "Trening strzelecki",
- ["pt_PT"] = "Treino com Caçadeira",
- ["pt_BR"] = "Treino com a Escopeta",
- ["sv"] = "Hagelgevärsträning"
- -- To add other languages, just add lines similar to the
- -- existing ones - don't forget the trailing ","!
- }
-
-local subcaption = {
- ["en"] = "Aiming Practice",
- ["de"] = "Zielübung",
- ["es"] = "Practica tu puntería",
- ["pl"] = "Potrenuj celność",
- ["pt_PT"] = "Pratica a tua pontaria",
- ["pt_BR"] = "Pratique a sua pontaria",
- ["sv"] = "Siktesövning"
- }
-
-local goal = {
- ["en"] = "Eliminate all targets before your time runs out.|You have unlimited ammo for this mission.",
- ["de"] = "Eliminiere alle Ziele bevor die Zeit ausläuft.|Du hast in dieser Mission unbegrenzte Munition.",
- ["es"] = "Destruye todos los objetivos antes de que se agote el tiempo.|La munición en esta misión es ilimitada.",
- ["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"
- }
+-- At first we implement the localization library using loadfile.
+-- This allows us to localize strings without needing to think
+-- about translations.
+-- We can use the function loc(text) to localize a string.
-local timeout = {
- ["en"] = "Oh no! Time's up! Just try again.",
- ["de"] = "Oh nein! Die Zeit ist um! Versuche es nochmal.",
- ["es"] = "¡Oh, no, se te acabó el tiempo! ¿Por qué no lo intentas de nuevo?",
- ["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."
- }
-
-local success = {
- ["en"] = "Congratulations! You've eliminated all targets|within the allowed time frame.",
- ["de"] = "Gratulation! Du hast alle Ziele innerhalb der|verfügbaren Zeit ausgeschaltet.",
- ["es"] = "¡Felicidades! Has destruido todos los objectivos|dentro del tiempo establecido.",
- ["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."
- }
-
-local teamname = {
- ["en"] = "Shotgun Team",
- ["de"] = "Die Knalltüten",
- ["es"] = "Escopeteros",
- ["pl"] = "Shotgun Team",
- ["pt_PT"] = "Caçadores",
- ["pt_PT"] = "Carabineiros",
- ["sv"] = "Hagelgevärslaget"
- }
-
-local hogname = {
- ["en"] = "Hunter",
- ["de"] = "Jäger",
- ["es"] = "Cazador",
- ["pl"] = "Strzelec",
- ["pt_PT"] = "Comando",
- ["pt_BR"] = "Caçador",
- ["sv"] = "Jägare"
- }
-
--- To handle missing texts we define a small wrapper function that
--- we'll use to retrieve text.
-local function loc(text)
- if text == nil then return "**missing**"
- elseif text[L] == nil then return text["en"]
- else return text[L]
- end
-end
-
----------------------------------------------------------------
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
-- This variable will hold the number of destroyed targets.
local score = 0
@@ -164,10 +81,10 @@
Theme = "Nature"
-- Create the player team
- AddTeam(loc(teamname), 14483456, "Simple", "Island", "Default")
+ AddTeam(loc("Shotgun Team"), 14483456, "Simple", "Island", "Default")
-- And add a hog to it
- player = AddHog(loc(hogname), 0, 1, "NoHat")
- SetGearPosition(player, 2334, 1254);
+ player = AddHog(loc("Hunter"), 0, 1, "NoHat")
+ SetGearPosition(player, 2334, 1254)
end
-- This function is called when the round starts
@@ -183,7 +100,7 @@
-- A negative icon parameter (-n) represents the n-th weapon icon
-- A positive icon paramter (n) represents the (n+1)-th mission icon
-- A timeframe of 0 is replaced with the default time to show.
- ShowMission(loc(caption), loc(subcaption), loc(goal), -amShotgun, 0);
+ ShowMission(loc("Shotgun Training"), loc("Aiming Practice"), loc("Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."), -amShotgun, 0)
end
-- This function is called every game tick.
@@ -197,9 +114,9 @@
if TurnTimeLeft == 1 and score < score_goal then
game_lost = true
-- ... and show a short message.
- ShowMission(loc(caption), loc(subcaption), loc(timeout), -amSkip, 0);
+ ShowMission(loc("Shotgun Training"), loc("Aiming Practice"), loc("Oh no! Time's up! Just try again."), -amSkip, 0)
-- How about killing our poor hog due to his poor performance?
- SetHealth(player, 0);
+ SetHealth(player, 0)
-- Just to be sure set the goal time to 1 ms
time_goal = 1
end
@@ -246,7 +163,7 @@
else
if not game_lost then
-- Otherwise show that the goal was accomplished
- ShowMission(loc(caption), loc(subcaption), loc(success), 0, 0);
+ ShowMission(loc("Shotgun Training"), loc("Aiming Practice"), loc("Congratulations! You've eliminated all targets|within the allowed time frame."), 0, 0)
-- Also let the hogs shout "victory!"
PlaySound(sndVictory)
-- Save the time left so we may keep it.
--- a/share/hedgewars/Data/Missions/Training/SniperRifle.lua Mon Dec 06 03:07:03 2010 +0100
+++ b/share/hedgewars/Data/Missions/Training/SniperRifle.lua Sun Dec 19 13:31:55 2010 -0500
@@ -8,94 +8,12 @@
-- following "--" is ignored.
---------------------------------------------------------------
--- At first we put all text we'd like to use in some arrays.
--- This way we're able to localize the text to be shown without
--- modifying other files.
--- The language to be used is stored in the global variable
--- 'L' that is set by the game (string).
--- Text may then be accessed using "arrayname[L]".
-
-local caption = {
- ["en"] = "Sniper Training",
- ["de"] = "Scharfschützen-Training",
- ["es"] = "Entrenamiento con rifle francotirador",
- ["pl"] = "Trening Snajperski",
- ["pt_PT"] = "Treino com Sniper",
- ["pt_BR"] = "Treino com o Rifle Sniper",
- ["sv"] = "Prickskyttesträning"
- -- To add other languages, just add lines similar to the
- -- existing ones - don't forget the trailing ","!
- }
-
-local subcaption = {
- ["en"] = "Aiming Practice",
- ["de"] = "Zielübung",
- ["es"] = "Practica tu puntería",
- ["pl"] = "Potrenuj celność",
- ["pt_PT"] = "Pratica a tua pontaria",
- ["pt_BR"] = "Pratique a sua pontaria",
- ["sv"] = "Siktesövning"
- }
-
-local goal = {
- ["en"] = "Eliminate all targets before your time runs out.|You have unlimited ammo for this mission.",
- ["de"] = "Eliminiere alle Ziele bevor die Zeit ausläuft.|Du hast in dieser Mission unbegrenzte Munition.",
- ["es"] = "Destruye todos los objetivos antes de que se agote el tiempo.|La munición en esta misión es ilimitada.",
- ["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"
- }
+-- At first we implement the localization library using loadfile.
+-- This allows us to localize strings without needing to think
+-- about translations.
+-- We can use the function loc(text) to localize a string.
-local timeout = {
- ["en"] = "Oh no! Time's up! Just try again.",
- ["de"] = "Oh nein! Die Zeit ist um! Versuche es nochmal.",
- ["es"] = "¡Oh, no, se te acabó el tiempo! ¿Por qué no lo intentas de nuevo?",
- ["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."
- }
-
-local success = {
- ["en"] = "Congratulations! You've eliminated all targets|within the allowed time frame.",
- ["de"] = "Gratulation! Du hast alle Ziele innerhalb der|verfügbaren Zeit ausgeschaltet.",
- ["es"] = "¡Felicidades! Has destruido todos los objectivos|dentro del tiempo establecido.",
- ["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."
- }
-
-local teamname = {
- ["en"] = "Sniperz",
- ["de"] = "Heckenschützen",
- ["es"] = "Fusileros",
- ["pl"] = "Snajperzy",
- ["pt_BR"] = "Franco-Atiradores",
- ["sv"] = "Prickskyttarna"
- }
-
-local hogname = {
- ["en"] = "Hunter",
- ["de"] = "Jäger",
- ["es"] = "Francotirador",
- ["pl"] = "Strzelec",
- ["pt_PT"] = "Comando",
- ["pt_BR"] = "Caçador",
- ["sv"] = "Jägare"
- }
-
--- To handle missing texts we define a small wrapper function that
--- we'll use to retrieve text.
-local function loc(text)
- if text == nil then return "**missing**"
- elseif text[L] == nil then return text["en"]
- else return text[L]
- end
-end
-
----------------------------------------------------------------
+loadfile(GetDataPath() .. "Scripts/Locale.lua")()
-- This variable will hold the number of destroyed targets.
local score = 0
@@ -164,10 +82,10 @@
Theme = "City"
-- Create the player team
- AddTeam(loc(teamname), 14483456, "Simple", "Island", "Default")
+ AddTeam(loc("Sniperz"), 14483456, "Simple", "Island", "Default")
-- And add a hog to it
- player = AddHog(loc(hogname), 0, 1, "Sniper")
- SetGearPosition(player, 602, 1465);
+ player = AddHog(loc("Hunter"), 0, 1, "Sniper")
+ SetGearPosition(player, 602, 1465)
end
-- This function is called when the round starts
@@ -183,7 +101,7 @@
-- A negative icon parameter (-n) represents the n-th weapon icon
-- A positive icon paramter (n) represents the (n+1)-th mission icon
-- A timeframe of 0 is replaced with the default time to show.
- ShowMission(loc(caption), loc(subcaption), loc(goal), -amSniperRifle, 0);
+ ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."), -amSniperRifle, 0)
end
-- This function is called every game tick.
@@ -208,9 +126,9 @@
if TurnTimeLeft == 1 and score < score_goal then
game_lost = true
-- ... and show a short message.
- ShowMission(loc(caption), loc(subcaption), loc(timeout), -amSkip, 0);
+ ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Oh no! Time's up! Just try again."), -amSkip, 0)
-- How about killing our poor hog due to his poor performance?
- SetHealth(player, 0);
+ SetHealth(player, 0)
-- Just to be sure set the goal time to 1 ms
time_goal = 1
end
@@ -374,7 +292,7 @@
else
if not game_lost then
-- Otherwise show that the goal was accomplished
- ShowMission(loc(caption), loc(subcaption), loc(success), 0, 0);
+ ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Congratulations! You've eliminated all targets|within the allowed time frame."), 0, 0)
-- Also let the hogs shout "victory!"
PlaySound(sndVictory)
-- Save the time left so we may keep it.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Scripts/CMakeLists.txt Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,7 @@
+file(GLOB luafiles *.lua)
+
+install(FILES
+ ${luafiles}
+ DESTINATION ${SHAREPATH}Data/Scripts)
+
+add_subdirectory(Multiplayer)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Scripts/Locale.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,10 @@
+local lang = loadfile(GetDataPath() .. "Locale/" .. tostring(L) .. ".lua")
+if lang ~= nil then
+ lang()
+end
+
+function loc(text)
+ if lang ~= nil and locale ~= nil and locale[text] ~= nil then return locale[text]
+ else return text
+ end
+end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Scripts/Multiplayer/CMakeLists.txt Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,7 @@
+file(GLOB luafiles *.lua)
+file(GLOB cfgfiles *.cfg)
+
+install(FILES
+ ${luafiles}
+ ${cfgfiles}
+ DESTINATION ${SHAREPATH}Data/Scripts/Multiplayer)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Random_Weapon.cfg Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,2 @@
+Default
+locked
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Random_Weapon.lua Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,42 @@
+local weapons = { amGrenade, amClusterBomb, amBazooka, amBee, amShotgun,
+ amMine, amDEagle, amDynamite, amFirePunch, amWhip, amPickHammer,
+ amBaseballBat, amAirAttack, amMineStrike, amTeleport, amMortar, amCake,
+ amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun,
+ amRCPlane, amSniperRifle, amMolotov, amBirdy, amBlowTorch,
+ amGasBomb, amFlamethrower, amSMine, amHammer, amDrillStrike }
+
+local lastRound = -1
+local weapon = 0
+
+function onGameInit()
+ GameFlags = band(bor(GameFlags, gfResetWeps), bnot(gfInfAttack + gfPerHogAmmo))
+end
+
+function onAmmoStoreInit()
+ SetAmmo(amSkip, 9, 0, 0, 0)
+
+ SetAmmo(amParachute, 0, 1, 0, 1)
+ SetAmmo(amGirder, 0, 1, 0, 2)
+ SetAmmo(amSwitch, 0, 1, 0, 1)
+ SetAmmo(amLowGravity, 0, 1, 0, 1)
+ SetAmmo(amExtraDamage, 0, 1, 0, 1)
+ SetAmmo(amInvulnerable, 0, 1, 0, 1)
+ SetAmmo(amExtraTime, 0, 1, 0, 1)
+ SetAmmo(amLaserSight, 0, 1, 0, 1)
+ SetAmmo(amVampiric, 0, 1, 0, 1)
+ SetAmmo(amJetpack, 0, 1, 0, 1)
+ SetAmmo(amPortalGun, 0, 1, 0, 1)
+ SetAmmo(amResurrector, 0, 1, 0, 1)
+
+ for i, w in pairs(weapons) do
+ SetAmmo(w, 0, 0, 0, 1)
+ end
+end
+
+function onNewTurn()
+ if lastRound ~= TotalRounds then
+ weapon = GetRandom(table.maxn(weapons)) + 1
+ lastRound = TotalRounds
+ end
+ AddAmmo(CurrentHedgehog, weapons[weapon])
+end
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
Binary file share/hedgewars/Data/Themes/Art/icon.png has changed
Binary file share/hedgewars/Data/Themes/Art/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Bamboo/icon.png has changed
Binary file share/hedgewars/Data/Themes/Bamboo/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Bath/icon.png has changed
Binary file share/hedgewars/Data/Themes/Bath/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Blox/icon.png has changed
Binary file share/hedgewars/Data/Themes/Blox/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Brick/icon.png has changed
Binary file share/hedgewars/Data/Themes/Brick/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Cake/icon.png has changed
Binary file share/hedgewars/Data/Themes/Cake/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Castle/icon.png has changed
Binary file share/hedgewars/Data/Themes/Castle/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Cheese/icon.png has changed
Binary file share/hedgewars/Data/Themes/Cheese/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/City/icon.png has changed
Binary file share/hedgewars/Data/Themes/City/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Compost/icon.png has changed
Binary file share/hedgewars/Data/Themes/Compost/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Desert/icon.png has changed
Binary file share/hedgewars/Data/Themes/Desert/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/EarthRise/icon.png has changed
Binary file share/hedgewars/Data/Themes/EarthRise/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Freeway/icon.png has changed
Binary file share/hedgewars/Data/Themes/Freeway/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Halloween/icon.png has changed
Binary file share/hedgewars/Data/Themes/Halloween/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Hell/icon.png has changed
Binary file share/hedgewars/Data/Themes/Hell/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Island/icon.png has changed
Binary file share/hedgewars/Data/Themes/Island/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Jungle/icon.png has changed
Binary file share/hedgewars/Data/Themes/Jungle/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Nature/icon.png has changed
Binary file share/hedgewars/Data/Themes/Nature/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Olympics/icon.png has changed
Binary file share/hedgewars/Data/Themes/Olympics/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Sheep/icon.png has changed
Binary file share/hedgewars/Data/Themes/Sheep/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Snow/icon.png has changed
Binary file share/hedgewars/Data/Themes/Snow/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Stage/icon.png has changed
Binary file share/hedgewars/Data/Themes/Stage/icon@2x.png has changed
Binary file share/hedgewars/Data/Themes/Underwater/icon.png has changed
Binary file share/hedgewars/Data/Themes/Underwater/icon@2x.png has changed
--- a/tools/CMakeLists.txt Mon Dec 06 03:07:03 2010 +0100
+++ b/tools/CMakeLists.txt Sun Dec 19 13:31:55 2010 -0500
@@ -19,8 +19,8 @@
find_package(SPARKLE)
#use the associated tool from the libraries we've selected
- string(REGEX REPLACE "(.*)/include;-.*" "\\1" qt_base_dir "${QT_INCLUDE_DIR}")
- find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac PATH ${qt_base_dir})
+ string(REGEX REPLACE "(.*)/include.*" "\\1" qt_base_dir "${QT_INCLUDE_DIR}")
+ find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac PATHS ${qt_base_dir}/bin NO_DEFAULT_PATH)
if(NOT macdeployqt_EXE)
message(FATAL_ERROR "The utility macdeployqt is required to create the bundle!")
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/PascalParser.hs Sun Dec 19 13:31:55 2010 -0500
@@ -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 Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,15 @@
+# -------------------------------------------------
+# Project created by QtCreator 2010-11-27T22:18:20
+# -------------------------------------------------
+TARGET = drawMapTest
+TEMPLATE = app
+SOURCES += main.cpp \
+ mainwindow.cpp \
+ drawmapscene.cpp \
+ qaspectratiolayout.cpp \
+ drawmapwidget.cpp
+HEADERS += mainwindow.h \
+ drawmapscene.h \
+ qaspectratiolayout.h \
+ drawmapwidget.h
+FORMS += mainwindow.ui
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/drawmapscene.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,187 @@
+#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.first().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.prepend(QList<QPoint>() << mouseEvent->scenePos().toPoint());
+ m_currPath->setPath(path);
+
+ emit pathChanged();
+}
+
+void DrawMapScene::mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent)
+{
+ qDebug() << "release" << mouseEvent->scenePos();
+
+ simplifyLast();
+
+ m_currPath = 0;
+}
+
+void DrawMapScene::undo()
+{
+ if(items().size())
+ {
+ removeItem(items().first());
+ paths.removeFirst();
+
+ 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 *)&px, 2);
+ b.append((const char *)&py, 2);
+ b.append((const char *)&flags, 1);
+
+ ++cnt;
+ }
+
+ }
+
+ return b;
+}
+
+void DrawMapScene::decode(QByteArray data)
+{
+ clear();
+ paths.clear();
+
+ QList<QPoint> points;
+
+ while(data.size() >= 5)
+ {
+ qint16 px = qFromBigEndian(*(qint16 *)data.data());
+ data.remove(0, 2);
+ qint16 py = qFromBigEndian(*(qint16 *)data.data());
+ data.remove(0, 2);
+ quint8 flags = *(quint8 *)data.data();
+ data.remove(0, 1);
+
+ //last chunk or first point
+ if((data.size() < 5) || (flags & 0x80))
+ {
+ if(points.size())
+ {
+ qDebug() << points;
+ addPath(pointsToPath(points), m_pen);
+ paths.prepend(points);
+
+ points.clear();
+ }
+ }
+
+ points.append(QPoint(px, py));
+ }
+}
+
+void DrawMapScene::simplifyLast()
+{
+ QList<QPoint> points = paths[0];
+
+ QPoint prevPoint = points.first();
+ int i = 1;
+ while(i < points.size())
+ {
+ if( (i != points.size() - 1)
+ && (sqr(prevPoint.x() - points[i].x()) + sqr(prevPoint.y() - points[i].y()) < 1000)
+ )
+ points.removeAt(i);
+ else
+ {
+ prevPoint = points[i];
+ ++i;
+ }
+ }
+
+ paths[0] = points;
+
+
+ // redraw path
+ {
+ QGraphicsPathItem * pathItem = static_cast<QGraphicsPathItem *>(items()[0]);
+ pathItem->setPath(pointsToPath(paths[0]));
+ }
+
+ emit pathChanged();
+}
+
+QPainterPath DrawMapScene::pointsToPath(const QList<QPoint> points)
+{
+ QPainterPath path;
+
+ if(points.size())
+ {
+ QPointF p = points[0] + QPointF(0.01, 0.01);
+ path.moveTo(p);
+
+ foreach(QPoint p, points)
+ path.lineTo(p);
+ }
+
+ return path;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/drawmapscene.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,40 @@
+#ifndef DRAWMAPSCENE_H
+#define DRAWMAPSCENE_H
+
+#include <QGraphicsScene>
+#include <QPainterPath>
+
+class QGraphicsPathItem;
+
+typedef QList<QList<QPoint> > Paths;
+
+class DrawMapScene : public QGraphicsScene
+{
+Q_OBJECT
+public:
+ explicit DrawMapScene(QObject *parent = 0);
+
+ QByteArray encode();
+ void decode(QByteArray data);
+
+signals:
+ void pathChanged();
+
+public slots:
+ void undo();
+ void simplifyLast();
+
+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);
+
+ QPainterPath pointsToPath(const QList<QPoint> points);
+};
+
+#endif // DRAWMAPSCENE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/drawmapwidget.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,38 @@
+#include "drawmapwidget.h"
+
+DrawMapWidget::DrawMapWidget(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::DrawMapWidget)
+{
+ ui->setupUi(this);
+}
+
+DrawMapWidget::~DrawMapWidget()
+{
+ delete ui;
+}
+
+void DrawMapWidget::changeEvent(QEvent *e)
+{
+ QWidget::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+void DrawMapWidget::setScene(DrawMapScene * scene)
+{
+ ui->graphicsView->setScene(scene);
+}
+
+void DrawMapWidget::resizeEvent(QResizeEvent * event)
+{
+ Q_UNUSED(event);
+
+ if(ui->graphicsView && ui->graphicsView->scene())
+ ui->graphicsView->fitInView(ui->graphicsView->scene()->sceneRect(), Qt::KeepAspectRatio);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/drawmapwidget.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,61 @@
+#ifndef DRAWMAPWIDGET_H
+#define DRAWMAPWIDGET_H
+
+#include <QWidget>
+#include <QHBoxLayout>
+#include <QPushButton>
+#include <QGraphicsView>
+#include <QApplication>
+
+#include "qaspectratiolayout.h"
+#include "drawmapscene.h"
+
+namespace Ui {
+ class Ui_DrawMapWidget
+ {
+ public:
+ QGraphicsView *graphicsView;
+ QPushButton *pbUndo;
+
+ void setupUi(QWidget *drawMapWidget)
+ {
+ QAspectRatioLayout * arLayout = new QAspectRatioLayout(drawMapWidget);
+ arLayout->setMargin(0);
+
+ graphicsView = new QGraphicsView(drawMapWidget);
+ arLayout->addWidget(graphicsView);
+
+ retranslateUi(drawMapWidget);
+
+ QMetaObject::connectSlotsByName(drawMapWidget);
+ } // setupUi
+
+ void retranslateUi(QWidget *drawMapWidget)
+ {
+ Q_UNUSED(drawMapWidget);
+ } // retranslateUi
+
+ };
+
+ class DrawMapWidget: public Ui_DrawMapWidget {};
+}
+
+class DrawMapWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit DrawMapWidget(QWidget *parent = 0);
+ ~DrawMapWidget();
+
+ void setScene(DrawMapScene * scene);
+
+protected:
+ void changeEvent(QEvent *e);
+ virtual void resizeEvent(QResizeEvent * event);
+
+private:
+ Ui::DrawMapWidget *ui;
+};
+
+#endif // DRAWMAPWIDGET_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/main.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -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 Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,70 @@
+#include <QFileDialog>
+
+#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);
+ ui->drawMapWidget->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::scene_pathChanged()
+{
+ QString str = scene->encode().toBase64();
+ ui->plainTextEdit->setPlainText(str);
+ ui->sbBytes->setValue(str.size());
+}
+
+void MainWindow::on_pbSave_clicked()
+{
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save map"), ".");
+
+ if(!fileName.isEmpty())
+ {
+ QFile f(fileName);
+
+ f.open(QIODevice::WriteOnly);
+ f.write(scene->encode());
+ }
+}
+
+void MainWindow::on_pbLoad_clicked()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open map file"), ".");
+
+ if(!fileName.isEmpty())
+ {
+ QFile f(fileName);
+
+ f.open(QIODevice::ReadOnly);
+ QByteArray data = f.readAll();
+ scene->decode(data);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/mainwindow.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,31 @@
+#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;
+
+private slots:
+ void on_pbLoad_clicked();
+ void on_pbSave_clicked();
+ void scene_pathChanged();
+};
+
+#endif // MAINWINDOW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/mainwindow.ui Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,92 @@
+<?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" rowstretch="3,1">
+ <item row="1" column="2">
+ <widget class="QPlainTextEdit" name="plainTextEdit"/>
+ </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="pbSave">
+ <property name="text">
+ <string>Save</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pbLoad">
+ <property name="text">
+ <string>Load</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="sbBytes">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="buttonSymbols">
+ <enum>QAbstractSpinBox::NoButtons</enum>
+ </property>
+ <property name="suffix">
+ <string> bytes</string>
+ </property>
+ <property name="maximum">
+ <number>999999</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="2">
+ <widget class="DrawMapWidget" name="drawMapWidget" native="true"/>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+ <customwidget>
+ <class>DrawMapWidget</class>
+ <extends>QWidget</extends>
+ <header>drawmapwidget.h</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/qaspectratiolayout.cpp Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#include "qaspectratiolayout.h"
+
+QAspectRatioLayout::QAspectRatioLayout(QWidget* parent, int spacing) : QLayout(parent) {
+ init(spacing);
+}
+
+QAspectRatioLayout::QAspectRatioLayout(int spacing) {
+ init(spacing);
+}
+
+QAspectRatioLayout::~QAspectRatioLayout() {
+ delete item;
+ delete lastReceivedRect;
+ delete _geometry;
+}
+
+void QAspectRatioLayout::init(int spacing) {
+ item = 0;
+ lastReceivedRect = new QRect(0, 0, 0, 0);
+ _geometry = new QRect(0, 0, 0, 0);
+ setSpacing(spacing);
+}
+
+
+/* Adds item if place isn't already taken. */
+void QAspectRatioLayout::add(QLayoutItem* item) {
+ if(!hasItem()) {
+ replaceItem(item);
+ }
+}
+
+/* Adds item if place isn't already taken. */
+void QAspectRatioLayout::addItem(QLayoutItem* item) {
+ if(!hasItem()) {
+ replaceItem(item);
+ }
+}
+
+/* Adds widget if place isn't already taken. */
+void QAspectRatioLayout::addWidget(QWidget* widget) {
+ if(!hasItem()) {
+ replaceItem(new QWidgetItem(widget));
+ }
+}
+
+/* Returns the item pointer and dereferences it here. */
+QLayoutItem* QAspectRatioLayout::take() {
+ QLayoutItem* item = 0;
+ if(this->hasItem()) {
+ item = this->item;
+ this->item = 0;
+ }
+ return item;
+}
+
+/* Returns the item pointer and dereferences it here. */
+QLayoutItem* QAspectRatioLayout::takeAt(int index) {
+ if(index != 0) {
+ return 0;
+ }
+ return this->take();
+}
+
+/* Returns the item pointer. */
+QLayoutItem* QAspectRatioLayout::itemAt(int index) const {
+ if(index != 0) {
+ return 0;
+ }
+ if(hasItem()) {
+ return this->item;
+ }
+ return 0;
+}
+
+/* Checks if we have an item. */
+bool QAspectRatioLayout::hasItem() const {
+ return this->item != 0;
+}
+
+/* Returns the count of items which can be either 0 or 1. */
+int QAspectRatioLayout::count() const {
+ int returnValue = 0;
+ if(hasItem()) {
+ returnValue = 1;
+ }
+ return returnValue;
+}
+
+/* Replaces the item with the new and returns the old. */
+QLayoutItem* QAspectRatioLayout::replaceItem(QLayoutItem* item) {
+ QLayoutItem* old = 0;
+ if(this->hasItem()) {
+ old = this->item;
+ }
+ this->item = item;
+ setGeometry(*this->_geometry);
+ return old;
+}
+
+/* Tells which way layout expands. */
+Qt::Orientations QAspectRatioLayout::expandingDirections() const {
+ return Qt::Horizontal | Qt::Vertical;
+}
+
+/* Tells which size is preferred. */
+QSize QAspectRatioLayout::sizeHint() const {
+ return this->item->minimumSize();
+}
+
+/* Tells minimum size. */
+QSize QAspectRatioLayout::minimumSize() const {
+ return this->item->minimumSize();
+}
+
+/*
+ * Tells if heightForWidth calculations is handled.
+ * It isn't since width isn't enough to calculate
+ * proper size.
+ */
+bool QAspectRatioLayout::hasHeightForWidth() const {
+ return false;
+}
+
+/* Replaces lastReceivedRect. */
+void QAspectRatioLayout::setLastReceivedRect(const QRect& rect) {
+ QRect* oldRect = this->lastReceivedRect;
+ this->lastReceivedRect = new QRect(rect.topLeft(), rect.size());
+ delete oldRect;
+}
+
+/* Returns geometry */
+QRect QAspectRatioLayout::geometry() {
+ return QRect(*this->_geometry);
+}
+
+/* Sets geometry to given size. */
+void QAspectRatioLayout::setGeometry(const QRect& rect) {
+ /*
+ * We check if the item is set and
+ * if size is the same previously received.
+ * If either is false nothing is done.
+ */
+ if(!this->hasItem() ||
+ areRectsEqual(*this->lastReceivedRect, rect)) {
+ return;
+ }
+ /* Replace the last received rectangle. */
+ setLastReceivedRect(rect);
+ /* Calculate proper size for the item relative to the received size. */
+ QSize properSize = calculateProperSize(rect.size());
+ /* Calculate center location in the rect and with item size. */
+ QPoint properLocation = calculateCenterLocation(rect.size(), properSize);
+ /* Set items geometry */
+ this->item->setGeometry(QRect(properLocation, properSize));
+ QRect* oldRect = this->_geometry;
+ /* Cache the calculated geometry. */
+ this->_geometry = new QRect(properLocation, properSize);
+ delete oldRect;
+ /* Super classes setGeometry */
+ QLayout::setGeometry(*this->_geometry);
+}
+
+/* Takes the shortest side and creates QSize
+ * with the shortest side as width and height. */
+QSize QAspectRatioLayout::calculateProperSize(QSize from) const {
+ QSize properSize;
+ if(from.height() * 2 < from.width()) {
+ properSize.setHeight(from.height() - this->margin());
+ properSize.setWidth(from.height() * 2 - this->margin());
+ }
+ else {
+ properSize.setWidth(from.width() - this->margin());
+ properSize.setHeight(from.width() / 2 - this->margin());
+ }
+ return properSize;
+}
+
+/* Calculates center location from the given height and width for item size. */
+QPoint QAspectRatioLayout::calculateCenterLocation(QSize from,
+ QSize itemSize) const {
+ QPoint centerLocation;
+ if((from.width() - itemSize.width()) > 0) {
+ centerLocation.setX((from.width() - itemSize.width())/2);
+ }
+ if((from.height() - itemSize.height()) > 0) {
+ centerLocation.setY((from.height() - itemSize.height())/2);
+ }
+ return centerLocation;
+}
+
+/* Compares if two QRects are equal. */
+bool QAspectRatioLayout::areRectsEqual(const QRect& a,
+ const QRect& b) const {
+ bool result = false;
+ if(a.x() == b.x() &&
+ a.y() == b.y() &&
+ a.height() == b.height() &&
+ a.width() == b.width()) {
+ result = true;
+ }
+ return result;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/drawMapTest/qaspectratiolayout.h Sun Dec 19 13:31:55 2010 -0500
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation.
+ */
+
+#ifndef QASPECTRATIOLAYOUT_H_
+#define QASPECTRATIOLAYOUT_H_
+
+#include <QLayout>
+#include <QPointer>
+#include <QRect>
+#include <QWidgetItem>
+#include <QLayoutItem>
+
+
+class QAspectRatioLayout : public QLayout
+{
+ Q_OBJECT
+
+public:
+ QAspectRatioLayout(QWidget* parent, int spacing =-1);
+ QAspectRatioLayout(int spacing = -1);
+ ~QAspectRatioLayout();
+
+ /* Convenience method */
+ virtual void add(QLayoutItem* item);
+
+/* http://doc.trolltech.com/qlayout.html#addItem */
+ virtual void addItem(QLayoutItem* item);
+ /* http://doc.trolltech.com/qlayout.html#addWidget */
+ virtual void addWidget(QWidget* widget);
+ /* http://doc.trolltech.com/qlayout.html#takeAt */
+ virtual QLayoutItem* takeAt(int index);
+ /* http://doc.trolltech.com/qlayout.html#itemAt */
+ virtual QLayoutItem* itemAt(int index) const;
+ /* http://doc.trolltech.com/qlayout.html#count */
+ virtual int count() const;
+
+ /*
+ * These are ours since we do have only one item.
+ */
+ virtual QLayoutItem* replaceItem(QLayoutItem* item);
+ virtual QLayoutItem* take();
+ virtual bool hasItem() const;
+
+/* http://doc.trolltech.com/qlayout.html#expandingDirections */
+ virtual Qt::Orientations expandingDirections() const;
+
+ /*
+ * This method contains most of the juice of this article.
+ * http://doc.trolltech.com/qlayoutitem.html#setGeometry
+ */
+ virtual void setGeometry(const QRect& rect);
+ /* http://doc.trolltech.com/qlayoutitem.html#geometry */
+ virtual QRect geometry();
+
+ /* http://doc.trolltech.com/qlayoutitem.html#sizeHint */
+ virtual QSize sizeHint() const;
+ /* http://doc.trolltech.com/qlayout.html#minimumSize */
+ virtual QSize minimumSize() const;
+ /* http://doc.trolltech.com/qlayoutitem.html#hasHeightForWidth */
+ virtual bool hasHeightForWidth() const;
+
+private:
+ /* Saves the last received rect. */
+ void setLastReceivedRect(const QRect& rect);
+ /* Used to initialize the object. */
+ void init(int spacing);
+ /* Calculates the maximum size for the item from the assigned size. */
+ QSize calculateProperSize(QSize from) const;
+ /* Calculates the center location from the assigned size and
+ * the items size. */
+ QPoint calculateCenterLocation(QSize from, QSize itemSize) const;
+ /* Check if two QRects are equal */
+ bool areRectsEqual(const QRect& a, const QRect& b) const;
+ /* Contains item reference */
+ QLayoutItem* item;
+ /*
+ * Used for caching so we won't do calculations every time
+ * setGeometry is called.
+ */
+ QRect* lastReceivedRect;
+ /* Contains geometry */
+ QRect* _geometry;
+
+};
+
+#endif /* QASPECTRATIOLAYOUT_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/unitCycles.hs Sun Dec 19 13:31:55 2010 -0500
@@ -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