summaryrefslogtreecommitdiff
path: root/src/screen_world.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-09 21:36:26 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-09 21:36:26 +0000
commit1438b79069821cba744a4ea4739324560be64fb6 (patch)
tree1229b2aca2937be2e838fb2d787ab31d83cd59c7 /src/screen_world.c
parentda85e88878251f6a980fef95bd47109169a3cf7c (diff)
- pridany doomovsky adresar
- moznost ulozit nastavenie - tabulka najlepsich - zabytie protigraca minou sa rata do bodov supera git-svn-id: http://opensvn.csie.org/tuxanci_ng@13 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/screen_world.c')
-rw-r--r--src/screen_world.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/screen_world.c b/src/screen_world.c
index 439cefa..b35e82e 100644
--- a/src/screen_world.c
+++ b/src/screen_world.c
@@ -11,6 +11,7 @@
#include "screen_setting.h"
#include "screen_gameType.h"
#include "screen_choiceArena.h"
+#include "screen_table.h"
#include "list.h"
#include "layer.h"
@@ -135,7 +136,7 @@ void prepareArena()
{
case NET_GAME_TYPE_NONE :
setWorldArena( getChoiceArenaId() );
- addNewItem(arena->listItem);
+ addNewItem(arena->listItem, NULL);
playMusic(arena->music, MUSIC_GROUP_USER);
getSettingCountRound(&max_count);
@@ -152,7 +153,7 @@ void prepareArena()
case NET_GAME_TYPE_SERVER :
setWorldArena( getChoiceArenaId() );
- addNewItem(arena->listItem);
+ addNewItem(arena->listItem, NULL);
playMusic(arena->music, MUSIC_GROUP_USER);
getSettingCountRound(&max_count);
@@ -409,8 +410,33 @@ static void setAnalyze()
endAnalyze();
}
+static void setTable()
+{
+ tux_t *tuxRight;
+ tux_t *tuxLeft;
+
+ if( getSettingGameType() != NET_GAME_TYPE_NONE )
+ {
+ return;
+ }
+
+ tuxRight = getControlTux(TUX_CONTROL_KEYBOARD_RIGHT);
+ tuxLeft = getControlTux(TUX_CONTROL_KEYBOARD_LEFT);
+
+ if( tuxRight->score > tuxLeft->score )
+ {
+ addPlayerInHighScore(tuxRight->name, tuxRight->score);
+ }
+
+ if( tuxLeft->score > tuxRight->score )
+ {
+ addPlayerInHighScore(tuxLeft->name, tuxLeft->score);
+ }
+}
+
void stoptWorld()
{
+ setTable();
setAnalyze();
delAllImageInGroup(IMAGE_GROUP_USER);
quitNetMultiplayer();