diff --git a/images/MMBN 6/Green Area 1.PNG b/images/MMBN 6/Green Area 1.PNG
index 2bf65c0..d6e78cf 100644
Binary files a/images/MMBN 6/Green Area 1.PNG and b/images/MMBN 6/Green Area 1.PNG differ
diff --git a/images/MMBN 6/JdgTree Area 1.PNG b/images/MMBN 6/Judge Tree Area 1.PNG
similarity index 100%
rename from images/MMBN 6/JdgTree Area 1.PNG
rename to images/MMBN 6/Judge Tree Area 1.PNG
diff --git a/images/MMBN 6/JdgTree Area 2.PNG b/images/MMBN 6/Judge Tree Area 2.PNG
similarity index 100%
rename from images/MMBN 6/JdgTree Area 2.PNG
rename to images/MMBN 6/Judge Tree Area 2.PNG
diff --git a/images/MMBN 6/JdgTree Area 3.PNG b/images/MMBN 6/Judge Tree Area 3.PNG
similarity index 100%
rename from images/MMBN 6/JdgTree Area 3.PNG
rename to images/MMBN 6/Judge Tree Area 3.PNG
diff --git a/images/MMBN 6/Undernet Zero Area.PNG b/images/MMBN 6/Undernet Zero.PNG
similarity index 100%
rename from images/MMBN 6/Undernet Zero Area.PNG
rename to images/MMBN 6/Undernet Zero.PNG
diff --git a/mmbn5m.lpi b/mmbn5m.lpi
index 27c0dba..8ae2d7b 100644
--- a/mmbn5m.lpi
+++ b/mmbn5m.lpi
@@ -14,11 +14,16 @@
+
+
+
+
-
+
+
diff --git a/mmbn5m.lps b/mmbn5m.lps
index cbb4b0e..47aa1ee 100644
--- a/mmbn5m.lps
+++ b/mmbn5m.lps
@@ -9,7 +9,7 @@
-
+
@@ -47,8 +47,8 @@
-
-
+
+
@@ -58,10 +58,9 @@
-
-
-
-
+
+
+
@@ -70,21 +69,22 @@
-
+
-
+
-
-
-
-
+
+
+
+
+
@@ -92,128 +92,148 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
-
+
-
-
+
+
+
-
+
diff --git a/mmbn5m.res b/mmbn5m.res
index 43c5796..29a13f5 100644
Binary files a/mmbn5m.res and b/mmbn5m.res differ
diff --git a/po/mmbn56mm.en.po b/po/mmbn56mm.en.po
new file mode 100644
index 0000000..b6ed18b
--- /dev/null
+++ b/po/mmbn56mm.en.po
@@ -0,0 +1,111 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8"
+
+#: tform1.caption
+msgid "MMBN5-6M"
+msgstr "MMBN5-6M"
+
+#: tform1.edit_room_button.caption
+msgid "Edit Room"
+msgstr "Edit Room"
+
+#: tform1.gamebox.text
+msgid "MMBN 5"
+msgstr "MMBN 5"
+
+#: tform1.label1.caption
+msgid "Game:"
+msgstr "Game:"
+
+#: tform1.langbox.text
+msgid "en"
+msgstr ""
+
+#: tform1.map_stretch_checkbox.caption
+msgid "Stretch"
+msgstr "Stretch"
+
+#: tform1.minus_spoil1.caption
+msgid "-"
+msgstr "-"
+
+#: tform1.plus_spoil.caption
+msgid "+"
+msgstr "+"
+
+#: tform1.room_name_label.caption
+msgctxt "tform1.room_name_label.caption"
+msgid "Run the game, then press \"Start\""
+msgstr "Run the game, then press \"Start\""
+
+#: tform1.spoils_label.caption
+msgid "Spoils:"
+msgstr "Spoils:"
+
+#: tform1.start_stop_button.caption
+msgctxt "tform1.start_stop_button.caption"
+msgid "Start"
+msgstr "Start"
+
+#: unit1.adding_item
+msgid "Adding item to Room #"
+msgstr "Adding item to Room #"
+
+#: unit1.app_caption
+msgid "MMBN5-6M: Reading from process ID"
+msgstr "MMBN5-6M: Reading from process ID"
+
+#: unit1.editing_item
+msgid "Editing item in Room #"
+msgstr "Editing item in Room #"
+
+#: unit1.editing_room
+msgid "Editing Room #"
+msgstr "Editing Room #"
+
+#: unit1.enter_item_name
+msgid "Enter item's name"
+msgstr "Enter item's name"
+
+#: unit1.enter_room_name
+msgid "Enter this Room's name"
+msgstr "Enter this Room's name"
+
+#: unit1.error_game_memory_not_read
+msgid "Error. Game's memory not read."
+msgstr "Error. Game's memory not read."
+
+#: unit1.error_game_not_running
+msgid "Error. Make sure the game's running."
+msgstr "Error. Make sure the game's running."
+
+#: unit1.error_hotkey_registration_failed
+msgid "HotKey registration failed. You won't be able to press Win+Y to temporarily view map in full screen."
+msgstr "HotKey registration failed. You won't be able to press Win+Y to temporarily view map in full screen."
+
+#: unit1.error_unable_to_read_game_memory
+msgid "Error. Can't read game's memory."
+msgstr "Error. Can't read game's memory."
+
+#: unit1.room_number
+msgid "Room #"
+msgstr "Room #"
+
+#: unit1.run_the_game_notice
+msgctxt "unit1.run_the_game_notice"
+msgid "Run the game, then press \"Start\""
+msgstr "Run the game, then press \"Start\""
+
+#: unit1.start_button_stop
+msgid "Stop"
+msgstr "Stop"
+
+#: unit1.start_button_strat
+msgctxt "unit1.start_button_strat"
+msgid "Start"
+msgstr "Start"
+
+#: unit1.unknown_room
+msgid "Unknown"
+msgstr "Unknown"
+
diff --git a/po/mmbn56mm.ru.po b/po/mmbn56mm.ru.po
new file mode 100644
index 0000000..1532215
--- /dev/null
+++ b/po/mmbn56mm.ru.po
@@ -0,0 +1,107 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8"
+
+#: tform1.caption
+msgid "MMBN5-6M"
+msgstr ""
+
+#: tform1.edit_room_button.caption
+msgid "Edit Room"
+msgstr "Дать Комнате Имя"
+
+#: tform1.gamebox.text
+msgid "MMBN 5"
+msgstr ""
+
+#: tform1.label1.caption
+msgid "Game:"
+msgstr "Игра:"
+
+#: tform1.map_stretch_checkbox.caption
+msgid "Stretch"
+msgstr "Растянуть карту"
+
+#: tform1.minus_spoil1.caption
+msgid "-"
+msgstr "Удалить"
+
+#: tform1.plus_spoil.caption
+msgid "+"
+msgstr "Добавить"
+
+#: tform1.room_name_label.caption
+msgctxt "tform1.room_name_label.caption"
+msgid "Run the game, then press \"Start\""
+msgstr "Запусти игру, нажми \"Запуск\""
+
+#: tform1.spoils_label.caption
+msgid "Spoils:"
+msgstr "Находки:"
+
+#: tform1.start_stop_button.caption
+msgctxt "tform1.start_stop_button.caption"
+msgid "Start"
+msgstr "Запуск"
+
+#: unit1.adding_item
+msgid "Adding item to Room #"
+msgstr "Новая находка в Комнате №"
+
+#: unit1.app_caption
+msgid "MMBN5-6M: Reading from process ID"
+msgstr "MMBN5-6M: Чтение процесса с идентификатором"
+
+#: unit1.editing_item
+msgid "Editing item in Room #"
+msgstr "Редактирование находки в Комнате №"
+
+#: unit1.editing_room
+msgid "Editing Room #"
+msgstr "Переименование Комнаты №"
+
+#: unit1.enter_item_name
+msgid "Enter item's name"
+msgstr "Введи название находки"
+
+#: unit1.enter_room_name
+msgid "Enter this Room's name"
+msgstr "Введи название Комнаты"
+
+#: unit1.error_game_memory_not_read
+msgid "Error. Game's memory not read."
+msgstr "Ошибка. Память приложения не прочитана."
+
+#: unit1.error_game_not_running
+msgid "Error. Make sure the game's running."
+msgstr "Ошибка. Игра точно запущена?"
+
+#: unit1.error_hotkey_registration_failed
+msgid "HotKey registration failed. You won't be able to press Win+Y to temporarily view map in full screen."
+msgstr "Регистрация горячих клавиш не удалась. Нажимать Win+Y для переключения в полноэкранный режим не выйдет."
+
+#: unit1.error_unable_to_read_game_memory
+msgid "Error. Can't read game's memory."
+msgstr "Ошибка. Чтение памяти приложения невозможно."
+
+#: unit1.room_number
+msgid "Room #"
+msgstr "Комната №"
+
+#: unit1.run_the_game_notice
+msgctxt "unit1.run_the_game_notice"
+msgid "Run the game, then press \"Start\""
+msgstr "Запусти игру, нажми \"Запуск\""
+
+#: unit1.start_button_stop
+msgid "Stop"
+msgstr "Остановка"
+
+#: unit1.start_button_strat
+msgctxt "unit1.start_button_strat"
+msgid "Start"
+msgstr "Запуск"
+
+#: unit1.unknown_room
+msgid "Unknown"
+msgstr "Неизвестно где..."
+
diff --git a/rooms.ini b/rooms.ini
index a1e5948..2944f00 100644
--- a/rooms.ini
+++ b/rooms.ini
@@ -237,6 +237,23 @@ MMBN 6=2147425942
2533274790526976=Research Lab 1
281474985885696=Lab's Comp 1
1125899906908160=AsterLand
+1688849869504512=Popcorn Shop Comp
+1125899907039232=Control Room (Aquarium)
+2533274799570944=Security Camera Comp (Class 6-1)
+262144=Green Town
+1125899916083200=Symbol Comp (Green Town)
+1407374892466176=Green Home Page (TRUTH Tablet)
+9568256=Green Area 1
+2814749776281600=Book Comp
+281474976972800=Court Foyer
+281474986278912=Green Area 2
+281474986475520=Undernet Zero
+562949953683456=Courtroom (Green Town)
+844424930394112=The Punishment Room
+562949962661888=Punishment Chair Comp
+8519680=Judge Tree Area 1
+281474985230336=Judge Tree Area 2
+562949961940992=Judge Tree Area 3
[Spoils MMBN 6]
562949962596352=700z,Thunder *
@@ -246,11 +263,11 @@ MMBN 6=2147425942
844424939307008={PMD},Reg UP2
1125899916017664=Full Energy
8388608=Water Data,Spreader1 M,HP Memory
-281474985099264=Reg UP2,Rocovery 30 *
+281474985099264=Reg UP2,Rocovery 30 *,ImgData [story]
562949962858496=Hi Cannon L,Elec Sword {PMD}
1688849869438976=Unlocker
3659174706479104=Dubl Shot *,1000z
-281474986213376=Panel Return *,Vulcan 2D
+281474986213376=Panel Return *,Vulcan 2D,Attack +1 [Tengu]
844424939044864=Tornado L {PMD},Geddon A [Pnl Return],HP Memory
562949962924032=Wide Blade B {PMD},Reg Up 2,HP Memory {S},Bamboo Sword W {S},Recov 80 K {S},Barr 100 H {S},Time Bomb 1 {S}
844424939372544=Barr 100 H
@@ -261,5 +278,21 @@ MMBN 6=2147425942
562949961875456=HP + 50,Hi Cannon M
281474985885696=FireHit1 F,Fan *
9502720=Sub Memory [Aqua],HP Memory Aquaman has no use for it ;p
-1125899906908160=
+1125899906908160=Full Energy [c]
1407374883684352=QuizBook
+1688849869504512=HP memory
+2533274799570944=HP Memory [story],Expo Folder [story],Jungle,3000z
+1125899916083200=Reg UP 2,2400z
+1407374892466176=BlkBomb F {PMD},HP Memory
+2814749776281600=Yoyo *,Sub Memory
+9568256=Lance W {PMD},Spreader2 C
+281474986278912=Speed +1,Auth Data
+281474986475520=Reg UP 2 [Tengu]
+281474976972800=87341489
+562949962661888=Guardion O {PMD},Full Energy
+8519680=ComingRd *,StepSword L
+281474985230336=YoYo N,HP Memory
+562949961940992=Reg UP 3,Expansion Memory
+
+[Settings]
+Language=ru
diff --git a/unit1.lfm b/unit1.lfm
index dce19a6..7cbbc3d 100644
--- a/unit1.lfm
+++ b/unit1.lfm
@@ -1,11 +1,12 @@
object Form1: TForm1
- Left = 1066
- Height = 448
- Top = 323
- Width = 606
+ Left = 1705
+ Height = 478
+ Top = 548
+ Width = 792
+ Anchors = [akTop]
Caption = 'MMBN5-6M'
- ClientHeight = 448
- ClientWidth = 606
+ ClientHeight = 478
+ ClientWidth = 792
Font.CharSet = ANSI_CHARSET
Font.Height = -16
Font.Name = 'Liberation Mono'
@@ -16,14 +17,13 @@ object Form1: TForm1
Position = poScreenCenter
LCLVersion = '2.2.6.0'
object room_name_label: TLabel
- AnchorSideLeft.Control = start_stop_button
+ AnchorSideLeft.Control = Splitter2
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Owner
- Left = 192
+ Left = 231
Height = 18
Top = 8
Width = 320
- BorderSpacing.Left = 8
BorderSpacing.Top = 8
Caption = 'Run the game, then press "Start"'
Color = clGradientInactiveCaption
@@ -31,18 +31,20 @@ object Form1: TForm1
Transparent = False
end
object map_image: TImage
- AnchorSideLeft.Control = room_name_label
+ AnchorSideLeft.Control = Splitter2
+ AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = room_name_label
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
- Left = 192
- Height = 406
+ Left = 232
+ Height = 436
Top = 34
- Width = 406
+ Width = 552
Anchors = [akTop, akLeft, akRight, akBottom]
+ BorderSpacing.Left = 1
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
@@ -51,153 +53,231 @@ object Form1: TForm1
Proportional = True
Stretch = True
end
- object start_stop_button: TSpeedButton
- AnchorSideLeft.Control = Owner
- AnchorSideTop.Control = gamebox
- AnchorSideTop.Side = asrBottom
- Left = 8
- Height = 30
- Top = 40
- Width = 176
- AllowAllUp = True
- BorderSpacing.Left = 8
- BorderSpacing.Top = 8
- Caption = 'Start'
- GroupIndex = 1
- Transparent = False
- OnClick = start_stop_buttonClick
- end
- object edit_room_button: TButton
- AnchorSideLeft.Control = Owner
- AnchorSideTop.Control = start_stop_button
- AnchorSideTop.Side = asrBottom
- AnchorSideRight.Control = map_image
- Left = 8
- Height = 30
- Top = 78
- Width = 176
- Anchors = [akTop, akLeft, akRight]
- BorderSpacing.Left = 8
- BorderSpacing.Top = 8
- BorderSpacing.Right = 8
- Caption = 'Edit Room'
- OnClick = edit_room_buttonClick
- TabOrder = 0
+ object Splitter1: TSplitter
+ Left = 787
+ Height = 478
+ Top = 0
+ Width = 5
+ Align = alRight
+ ResizeAnchor = akRight
end
- object spoils_listbox: TListBox
- AnchorSideLeft.Control = Owner
- AnchorSideTop.Control = spoils_label
- AnchorSideTop.Side = asrBottom
- AnchorSideRight.Control = map_image
- AnchorSideBottom.Control = plus_spoil
- Left = 8
- Height = 250
- Top = 142
- Width = 176
- Anchors = [akTop, akLeft, akRight]
- BorderSpacing.Left = 8
- BorderSpacing.Top = 8
- BorderSpacing.Right = 8
- BorderSpacing.Bottom = 8
- BorderStyle = bsNone
- Color = clGradientInactiveCaption
- ItemHeight = 0
- OnDblClick = spoils_listboxDblClick
+ object Panel1: TPanel
+ Left = 0
+ Height = 478
+ Top = 0
+ Width = 227
+ Align = alLeft
+ BevelOuter = bvNone
+ ClientHeight = 478
+ ClientWidth = 227
TabOrder = 1
+ object plus_spoil: TButton
+ AnchorSideLeft.Control = Panel1
+ AnchorSideBottom.Control = Panel1
+ AnchorSideBottom.Side = asrBottom
+ Left = 8
+ Height = 40
+ Top = 430
+ Width = 104
+ Anchors = [akLeft, akBottom]
+ BorderSpacing.Left = 8
+ BorderSpacing.Bottom = 8
+ Caption = '+'
+ OnClick = plus_spoilClick
+ TabOrder = 0
+ end
+ object minus_spoil1: TButton
+ AnchorSideLeft.Control = plus_spoil
+ AnchorSideLeft.Side = asrBottom
+ AnchorSideTop.Control = plus_spoil
+ AnchorSideRight.Control = Panel1
+ AnchorSideRight.Side = asrBottom
+ AnchorSideBottom.Control = Panel1
+ AnchorSideBottom.Side = asrBottom
+ Left = 120
+ Height = 40
+ Top = 430
+ Width = 103
+ Anchors = [akTop, akLeft, akRight, akBottom]
+ BorderSpacing.Left = 8
+ BorderSpacing.Right = 4
+ BorderSpacing.Bottom = 8
+ Caption = '-'
+ OnClick = minus_spoil1Click
+ TabOrder = 1
+ end
+ object map_stretch_checkbox: TCheckBox
+ AnchorSideLeft.Control = Panel1
+ AnchorSideTop.Control = spoils_listbox
+ AnchorSideTop.Side = asrBottom
+ AnchorSideRight.Control = Panel1
+ AnchorSideRight.Side = asrBottom
+ AnchorSideBottom.Control = plus_spoil
+ Left = 8
+ Height = 22
+ Top = 400
+ Width = 215
+ Anchors = [akLeft, akRight, akBottom]
+ BorderSpacing.Left = 8
+ BorderSpacing.Top = 8
+ BorderSpacing.Right = 4
+ BorderSpacing.Bottom = 8
+ Caption = 'Stretch'
+ OnChange = map_stretch_checkboxChange
+ TabOrder = 2
+ end
+ object spoils_listbox: TListBox
+ AnchorSideLeft.Control = Panel1
+ AnchorSideTop.Control = spoils_label
+ AnchorSideTop.Side = asrBottom
+ AnchorSideRight.Control = Panel1
+ AnchorSideRight.Side = asrBottom
+ AnchorSideBottom.Control = plus_spoil
+ Left = 8
+ Height = 250
+ Top = 142
+ Width = 215
+ Anchors = [akTop, akLeft, akRight]
+ BorderSpacing.Left = 8
+ BorderSpacing.Top = 8
+ BorderSpacing.Right = 4
+ BorderSpacing.Bottom = 8
+ BorderStyle = bsNone
+ Color = clGradientInactiveCaption
+ ItemHeight = 0
+ OnDblClick = spoils_listboxDblClick
+ TabOrder = 3
+ end
+ object spoils_label: TLabel
+ AnchorSideLeft.Control = Panel1
+ AnchorSideTop.Control = edit_room_button
+ AnchorSideTop.Side = asrBottom
+ AnchorSideRight.Control = Panel1
+ AnchorSideRight.Side = asrBottom
+ Left = 8
+ Height = 18
+ Top = 116
+ Width = 215
+ Anchors = [akTop, akLeft, akRight]
+ BorderSpacing.Left = 8
+ BorderSpacing.Top = 8
+ BorderSpacing.Right = 4
+ Caption = 'Spoils:'
+ ParentColor = False
+ end
+ object edit_room_button: TButton
+ AnchorSideLeft.Control = Panel1
+ AnchorSideTop.Control = start_stop_button
+ AnchorSideTop.Side = asrBottom
+ AnchorSideRight.Control = Panel1
+ AnchorSideRight.Side = asrBottom
+ Left = 8
+ Height = 30
+ Top = 78
+ Width = 215
+ Anchors = [akTop, akLeft, akRight]
+ BorderSpacing.Left = 8
+ BorderSpacing.Top = 8
+ BorderSpacing.Right = 4
+ Caption = 'Edit Room'
+ OnClick = edit_room_buttonClick
+ TabOrder = 4
+ end
+ object start_stop_button: TSpeedButton
+ AnchorSideLeft.Control = Panel1
+ AnchorSideTop.Control = gamebox
+ AnchorSideTop.Side = asrBottom
+ AnchorSideRight.Control = Panel1
+ AnchorSideRight.Side = asrBottom
+ Left = 8
+ Height = 30
+ Top = 40
+ Width = 215
+ AllowAllUp = True
+ Anchors = [akTop, akLeft, akRight]
+ BorderSpacing.Left = 8
+ BorderSpacing.Top = 8
+ BorderSpacing.Right = 4
+ Caption = 'Start'
+ GroupIndex = 1
+ Transparent = False
+ OnClick = start_stop_buttonClick
+ end
+ object gamebox: TComboBox
+ AnchorSideLeft.Control = Label1
+ AnchorSideLeft.Side = asrBottom
+ AnchorSideTop.Control = Panel1
+ AnchorSideRight.Control = Panel1
+ AnchorSideRight.Side = asrBottom
+ AnchorSideBottom.Control = start_stop_button
+ Left = 66
+ Height = 24
+ Top = 8
+ Width = 157
+ Anchors = [akTop, akLeft, akRight]
+ BorderSpacing.Left = 8
+ BorderSpacing.Top = 8
+ BorderSpacing.Right = 4
+ BorderSpacing.Bottom = 8
+ ItemHeight = 18
+ ItemIndex = 0
+ Items.Strings = (
+ 'MMBN 5'
+ 'MMBN 6'
+ )
+ OnSelect = gameboxSelect
+ ReadOnly = True
+ Style = csOwnerDrawFixed
+ TabOrder = 5
+ Text = 'MMBN 5'
+ end
+ object Label1: TLabel
+ AnchorSideLeft.Control = Panel1
+ AnchorSideTop.Control = Panel1
+ AnchorSideBottom.Control = gamebox
+ AnchorSideBottom.Side = asrBottom
+ Left = 8
+ Height = 18
+ Top = 11
+ Width = 50
+ BorderSpacing.Left = 8
+ BorderSpacing.Top = 11
+ Caption = 'Game:'
+ ParentColor = False
+ end
end
- object spoils_label: TLabel
- AnchorSideLeft.Control = Owner
- AnchorSideTop.Control = edit_room_button
- AnchorSideTop.Side = asrBottom
- AnchorSideRight.Control = map_image
- Left = 8
- Height = 18
- Top = 116
- Width = 176
- Anchors = [akTop, akLeft, akRight]
- BorderSpacing.Left = 8
- BorderSpacing.Top = 8
- BorderSpacing.Right = 8
- Caption = 'Spoils:'
- ParentColor = False
+ object Splitter2: TSplitter
+ Left = 227
+ Height = 478
+ Top = 0
+ Width = 4
+ OnMoved = Splitter2Moved
+ ResizeStyle = rsLine
end
- object plus_spoil: TButton
+ object langbox: TComboBox
AnchorSideLeft.Control = Owner
- AnchorSideBottom.Control = Owner
- AnchorSideBottom.Side = asrBottom
- Left = 8
- Height = 40
- Top = 400
- Width = 56
- Anchors = [akLeft, akBottom]
- BorderSpacing.Left = 8
- BorderSpacing.Bottom = 8
- Caption = '+'
- OnClick = plus_spoilClick
- TabOrder = 2
- end
- object minus_spoil1: TButton
- AnchorSideLeft.Control = plus_spoil
AnchorSideLeft.Side = asrBottom
- AnchorSideRight.Control = map_image
- AnchorSideBottom.Control = Owner
- AnchorSideBottom.Side = asrBottom
- Left = 72
- Height = 40
- Top = 400
- Width = 112
- Anchors = [akLeft, akRight, akBottom]
- BorderSpacing.Left = 8
- BorderSpacing.Right = 8
- BorderSpacing.Bottom = 8
- Caption = '-'
- OnClick = minus_spoil1Click
- TabOrder = 3
- end
- object map_stretch_checkbox: TCheckBox
- AnchorSideLeft.Control = Owner
- AnchorSideTop.Control = spoils_listbox
- AnchorSideTop.Side = asrBottom
- AnchorSideRight.Control = map_image
- AnchorSideBottom.Control = plus_spoil
- Left = 8
- Height = 22
- Top = 370
- Width = 176
- Anchors = [akLeft, akRight, akBottom]
- BorderSpacing.Left = 8
- BorderSpacing.Top = 8
- BorderSpacing.Right = 8
- BorderSpacing.Bottom = 8
- Caption = 'Stretch'
- OnChange = map_stretch_checkboxChange
- TabOrder = 4
- end
- object gamebox: TComboBox
- AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
- AnchorSideRight.Control = start_stop_button
+ AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
- AnchorSideBottom.Control = start_stop_button
- Left = 8
- Height = 24
- Top = 8
- Width = 176
- Anchors = [akTop, akLeft, akRight]
- BorderSpacing.Left = 8
- BorderSpacing.Top = 8
- BorderSpacing.Bottom = 8
+ Left = 734
+ Height = 26
+ Top = 1
+ Width = 50
+ Anchors = [akTop, akRight]
+ BorderSpacing.Top = 1
+ BorderSpacing.Right = 8
ItemHeight = 18
ItemIndex = 0
Items.Strings = (
- 'MMBN 5'
- 'MMBN 6'
+ 'en'
+ 'ru'
)
- OnSelect = gameboxSelect
+ OnSelect = langboxSelect
ReadOnly = True
- Style = csOwnerDrawFixed
- TabOrder = 5
- Text = 'MMBN 5'
+ Style = csDropDownList
+ TabOrder = 3
+ Text = 'en'
end
object Timer1: TTimer
Enabled = False
diff --git a/unit1.lrj b/unit1.lrj
new file mode 100644
index 0000000..3ea6206
--- /dev/null
+++ b/unit1.lrj
@@ -0,0 +1,13 @@
+{"version":1,"strings":[
+{"hash":24216973,"name":"tform1.caption","sourcebytes":[77,77,66,78,53,45,54,77],"value":"MMBN5-6M"},
+{"hash":223940658,"name":"tform1.room_name_label.caption","sourcebytes":[82,117,110,32,116,104,101,32,103,97,109,101,44,32,116,104,101,110,32,112,114,101,115,115,32,34,83,116,97,114,116,34],"value":"Run the game, then press \"Start\""},
+{"hash":43,"name":"tform1.plus_spoil.caption","sourcebytes":[43],"value":"+"},
+{"hash":45,"name":"tform1.minus_spoil1.caption","sourcebytes":[45],"value":"-"},
+{"hash":179882696,"name":"tform1.map_stretch_checkbox.caption","sourcebytes":[83,116,114,101,116,99,104],"value":"Stretch"},
+{"hash":175506234,"name":"tform1.spoils_label.caption","sourcebytes":[83,112,111,105,108,115,58],"value":"Spoils:"},
+{"hash":6676461,"name":"tform1.edit_room_button.caption","sourcebytes":[69,100,105,116,32,82,111,111,109],"value":"Edit Room"},
+{"hash":5941396,"name":"tform1.start_stop_button.caption","sourcebytes":[83,116,97,114,116],"value":"Start"},
+{"hash":86077493,"name":"tform1.gamebox.text","sourcebytes":[77,77,66,78,32,53],"value":"MMBN 5"},
+{"hash":5079946,"name":"tform1.label1.caption","sourcebytes":[71,97,109,101,58],"value":"Game:"},
+{"hash":1726,"name":"tform1.langbox.text","sourcebytes":[101,110],"value":"en"}
+]}
diff --git a/unit1.pas b/unit1.pas
index f46daaf..95663b3 100644
--- a/unit1.pas
+++ b/unit1.pas
@@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
-Buttons, Grids, IniFiles, Windows;
+Buttons, Grids, IniFiles, Windows, DefaultTranslator, LCLTranslator, FileUtil;
type
TWMHotKey = packed record
@@ -22,25 +22,32 @@ interface
{ TForm1 }
TForm1 = class ( TForm )
+ langbox :TComboBox;
+ edit_room_button :TButton;
gamebox :TComboBox;
+ Label1 :TLabel;
map_stretch_checkbox :TCheckBox;
- plus_spoil :TButton;
- edit_room_button :TButton;
minus_spoil1 :TButton;
- spoils_label :TLabel;
- spoils_listbox :TListBox;
+ Panel1 :TPanel;
+ plus_spoil :TButton;
+ Splitter1 :TSplitter;
map_image :TImage;
room_name_label :TLabel;
+ Splitter2 :TSplitter;
+ spoils_label :TLabel;
+ spoils_listbox :TListBox;
start_stop_button :TSpeedButton;
Timer1 :TTimer;
procedure edit_room_buttonClick ( Sender :TObject );
procedure FormClose ( Sender :TObject; var CloseAction :TCloseAction );
procedure FormCreate ( Sender :TObject );
procedure gameboxSelect ( Sender :TObject );
+ procedure langboxSelect ( Sender :TObject );
procedure map_imagePaint ( Sender :TObject );
procedure map_stretch_checkboxChange ( Sender :TObject );
procedure minus_spoil1Click ( Sender :TObject );
procedure plus_spoilClick ( Sender :TObject );
+ procedure Splitter2Moved ( Sender :TObject );
procedure spoils_listboxDblClick ( Sender :TObject );
procedure start_stop_buttonClick ( Sender :TObject );
procedure Timer1Timer ( Sender :TObject );
@@ -53,6 +60,25 @@ TForm1 = class ( TForm )
end;
+
+resourcestring
+ADDING_ITEM = 'Adding item to Room #';
+ENTER_ITEM_NAME = 'Enter item''s name';
+EDITING_ITEM = 'Editing item in Room #';
+EDITING_ROOM = 'Editing Room #';
+ENTER_ROOM_NAME = 'Enter this Room''s name';
+START_BUTTON_STRAT = 'Start';
+START_BUTTON_STOP = 'Stop';
+APP_CAPTION = 'MMBN5-6M: Reading from process ID';
+ROOM_NUMBER = 'Room #';
+RUN_THE_GAME_NOTICE = 'Run the game, then press "Start"';
+ERROR_GAME_NOT_RUNNING = 'Error. Make sure the game''s running.';
+ERROR_GAME_MEMORY_NOT_READ = 'Error. Game''s memory not read.';
+ERROR_UNABLE_TO_READ_GAME_MEMORY = 'Error. Can''t read game''s memory.';
+ERROR_HOTKEY_REGISTRATION_FAILED = 'HotKey registration failed. You won''t be able to press Win+Y to temporarily view map in full screen.';
+UNKNOWN_ROOM = 'Unknown';
+
+
var
Form1 :TForm1;
@@ -76,8 +102,7 @@ function FindProcessID ( const ExeFileName :STRING ) :DWORD;
while INTEGER ( ContinueLoop ) <> 0 do
begin
- if ( ( UpperCase ( ExtractFileName ( FProcessEntry32.szExeFile ) ) = UpperCase ( ExeFileName ) )
- OR( UpperCase ( FProcessEntry32.szExeFile ) = UpperCase ( ExeFileName ) ) ) then begin
+ if ( ( UpperCase ( ExtractFileName ( FProcessEntry32.szExeFile ) ) = UpperCase ( ExeFileName ) ) OR( UpperCase ( FProcessEntry32.szExeFile ) = UpperCase ( ExeFileName ) ) ) then begin
Result := FProcessEntry32.th32ProcessID;
Break;
end;
@@ -118,8 +143,8 @@ procedure ListRunningProcesses ( ProcList :TStrings );
hProcess :THandle;
ROOMS :TIniFile; // contains room labels
process_list :TStrings;
-room :QWORD = -1; // contains current room 16-bit value
-last_room :QWORD = -1;
+room :QWORD = 18446744073709551615; // contains current room 16-bit value
+last_room :QWORD = 18446744073709551615;
room_name :STRING;
new_room :bool;
spoils_list :STRING;
@@ -138,12 +163,17 @@ procedure ListRunningProcesses ( ProcList :TStrings );
var
x, y, w, h :INTEGER;
state :TWindowState;
+languages :TStrings;
+current_language :STRING;
{$R *.lfm}
+
{ TForm1 }
procedure TForm1.FormCreate ( Sender :TObject );
+var
+ i :INTEGER;
begin
current_game_pointer := mmbn5_pointer;
// open ini file and create a list to hold processes
@@ -151,7 +181,18 @@ procedure TForm1.FormCreate ( Sender :TObject );
process_list := TStringList.Create ( );
spoils_listbox.Height := 0;
if NOT RegisterHotKey ( Handle, 111000, MOD_WIN, VK_Y ) then
- ShowMessage ( 'HotKey registration failed. You won''t be able to press Win+Y to temporarily view map in full screen.' );
+ ShowMessage ( ERROR_HOTKEY_REGISTRATION_FAILED );
+
+ // translations
+ languages := TStringList.Create ( );
+ current_language := ROOMS.ReadString ( 'Settings', 'Language', 'en' );
+ FindAllFiles ( languages, 'po', '*.po', False );
+ for i := 0 to languages.Count -1 do begin
+ languages[i] := languages [i].Replace ( 'po\mmbn56mm.', '' ).Replace ( '.po', '' );
+ end;
+ langbox.Items := languages;
+ langbox.ItemIndex := langbox.Items.IndexOf ( current_language );
+ SetDefaultLang ( current_language, 'po' );
end;
@@ -167,6 +208,14 @@ procedure TForm1.gameboxSelect ( Sender :TObject );
end;
+procedure TForm1.langboxSelect ( Sender :TObject );
+begin
+ current_language := langbox.Items [langbox.ItemIndex];
+ SetDefaultLang ( current_language, 'po' );
+ ROOMS.WriteString ( 'Settings', 'Language', current_language );
+end;
+
+
procedure TForm1.map_imagePaint ( Sender :TObject );
begin
//map_image.Canvas.Brush.Style := bsClear;
@@ -182,7 +231,7 @@ procedure TForm1.map_stretch_checkboxChange ( Sender :TObject );
procedure TForm1.minus_spoil1Click ( Sender :TObject );
var
- Txt :STRING;
+ Txt :STRING = '';
i :INTEGER;
begin
if ( spoils_listbox.ItemIndex > -1 ) then begin
@@ -205,11 +254,11 @@ procedure TForm1.minus_spoil1Click ( Sender :TObject );
procedure TForm1.plus_spoilClick ( Sender :TObject );
var
- new_spoil_name :STRING;
- Txt :STRING;
+ new_spoil_name :STRING = '';
+ Txt :STRING = '';
i :INTEGER;
begin
- if InputQuery ( 'Adding item to Room #' + IntToStr ( room ), 'Enter item''s name', new_spoil_name ) then begin
+ if InputQuery ( ADDING_ITEM + IntToStr ( room ), ENTER_ITEM_NAME, new_spoil_name ) then begin
spoils_listbox.Items.Add ( new_spoil_name );
for i := 0 to spoils_listbox.Items.Count - 1 do begin
if i < spoils_listbox.Items.Count - 1 then
@@ -227,16 +276,22 @@ procedure TForm1.plus_spoilClick ( Sender :TObject );
end;
+procedure TForm1.Splitter2Moved ( Sender :TObject );
+begin
+ plus_spoil.Width := Round ( Panel1.Width/2 ) -12;
+end;
+
+
procedure TForm1.spoils_listboxDblClick ( Sender :TObject );
var
new_spoil_name :STRING;
var
- Txt :STRING;
+ Txt :STRING = '';
i :INTEGER;
begin
if ( spoils_listbox.ItemIndex > -1 ) then begin
new_spoil_name := spoils_listbox.Items [spoils_listbox.ItemIndex];
- if InputQuery ( 'Editing item in Room #' + IntToStr ( room ), 'Enter item''s name', new_spoil_name ) then begin
+ if InputQuery ( EDITING_ITEM + IntToStr ( room ), ENTER_ITEM_NAME, new_spoil_name ) then begin
spoils_listbox.Items[spoils_listbox.ItemIndex] := new_spoil_name;
for i := 0 to spoils_listbox.Items.Count - 1 do begin
if i < spoils_listbox.Items.Count - 1 then
@@ -262,22 +317,22 @@ procedure TForm1.start_stop_buttonClick ( Sender :TObject );
begin
if start_stop_button.Down = False then begin
- start_stop_button.Caption := 'Start';
+ start_stop_button.Caption := START_BUTTON_STRAT;
Timer1.Enabled := False;
CloseHandle ( hProcess );
- room_name_label.Caption := 'Run the game, then press "Start"';
+ room_name_label.Caption := RUN_THE_GAME_NOTICE;
end else begin
- start_stop_button.Caption := 'Stop';
+ start_stop_button.Caption := START_BUTTON_STOP;
ListRunningProcesses ( process_list );
for i := 0 to process_list.Count - 1 do begin
if ( process_list [i] = 'MMBN_LC2.exe' ) then begin
ProcID := FindProcessID ( process_list [i] );
hProcess := OpenProcess ( PROCESS_VM_READ, False, ProcID );
- Caption := 'MMBN5-6M: Reading from process ID ' + IntToStr ( ProcID );
+ Caption := APP_CAPTION + ' ' + IntToStr ( ProcID );
Timer1.Enabled := True;
break;
end else begin
- room_name_label.Caption := 'Error. Run the game.';
+ room_name_label.Caption := ERROR_GAME_NOT_RUNNING;
end;
end;
end;
@@ -307,8 +362,8 @@ procedure TForm1.Timer1Timer ( Sender :TObject );
room_name_label.Caption := room_name;
end else begin
room := SMALLINT ( room ); // - 844424930459648;
- room_name := ROOMS.ReadString ( 'Rooms ' + current_game, IntToStr ( room ), 'Unknown' );
- room_name_label.Caption := 'Room #' + IntToStr ( room ) + ': ' + room_name;
+ room_name := ROOMS.ReadString ( 'Rooms ' + current_game, IntToStr ( room ), UNKNOWN_ROOM );
+ room_name_label.Caption := ROOM_NUMBER + IntToStr ( room ) + ': ' + room_name;
end;
spoils_list := ROOMS.ReadString ( 'Spoils ' + current_game, IntToStr ( room ), '' );
@@ -325,11 +380,11 @@ procedure TForm1.Timer1Timer ( Sender :TObject );
end;
end;
end else begin
- room_name_label.Caption := 'Error. Make sure the game is running.';
+ room_name_label.Caption := ERROR_GAME_MEMORY_NOT_READ;
end;
except
on edit_room_button :Exception do
- room_name_label.Caption := 'Error. Can''t read game''s memory.';
+ room_name_label.Caption := ERROR_UNABLE_TO_READ_GAME_MEMORY;
end;
end;
@@ -338,12 +393,12 @@ procedure TForm1.Timer1Timer ( Sender :TObject );
procedure TForm1.edit_room_buttonClick ( Sender :TObject );
var
- new_room_name :STRING;
+ new_room_name :STRING = '';
begin
new_room_name := room_name;
- if InputQuery ( 'Editing Room # ' + IntToStr ( room ), 'Enter this Room''s name', new_room_name ) then begin
+ if InputQuery ( EDITING_ROOM + ' ' + IntToStr ( room ), ENTER_ROOM_NAME, new_room_name ) then begin
ROOMS.WriteString ( 'Rooms ' + current_game, IntToStr ( room ), new_room_name );
- last_room := -1;
+ last_room := 18446744073709551615;
end;
end;
@@ -358,6 +413,7 @@ procedure TForm1.FormClose ( Sender :TObject; var CloseAction :TCloseAction );
// free additionally created objects
ROOMS.Free;
process_list.Free;
+ languages.Free;
UnregisterHotKey ( Handle, 111000 );
end;
@@ -397,4 +453,10 @@ procedure TForm1.WMHotKey ( var MSG :TWMHotKey );
end;
+
+initialization
+
+
+SetDefaultLang ( 'en', 'po' );
+
end.