/* * * Singe 2 * Copyright (C) 2006-2024 Scott Duensing * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * */ #ifndef SINGE_H #define SINGE_H #include #include "common.h" #include "generated/version.h" #define SINDEN_ARG_MAX 8 // Number of --sindengun arguments selects the border style. typedef enum ToolModeE { TOOL_NONE = 0, TOOL_PACK, TOOL_PATCH, TOOL_UNPACK } ToolModeE; typedef enum SindenModeE { SINDEN_WHITE = 1, SINDEN_WHITE_BLACK = 2, SINDEN_CUSTOM_WHITE = 4, SINDEN_CUSTOM_WHITE_BLACK = 5, SINDEN_CUSTOM_WHITE_CUSTOM_BLACK = 8 } SindenModeE; typedef struct ConfigS { char *videoFile; char *scriptFile; char *container; // Game database holding the script, NULL for a loose game char *toolSource; // Argument of --pack, --unpack, or --patch ToolModeE toolMode; bool dataDirGiven; // -d was on the command line char *dataDir; char *dataDirBase; bool resolutionWasCalculated; bool isFrameFile; bool stretchVideo; bool noMouse; bool noCrosshair; bool noSound; bool fullScreen; bool fullScreenWindow; bool showCalculated; bool noConsole; bool noLogos; bool programTracing; bool scriptTracing; bool legacySpriteArgs; bool disc; // Play a laserdisc video; otherwise the canvas is the world bool softwareVideo; // Skip the platform's hardware decoder int32_t bestRatioIndex; int32_t volumeVldp; int32_t volumeNonVldp; int32_t scaleFactor; int32_t xResolution; int32_t yResolution; int32_t canvasWidth; // World size when there is no disc int32_t canvasHeight; int32_t sindenArgc; int32_t sindenArgv[SINDEN_ARG_MAX]; int32_t audioOutputTrack; int32_t audioDelayMs; // Positive when the audio device is heard later than it reports } ConfigT; ConfigT *confFromDatabase(const ConfigT *conf); void singe(SDL_Window *window, SDL_Renderer *renderer, ConfigT *conf); #endif // SINGE_H