summaryrefslogtreecommitdiff
path: root/core/src/kz/ilotterytea/maxon/MaxonConstants.java
blob: dca8771d7fd05ac2ba44e0e9ed795b097ec2a9a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package kz.ilotterytea.maxon;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Texture;
import kz.ilotterytea.maxon.utils.OsUtils;

import java.text.DecimalFormat;
import java.text.SimpleDateFormat;

public class MaxonConstants {
    public static final String GAME_NAME = "Maxon Petting Simulator";
    public static final String GAME_APP_ID = "maxon";
    public static final String GAME_APP_PACKAGE = "kz.ilotterytea." + GAME_APP_ID;
    public static final String GAME_APP_URL;
    public static final String GAME_VERSION = "Alpha 1.2";
    public static final String GAME_MAIN_DEVELOPER = "ilotterytea";

    public static final String[][] GAME_DEVELOPERS = {
            {"ilotterytea", "https://ilotterytea.kz"},
            {"greddyss", "https://twitch.tv/greddyss"},
            {"enotegg", "https://twitch.tv/enotegg"},
            {"namesake", "https://twitter.com/nameisnamesake"},
            {"saopin", "https://twitch.tv/saopin_"},
            {"gvardovskiy", "https://twitch.tv/gvardovskiy"}
    };

    public static final String GAME_MAIN_FOLDER = OsUtils.getUserDataDirectory(GAME_MAIN_DEVELOPER + "/" + GAME_APP_ID);
    public static final String GAME_SCREENSHOT_FOLDER = GAME_MAIN_FOLDER + "/screenshots";
    public static final String GAME_SAVEGAME_FOLDER = GAME_MAIN_FOLDER + "/savegames";

    public static final FileHandle FILE_EN_US = Gdx.files.internal("i18n/en_us.json");
    public static final FileHandle FILE_RU_RU = Gdx.files.internal("i18n/ru_ru.json");

    public static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("###,###.#");
    public static final DecimalFormat DECIMAL_FORMAT2 = new DecimalFormat("###,###");
    @SuppressWarnings("SimpleDateFormat")
    public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/M/yyyy hh:mm:ss");
    public static final long startTime = System.currentTimeMillis();

    public static final String GAME_VERSIONS_FILE_URL = "https://assets.ilotterytea.kz/maxon/versions.json";

    public static final long DISCORD_APPLICATION_ID = 1051092609659052062L;

    public static final Texture MISSING_TEXTURE;

    static {
        Pixmap pixmap = new Pixmap(4, 4, Pixmap.Format.RGBA8888);

        int checkers = 2;
        int tileSize = pixmap.getWidth() / checkers;

        for (int y = 0; y < checkers; y++) {
            for (int x = 0; x < checkers; x++) {
                if ((x + y) % 2 == 0){
                    pixmap.setColor(Color.MAGENTA);
                } else {
                    pixmap.setColor(Color.BLACK);
                }

                pixmap.fillRectangle(x * tileSize, y * tileSize, tileSize, tileSize);
            }
        }

        MISSING_TEXTURE = new Texture(pixmap);
        pixmap.dispose();

        if (OsUtils.isAndroid) {
            GAME_APP_URL = "https://play.google.com/store/apps/details?id=kz.ilotterytea.maxon";
        } else {
            GAME_APP_URL = "https://ilotterytea.itch.io/maxon";
        }
    }
}