-
Notifications
You must be signed in to change notification settings - Fork 2
/
sstart.h
117 lines (94 loc) · 3.34 KB
/
sstart.h
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/**************************************************
*** Project Title: Super Start (sstart) ***
*** Author: Greg Dietsche ***
*** Date: 11/21/2002 ***
*** Platforms: TI-89, TI89T, TI-92p, V200 ***
*** Supported Hardware Revisions: 1, 2, 3 ***
*** Description: An Application designed to ***
*** Simplify the launching of ppg ***
*** programs as well as normal ***
*** asm and TI-BASIC programs ***
***************************************************/
// $Id$
/*
This file is part of Super Start.
Super Start 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.
You may use portions of the Super Start source code for your own projects
if you give me credit and a link to my website: http://calc.gregd.org/
in the project source code and documentation.
*/
#ifndef _SUPERSTART_H_
#define _SUPERSTART_H_
//Version Control and Internal/External App Name
#define APP_VERSION "2.00"
#define APP_INTERNAL "sstart"
#define AMSMajorRevisionRequired (2)
#define AMSMinorRevisionRequired (5)
#define LANGUAGE_ENGLISH
//#define LANGUAGE_SPANISH
//#define LANGUAGE_DUTCH
//#define LANGUAGE_SWEDISH
//#define LANGUAGE_GERMAN
//#define LANGUAGE_FRENCH
//#define LANGUAGE_ITALIAN
//#define DEBUG //enable extra debugging code
#ifndef _89
#ifndef _92
#error Please '#define _89' or '#define _92'
#endif
#endif
#ifdef _89
#ifdef _92
#error '#define _89' and '#define _92' are mutually exclusive
#endif
#endif
#ifdef _89
#define C(x,y)(x)
#endif
#ifdef _92
#define C(x,y)(y)
#endif
//My own debuged replacment for TI's OS_NeedMinimumVersion macro
//This Macro will mark the application for immediate removal if
//the AMS version is too low.
#define CheckAMS(frame, major, minor) \
{ \
static BOOL _OSVersionOK_ = FALSE; \
if (! _OSVersionOK_) \
{ \
if (((long const *)AMS_Global_Variables)[-1] < 1499 || \
((BASECODE_PARM_BLOCK const *(* const)(void))AMS_Global_Variables[1498])()->version_number \
< (((major) << 8) + (minor))) \
{ \
MY_ACB(frame)->flags |= (ACB_JT_VERSION|ACB_DELETE); \
return; \
} \
else \
_OSVersionOK_ = TRUE; \
} \
}
//This header requires certain other header files
#include "xr.h" //technically part of this header file; isolated for ease of editing
BOOL cbFormatsDialog(WORD dlgId, DWORD dValue);
char* About(void);
extern pFrame pAppObj;
extern const short AppIcon[];
extern const short DSIcon[];
extern const UCHAR cmd_post_app_id[];
extern const UCHAR ti_home[];
typedef struct SSETTINGS{
WORD AutoStart;
WORD LeakWatch;
}SETTINGS;
extern SETTINGS gSettings;
//don't run if the JT_VERSION flag is set... this should be done for all TI-BASIC Extensions!
#define JT_VERSION_CHECK()(MY_ACB(pAppObj)->flags&ACB_JT_VERSION)
//#define AutoStartMask(val) ((val&0xFFFF0000)>>16)
//#define LeakWatchMask(val) (val&0x0000FFFF)
//#define AutoStartInstalled() (AutoStartMask(gSettings)==PUP_ON)
#define AutoStartInstalled() (gSettings.AutoStart==PUP_ON)
//#define UseLeakWatch() (LeakWatchMask(gSettings)==PUP_ON)
#define UseLeakWatch() (gSettings.LeakWatch==PUP_ON)
#endif