diff --git a/gui/inventoryGUI.js b/gui/inventoryGUI.js index 9bd1335..f5fb6fa 100644 --- a/gui/inventoryGUI.js +++ b/gui/inventoryGUI.js @@ -18,7 +18,7 @@ function drawInventoryGUI() { guiControl.inventory.cursorPosition++; } if (ct_up().down) { - snd_cursorup.Play(); + snd_cursordown.Play(); guiControl.inventory.cursorPosition--; } @@ -58,29 +58,32 @@ function drawInventoryGUI() { if (ct_confirm().down) { switch (guiControl.inventory.cursorPosition) { case 0: + snd_select.Play(); guiControl.inventory.screen = "money"; break; case 1: + snd_select.Play(); guiControl.inventory.screen = "cargo"; break; case 2: + snd_select.Play(); guiControl.inventory.screen = "status"; break; default: + snd_cursorup.Play(); guiControl.inventory.show = false; break; } - snd_select.Play(); guiControl.inventory.cursorPosition = 0; guiControl.inventory.activateDelay = 5; } if (ct_cancel().down) { - snd_select.Play(); + snd_cursorup.Play(); guiControl.inventory.show = false; } if (ct_left().down) { - snd_cursorup.Play(); + snd_cursordown.Play(); guiControl.inventory.show = false; guiControl.map.activateDelay = 5; guiControl.map.show = true; @@ -119,7 +122,7 @@ function drawInventoryGUI() { // Button Action if (guiControl.inventory.activateDelay <= 0) { if (ct_confirm().down || ct_cancel().down) { - snd_select.Play(); + snd_cursorup.Play(); guiControl.inventory.screen = "main"; guiControl.inventory.activateDelay = 5; guiControl.inventory.cursorPosition = 0; @@ -154,7 +157,7 @@ function drawInventoryGUI() { // Button Action if (guiControl.inventory.activateDelay <= 0) { if (ct_confirm().down || ct_cancel().down) { - snd_select.Play(); + snd_cursorup.Play(); guiControl.inventory.screen = "main"; guiControl.inventory.activateDelay = 5; guiControl.inventory.cursorPosition = 1; @@ -201,7 +204,7 @@ function drawInventoryGUI() { // Button Action if (guiControl.inventory.activateDelay <= 0) { if (ct_confirm().down || ct_cancel().down) { - snd_select.Play(); + snd_cursorup.Play(); guiControl.inventory.screen = "main"; guiControl.inventory.activateDelay = 5; guiControl.inventory.cursorPosition = 2; // The position where "Supplies" is on main screen. diff --git a/gui/mapGUI.js b/gui/mapGUI.js index 35346d0..4defa5e 100644 --- a/gui/mapGUI.js +++ b/gui/mapGUI.js @@ -39,12 +39,12 @@ function drawMapGUI() { // Button Action if (guiControl.map.activateDelay <= 0) { - if (ct_cancel().down) { - snd_select.Play(); + if (ct_confirm().down || ct_cancel().down) { + snd_cursorup.Play(); guiControl.map.show = false; } if (ct_left().down) { - snd_cursorup.Play(); + snd_cursordown.Play(); guiControl.map.show = false; guiControl.inventory.activateDelay = 5; guiControl.inventory.show = true; diff --git a/gui/titleScreen.js b/gui/titleScreen.js index daae6e4..0ec7ad8 100644 --- a/gui/titleScreen.js +++ b/gui/titleScreen.js @@ -22,7 +22,7 @@ function drawTitleScreen() { guiControl.title.cursorPosition++; } if (ct_up().down) { - snd_cursorup.Play(); + snd_cursordown.Play(); guiControl.title.cursorPosition--; } diff --git a/gui/tradeGUI.js b/gui/tradeGUI.js index 9a57963..641a50c 100644 --- a/gui/tradeGUI.js +++ b/gui/tradeGUI.js @@ -33,7 +33,7 @@ function drawTradeGUI() { guiControl.trade.cursorPosition++; } if (ct_up().down) { - snd_cursorup.Play(); + snd_cursordown.Play(); guiControl.trade.cursorPosition--; } if (ct_right().down) { @@ -41,7 +41,7 @@ function drawTradeGUI() { guiControl.trade.page++; } if (ct_left().down) { - snd_cursorup.Play(); + snd_cursordown.Play(); guiControl.trade.page--; } @@ -109,7 +109,7 @@ function drawTradeGUI() { guiControl.trade.activateDelay = 5; break; default: - snd_select.Play(); + snd_cursorup.Play(); mus_trade.Stop(); mus_sail.Play(); guiControl.trade.show = false; @@ -122,7 +122,7 @@ function drawTradeGUI() { // console.log(guiControl.trade.screen); } if (ct_cancel().down) { - snd_select.Play(); + snd_cursorup.Play(); mus_trade.Stop(); mus_sail.Play(); guiControl.trade.show = false; @@ -216,7 +216,7 @@ function drawTradeGUI() { } break; default: - snd_select.Play(); + snd_cursorup.Play(); guiControl.trade.screen = "main"; guiControl.trade.activateDelay = 5; guiControl.trade.cursorPosition = 0; // The position where "Buy" is on main screen. @@ -225,7 +225,7 @@ function drawTradeGUI() { // console.log(guiControl.trade.screen); } if (ct_cancel().down) { - snd_select.Play(); + snd_cursorup.Play(); guiControl.trade.screen = "main"; guiControl.trade.activateDelay = 5; guiControl.trade.cursorPosition = 0; // The position where "Buy" is on main screen. @@ -322,7 +322,7 @@ function drawTradeGUI() { } break; default: - snd_select.Play(); + snd_cursorup.Play(); guiControl.trade.screen = "main"; guiControl.trade.activateDelay = 5; guiControl.trade.cursorPosition = 1; // The position where "Sell" is on main screen. @@ -331,7 +331,7 @@ function drawTradeGUI() { // console.log(guiControl.trade.screen); } if (ct_cancel().down) { - snd_select.Play(); + snd_cursorup.Play(); guiControl.trade.screen = "main"; guiControl.trade.activateDelay = 5; guiControl.trade.cursorPosition = 1; // The position where "Sell" is on main screen. @@ -390,7 +390,7 @@ function drawTradeGUI() { } break; default: - snd_select.Play(); + snd_cursorup.Play(); guiControl.trade.screen = "main"; guiControl.trade.activateDelay = 5; guiControl.trade.cursorPosition = 2; // The position where "Supplies" is on main screen. @@ -402,7 +402,7 @@ function drawTradeGUI() { } if (ct_cancel().down) { - snd_select.Play(); + snd_cursorup.Play(); guiControl.trade.screen = "main"; guiControl.trade.activateDelay = 5; guiControl.trade.cursorPosition = 2; // The position where "Supplies" is on main screen. @@ -433,7 +433,7 @@ function drawTradeGUI() { // Button Action if (guiControl.trade.activateDelay <= 0) { if (ct_confirm().down || ct_cancel().down) { - snd_select.Play(); + snd_cursorup.Play(); guiControl.trade.screen = "tavern"; guiControl.trade.activateDelay = 5; guiControl.trade.cursorPosition = 0; diff --git a/rooms/oceanRoom.js b/rooms/oceanRoom.js index 216b95e..c37f154 100644 --- a/rooms/oceanRoom.js +++ b/rooms/oceanRoom.js @@ -178,7 +178,7 @@ rm_Ocean.GenerateMap = function () { } for (var i = 0; i < this.numberOfIslands; i++) { - G.map.push({ + G.map[i] = { island: rm_Ocean.AddObject(OS.P["Island"], { x: this.squareSize * xSquares[i], y: this.squareSize * ySquares[i] @@ -187,6 +187,6 @@ rm_Ocean.GenerateMap = function () { drawY: ySquares[i], drawWidth: 1, drawHeight: 1 - }); + }; } }