Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
SpaceBeforeAssignmentOperators: true,
SpaceBeforeCtorInitializerColon: true,
SpaceBeforeInheritanceColon: true,
SpaceBeforeSquareBrackets: false,
SpaceInEmptyParentheses: false,
SpacesInAngles: false,
SpacesInConditionalStatement: false,
SpacesInParentheses: false,
SpacesInSquareBrackets: false,
}
436 changes: 219 additions & 217 deletions base/commandLine.cpp

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions common/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const PlatformDescription g_platforms[] = {
{ "psv", "psv", "psv", "Sony Playstation Vita", kPlatformPSVita },
{ "ps3", "ps3", "ps3", "Sony Playstation 3", kPlatformPS3 },
{ "ps4", "ps4", "ps4", "Sony Playstation 4", kPlatformPS4 },
{ "dc", "dc", "dc", "Sega Dreamcast", kPlatformDreamcast },

{ nullptr, nullptr, nullptr, "Default", kPlatformUnknown }
};
Expand Down
1 change: 1 addition & 0 deletions common/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ enum Platform {
kPlatformPSVita,
kPlatformPS3,
kPlatformPS4,
kPlatformDreamcast,

kPlatformUnknown = -1
};
Expand Down
2 changes: 1 addition & 1 deletion engines/smt/smt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ namespace SMT
while (!shouldQuit())
{
g_system->getEventManager()->pollEvent(e);
g_system->delayMillis(10);
g_system->delayMillis(1);
}

return Common::kNoError;
Expand Down
65 changes: 65 additions & 0 deletions engines/vileVN/common/cfg.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* ViLE - Visual Library Engine
* Copyright (c) 2010-2011, ViLE Team (team@vilevn.org)
* All rights reserved.
*
* 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; version 3 of the License.
*
* 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.
*/

#include "cfg.h"

// Preffered video settings
int Cfg::Display::Width=0;
int Cfg::Display::Height=0;
int Cfg::Display::Depth=32;
//int Cfg::Display::Flags=SDL_HWSURFACE|SDL_DOUBLEBUF;
int Cfg::Display::Flags=SDL_HWSURFACE;

// Audio settings
int Cfg::Audio::Frequency=22050;
int Cfg::Audio::Buffersize=1024;
int Cfg::Audio::Buffercount=6;
int Cfg::Audio::Channels=2;
int Cfg::Audio::CDROM=-1;
bool Cfg::Audio::Enabled=true;
uString Cfg::Audio::Soundfont="GeneralUser GS FluidSynth v1.43.sf2";

// Video configuration
bool Cfg::Video::Overlay=true;
int Cfg::Video::Framecount=6;
bool Cfg::Video::Enabled=true;

// Default system settings
uString Cfg::System::Logfile="";
uString Cfg::System::Keyfile="";
bool Cfg::System::Logcolor=false;
bool Cfg::System::Verbose=false;
bool Cfg::System::Mainmenu=true;
int Cfg::System::Framerate=25;

// Default paths (Defaults from build enviroment)
uString Cfg::Path::cwd=VILE_PATH_CWD;
uString Cfg::Path::game=VILE_PATH_GAME;
uString Cfg::Path::save=VILE_PATH_SAVE;
uString Cfg::Path::config=VILE_PATH_CFG;
uString Cfg::Path::resource=VILE_PATH_RES;

// Default font configuration
uString Cfg::Font::default_face="Ubuntu-B.ttf";
int Cfg::Font::default_size=18;
int Cfg::Font::default_style=0;

// Default color scheme
Uint32 Cfg::Color::DialogBackground=0xFFFFFFC0;
Uint32 Cfg::Color::DialogHeader=0xA00000FF;
Uint32 Cfg::Color::DialogTopic=0x000000FF;
Uint32 Cfg::Color::WidgetBackground=0x00000000;
Uint32 Cfg::Color::WidgetFont=0x404040FF;

89 changes: 89 additions & 0 deletions engines/vileVN/common/cfg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*! \class Cfg
* \brief Global configuration
*
* Collects and categorizes the common configuration (eg. across titles).
* The defaults are set in Cfg.cpp and can typically be overridden by the
* commandline handler.
*
* Game options such as volume settings are stored in the savegames.
*
*/
#ifndef _CFG_H_
#define _CFG_H_

#include <SDL.h>
#include "ustring.h"

