DinkSmallwoodHD/source/App.h
seth 950ca4e6f9 * Sprite blits that hang out of the game area are now rejected in some situations, to match functionality of Dink 1.08. (Bloop the fish on 1.08 looked right because it was getting ddraw errors when trying to draw the "blank" numbers because they were too big for the screen)
* A LOAD_SEQUENCE done after a LOAD_SEQUENCE_NOW in dink.ini is now ignored to match V1.08 functionality.  This fixes the issue of a fish turning into an old man in Bloop the fish
* Alt-Q now closes Dink, to match 1.08
* Fixed issue with bubble magic not having a transparent background in Bloop the fish (was due to some changes to make fake magic/weapon icons work on mobiles.. I'll have to redo that later)
* Fixed issue with slow nagivation in Broken Windows due to too much logging about scripts being run
* (Bugfix) copy_bmp_to_screen issue where it might try to blit a 24 bit image onto 8 bit fixed (fixed incorrect images in Broken Windows)
* (Bugfix) key-<key num>.c scripts are no longer sometimes loaded multiple times
* Some tweaks to keyboard input so Broken Windows typing area works better, "," and "." are supported.  Escape is as well but it also brings up Dink HD's menu which isn't great, but at least it works
* (Bugfix) Default transparency for LEFTALIGN things is now correctly white instead of sometimes not transparent
- Note:  Just to be safe, save state version has changed, so old save states won't load

git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1500 353e56fe-9613-0410-8469-b96ad8e6f29c
2017-09-21 11:57:45 +00:00

125 lines
No EOL
2.9 KiB
C++

/*
* App.h
* Created by Seth Robinson on 3/6/09.
* For license info, check the license.txt file that should have come with this.
*
*/
#pragma once
#include "BaseApp.h"
#include "Manager/AdManager.h"
#define RT_IS_BETA 1
enum eExtendedVirtualKeys
{
VIRTUAL_KEY_CUSTOM_QUIT = VIRTUAL_KEY_CUSTOM_START
};
#ifdef RT_SCRIPT_BUILD
//this is being build from the command line, enable special flags here
#endif
class GamepadProvider;
enum eControlStyle
{
CONTROLS_JOYPAD,
CONTROLS_DRAG_ANYWHERE,
CONTROLS_FLING
};
enum eVideoFPS
{
VIDEO_FPS_LIMIT_ON,
VIDEO_FPS_LIMIT_OFF
};
#ifndef __APPLE__
//#define RT_EXPIRING
#endif
//#define RT_CHARTBOOST_ENABLED
class App: public BaseApp
{
public:
App();
virtual ~App();
virtual bool Init();
virtual void Kill();
virtual bool OnPreInitVideo();
virtual void Draw();
virtual void OnScreenSizeChange();
virtual void Update();
virtual void OnMemoryWarning();
virtual void OnEnterBackground();
virtual void OnEnterForeground();
string GetVersionString();
float GetVersion();
int GetBuild();
void GetServerInfo(string &server, uint32 &port);
VariantDB * GetShared() {return &m_varDB;}
Variant * GetVar(const string &keyName );
Variant * GetVarWithDefault(const string &varName, const Variant &var) {return m_varDB.GetVarWithDefault(varName, var);}
int GetSpecial();
void UpdateVideoSettings();
bool GetUsingTouchScreen() {return m_bUsingTouchScreen;}
bool CanDownloadDMODS() {return m_bHasDMODSupport;}
void SetCheatsEnabled(bool bCheatsEnabled) {m_bCheatsEnabled = bCheatsEnabled;}
bool GetCheatsEnabled() {return m_bCheatsEnabled;}
void OnExitApp(VariantList *pVarList);
bool GetIconsOnLeft();
void RemoveAndAttachAllAvailableGamepads();
AdManager * GetAdManager() {return &m_adManager;}
void OnMessage( Message &m );
void OnLoadSurfaces();
void OnUnloadSurfaces();
void AddDroidKeyboardKeys();
void RemoveAndroidKeyboardKeys();
void AddIcadeProvider();
bool GetForceAspectRatio();
bool GetGhostMode() {return m_bGhostMode;}
void SetGhostMode(bool bNew) { m_bGhostMode = bNew; }
private:
AdManager m_adManager;
bool m_bDidPostInit;
VariantDB m_varDB; //holds all data we want to save/load
int m_special;
bool m_bUsingTouchScreen;
bool m_bForceAspectRatio;
bool m_bGhostMode; //lets dink walk anywhere and ignore screenlocks
void SaveAllData();
void OnPreEnterBackground(VariantList *pVList);
void OniCadeDisconnected(GamepadProvider *pProvider);
bool DoesCommandLineParmExist(string parm);
float m_version;
string m_versionString;
int m_build;
float m_desktopVersion;
string m_desktopVersionString;
int m_desktopBuild;
bool m_bHasDMODSupport;
bool m_bCheatsEnabled;
};
App * GetApp();
const char * GetAppName();
const char * GetBundleName();
const char * GetBundlePrefix();