[four-in-a-row: 71/72] moved main.vala content to four-in-a-row.vala
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [four-in-a-row: 71/72] moved main.vala content to four-in-a-row.vala
- Date: Sun, 16 Dec 2018 21:02:44 +0000 (UTC)
commit 198d7fbad139828ed7339d9c6b3fcc1cabdc9ae9
Author: Jacob Humphrey <jacob ryan humphrey gmail com>
Date: Sat Dec 15 22:15:24 2018 -0600
moved main.vala content to four-in-a-row.vala
po/POTFILES.in | 1 -
src/Makefile.am | 1 -
src/four-in-a-row.vala | 75 +++++++++++++++++++++++++++++++++++++++
src/main.vala | 96 --------------------------------------------------
4 files changed, 75 insertions(+), 98 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0abe84d..b40eae4 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,7 +6,6 @@ data/four-in-a-row.ui
data/org.gnome.four-in-a-row.gschema.xml
src/four-in-a-row.vala
src/games-controls-list.vala
-src/main.vala
src/prefs.vala
src/prefs-box.vala
src/scorebox.vala
diff --git a/src/Makefile.am b/src/Makefile.am
index fff6af6..c90a394 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,7 +8,6 @@ four_in_a_row_SOURCES = ai.vala \
game-board-view.vala \
game-board.vala \
games-controls-list.vala \
- main.vala \
prefs-box.vala \
prefs.vala \
scorebox.vala \
diff --git a/src/four-in-a-row.vala b/src/four-in-a-row.vala
index 1b7bb87..debe9ed 100644
--- a/src/four-in-a-row.vala
+++ b/src/four-in-a-row.vala
@@ -19,6 +19,13 @@
* along with GNOME Four-in-a-row. If not, see <http://www.gnu.org/licenses/>.
*/
+const int SIZE_VSTR = 53;
+const int SPEED_BLINK = 150;
+const int SPEED_MOVE = 35;
+const int SPEED_DROP = 20;
+const char vlevel[] = {'0','a','b','c','\0'};
+const int DEFAULT_WIDTH = 495;
+const int DEFAULT_HEIGHT = 435;
const string APPNAME_LONG = "Four-in-a-row";
class FourInARow : Gtk.Application {
@@ -787,3 +794,71 @@ class FourInARow : Gtk.Application {
prefsbox.show_all();
}
}
+
+public enum AnimID {
+ NONE,
+ MOVE,
+ DROP,
+ BLINK,
+ HINT
+}
+
+public enum PlayerID {
+ PLAYER1 = 0,
+ PLAYER2,
+ NOBODY
+}
+
+public enum Level {
+ HUMAN,
+ WEAK,
+ MEDIUM,
+ STRONG
+}
+
+public enum Tile {
+ PLAYER1 = 0,
+ PLAYER2,
+ CLEAR,
+ CLEAR_CURSOR,
+ PLAYER1_CURSOR,
+ PLAYER2_CURSOR,
+}
+
+public enum SoundID {
+ DROP,
+ I_WIN,
+ YOU_WIN,
+ PLAYER_WIN,
+ DRAWN_GAME,
+ COLUMN_FULL
+}
+
+public int main(string[] argv) {
+ Intl.setlocale();
+
+ var application = new FourInARow();
+
+ Intl.bindtextdomain(Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
+ Intl.bind_textdomain_codeset(Config.GETTEXT_PACKAGE, "UTF-8");
+ Intl.textdomain(Config.GETTEXT_PACKAGE);
+
+ var context = new OptionContext();
+ context.add_group(Gtk.get_option_group(true));
+ try {
+ context.parse(ref argv);
+ } catch (Error error) {
+ print("%s", error.message);
+ return 1;
+ }
+
+ Environment.set_application_name(_(APPNAME_LONG));
+
+ application.game_init();
+
+ var app_retval = application.run(argv);
+
+ return app_retval;
+}
+
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]