class Cfg {
public:
// Settings for the physical display
class Display {
public:
static int Width; //!< Display width
static int Height; //!< Display height
static int Depth; //!< Display depth
static int Flags; //!< SDL flags for display
};

// Audio settings
class Audio {
public:
static bool Enabled; //!< Wether to load audio
static int Frequency; //!< Samples per second
static int Buffersize; //!< Samples per buffer
static int Buffercount; //!< Frames in buffer
static int Channels; //!< Number of channels
static int CDROM; //!< CD drive (-1 for none)
static uString Soundfont; //!< Default soundfont
};

// Video configuration
class Video {
public:
static bool Enabled; //!< Wether to load video
static bool Overlay; //!< Use overlayed video
static int Framecount; //!< Frames in buffer
};

// Generic system settings
class System {
public:
static uString Logfile; //!< Output file
static uString Keyfile; //!< Script encryption file
static bool Logcolor; //!< Print colored messages
static bool Verbose; //!< Print verbose messages
static bool Mainmenu; //!< Load main menu
static int Framerate; //!< Limits fps
};

// Paths to key files and directories
class Path {
public:
static uString cwd; //!< Working directory
static uString game; //!< Game resource folder
static uString save; //!< Savegame folder
static uString config; //!< Configuration file
static uString resource; //!< Resource file
};

// Font configuration
class Font {
public:
// Default for anything else
static uString default_face; //!< Default font file
static int default_size; //!< Default font size
static int default_style; //!< Default font style
};

class Color {
public:
static Uint32 DialogBackground; //!< Dialog background
static Uint32 DialogHeader; //!< Header font color
static Uint32 DialogTopic; //!< Subheader font color
static Uint32 WidgetBackground; //!< widget background
static Uint32 WidgetFont; //!< widget font color
};
};

#endif

199 changes: 199 additions & 0 deletions engines/vileVN/common/config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
/* src/common/config.h.in. Generated from configure.ac by autoheader. */

/* Compilation date */
#undef COMPILATION_DATE

/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT

/* Handles timezone and days */
#undef HAVE_GETTIMEOFDAY

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

/* Updates blocks of ram */
#undef HAVE_MEMSET

/* Define to 1 if stdbool.h conforms to C99. */
#undef HAVE_STDBOOL_H

/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H

/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H

/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H

/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H

/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H

/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H

/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H

/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H

/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF

/* Updates blocks of ram */
#undef HAVE_WORDEXP_H

/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL

/* Name of package */
#undef PACKAGE

/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT

/* Name of current line */
#undef PACKAGE_LINE

/* Define to the full name of this package. */
#undef PACKAGE_NAME

/* Define to the full name and version of this package. */
#undef PACKAGE_STRING

/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME

/* Define to the home page for this package. */
#undef PACKAGE_URL

/* Define to the version of this package. */
#undef PACKAGE_VERSION

/* SCM Revision */
#undef SCM_VERSION

/* Define to the type of arg 1 for `select'. */
#undef SELECT_TYPE_ARG1

/* Define to the type of args 2, 3 and 4 for `select'. */
#undef SELECT_TYPE_ARG234

/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5

/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME

/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME

/* Version number of package */
#undef VERSION

/* Compile code for a BSD based target */
#undef VILE_ARCH_FREEBSD

/* Compile code for a linuxbased target */
#undef VILE_ARCH_LINUX

/* Compile code for wintendo */
#undef VILE_ARCH_MICROSOFT

/* Use internal SDL_gfx code (Not library) */
#undef VILE_BUILD_INTERNALGFX

/* Use internal SDL_image code (Not library) */
#undef VILE_BUILD_INTERNALIMAGE

/* Use internal SDL_ttf code (Not library) */
#undef VILE_BUILD_INTERNALTTF

/* Build a native msys makefile */
#undef VILE_BUILD_MSYS

/* Enabling SDL 1.3 support */
#undef VILE_BUILD_SDLHG

/* Build standalone executable */
#undef VILE_BUILD_STATIC

/* Enabling UNICODE support */
#undef VILE_BUILD_UNICODE

/* Build with win32 console */
#undef VILE_BUILD_W32CONSOLE

/* Building with Electric Fence enabled */
#undef VILE_FEATURE_EFENCE

/* Building with ffmpeg */
#undef VILE_FEATURE_FFMPEG

/* Building with fluidsynth */
#undef VILE_FEATURE_FLUIDSYNTH

/* Building with hq scalers enabled */
#undef VILE_FEATURE_SCALER

/* Building with unittests enabled */
#undef VILE_FEATURE_UNITTEST

/* Build with debug information */
#undef VILE_LOGGING_DEBUG

/* Build with logging information */
#undef VILE_LOGGING_ENABLED

/* Default configuration file */
#undef VILE_PATH_CFG

/* Current working directory */
#undef VILE_PATH_CWD

/* Default path to load games from */
#undef VILE_PATH_GAME

/* Default resource file */
#undef VILE_PATH_RES

/* Default path for savegames */
#undef VILE_PATH_SAVE

/* Building with crowd support */
#undef VILE_SUPPORT_CROWD

/* Building with cware support */
#undef VILE_SUPPORT_CWARE

/* Building with ikura support */
#undef VILE_SUPPORT_IKURA

/* Building with jast support */
#undef VILE_SUPPORT_JAST

/* Building with True love support */
#undef VILE_SUPPORT_TLOVE

/* Building with will support */
#undef VILE_SUPPORT_WILL

/* Building with windy support */
#undef VILE_SUPPORT_WINDY

/* Define to empty if `const' does not conform to ANSI C. */
#undef const
Loading