mirror of
https://github.com/softdorothy/GliderPRO.git
synced 2024-06-15 05:29:31 +00:00
1 line
20 KiB
C
1 line
20 KiB
C
|
//============================================================================
//----------------------------------------------------------------------------
// Environ.c
//----------------------------------------------------------------------------
//============================================================================
#include <LowMem.h>
#include <Gestalt.h>
#include <NumberFormatting.h>
#include <Sound.h>
#include "Externs.h"
#include "Environ.h"
#include <Palettes.h>
#define kSwitchDepthAlert 130
#define kSetMemoryAlert 180
#define kLowMemoryAlert 181
#define kWNETrap 0x60
#define kSetDepthTrap 0xA2
#define kUnimpTrap 0x9F
#define kGestaltTrap 0xAD
#define kDisplay9Inch 1
#define kDisplay12Inch 2
#define kDisplay13Inch 3
typedef struct
{
short flags;
long mem1;
long mem2;
} sizeType;
//short GetThisVolumeRefNum (void);
//long GetThisCurrentDirectoryID (void);
//Boolean TrapExists (short);
//Boolean DoWeHaveGestalt (void);
//Boolean DoWeHaveWNE (void);
//Boolean DoWeHaveColor (void);
//Boolean DoWeHaveSystem602 (void);
//Boolean DoWeHaveSystem605 (void);
//Boolean DoWeHaveSystem7 (void);
//Boolean DoWeHaveSoundManager3 (void);
Boolean DoWeHaveQuickTime (void);
Boolean DoWeHaveDragManager (void);
Boolean CanWeDisplay8Bit (GDHandle);
//Boolean CanWeDisplay4Bit (GDHandle);
//Boolean CanWeDisplay1Bit (GDHandle);
short HowManyUsableScreens (Boolean, Boolean, Boolean);
void GetDeviceRect (Rect *);
Boolean AreWeColorOrGrayscale (void);
void SwitchDepthOrAbort (void);
macEnviron thisMac;
extern GDHandle thisGDevice;
extern short isDepthPref;
extern Boolean dontLoadMusic, dontLoadSounds;
//============================================================== Functions
//-------------------------------------------------------------- GetThisVolumeRefNum
// Get a hard reference number for the current drive volume this app is on.
/*
short GetThisVolumeRefNum (void)
{
OSErr theErr;
short vRef;
theErr = GetVol(nil, &vRef);
return (vRef);
}
*/
//-------------------------------------------------------------- GetThisCurrentDirectoryID
// Get a hard ID number for the current directory volume this app is in.
/*
long GetThisCurrentDirectoryID (void)
{
long dirID;
dirID = LMGetCurDirStore();
return (dirID);
}
*/
//-------------------------------------------------------------- TrapExists
// Returns whether or not a ToolBox trap exists for the users ROMs/System.
/*
Boolean TrapExists (short trapNumber)
{
return ((NGetTrapAddress(trapNumber, ToolTrap) !=
NGetTrapAddress(kUnimpTrap, ToolTrap)));
}
*/
//-------------------------------------------------------------- DoWeHaveGestalt
// Specifically tests for the availablity of the Gestalt() trap.
/*
Boolean DoWeHaveGestalt (void)
{
return (TrapExists(kGestaltTrap));
}
*/
//-------------------------------------------------------------- DoWeHaveWNE
// Specifically tests for the availablity of the WaitNextEvent() trap.
/*
Boolean DoWeHaveWNE (void)
{
return (TrapExists(kWNETrap));
}
*/
//-------------------------------------------------------------- DoWeHaveColor
// Determines if ROMs support Color QuickDraw (monitor not neccessarily color).
/*
Boolean DoWeHaveColor (void)
{
SysEnvRec thisWorld;
SysEnvirons(2, &thisWorld);
return (thisWorld.hasColorQD);
}
*/
//-------------------------------------------------------------- DoWeHaveSystem602
// Determines if the System version is at least 6.0.2 or more recent.
/*
Boolean DoWeHaveSystem602 (void)
{
SysEnvRec thisWorld;
Boolean haveIt;
SysEnvirons(2, &thisWorld);
if (thisWorld.systemVersion >= 0x0602)
haveIt = true;
else
haveIt = false;
return (haveIt);
}
*/
//-------------------------------------------------------------- DoWeHaveSystem605
// Determines if the System version is at least 6.0.5 or more recent.
/*
Boolean DoWeHaveSystem605 (void)
{
SysEnvRec thisWorld;
Boolean haveIt;
SysEnvirons(2, &thisWorld);
if (thisWorld.systemVersion >= 0x0605)
haveIt = true;
else
haveIt = false;
return (haveIt);
}
/
//--------------------------
|