File: Constants.h

package info (click to toggle)
basic256 2.0.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 15,076 kB
  • sloc: cpp: 16,791; yacc: 3,979; lex: 1,446; makefile: 25
file content (90 lines) | stat: -rwxr-xr-x 2,614 bytes parent folder | download
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
// Constants.h - Constants used throughout the code

#ifndef M_PI
    #define M_PI 3.14159265
#endif


#ifndef CONSTANTS
	#define CONSTANTS "CONSTANTS"

	// EPSILON represents how far off float comparison may be to be the same
    #define EPSILON 0.00000001

    // used to check if label is a function, subroutine, label or a internal call (symtableaddresstype[])
    #define ADDRESSTYPE_LABEL 1         //(this is a label defined by user)
    #define ADDRESSTYPE_FUNCTION 2      //(this is a function)
    #define ADDRESSTYPE_SUBROUTINE 3    //(this is a subroutine)
    #define ADDRESSTYPE_SYSTEMCALL 4    //(this is an internal label, generated by system aat compiler time)

	// editor settings
	#define EDITOR_TAB_WIDTH 4
	
	// mainwindow geometry settings/defaults
	#define MAINWINDOW_DEFAULT_X 100
	#define MAINWINDOW_DEFAULT_Y 100
	#define MAINWINDOW_DEFAULT_W 800
	#define MAINWINDOW_DEFAULT_H 600
	#define GRAPH_DOCK_DEFAULT_X 100
	#define GRAPH_DOCK_DEFAULT_Y 100
	#define GRAPH_DOCK_DEFAULT_W 400
	#define GRAPH_DOCK_DEFAULT_H 400
	#define OUT_DOCK_DEFAULT_X 100
	#define OUT_DOCK_DEFAULT_Y 100
	#define OUT_DOCK_DEFAULT_W 400
	#define OUT_DOCK_DEFAULT_H 400
	#define VAR_DOCK_DEFAULT_X 100
	#define VAR_DOCK_DEFAULT_Y 100
	#define VAR_DOCK_DEFAULT_W 400
	#define VAR_DOCK_DEFAULT_H 400

	// time between sleep interrupt checks
	#define SLEEP_GRANULE 500L

	// command line states that define how the GUI is laid-out and reacts
	#define GUISTATENORMAL 0
	#define GUISTATERUN 1
	#define GUISTATEAPP 2

	// states of a program
	#define RUNSTATESTOP 0
	#define RUNSTATERUN 1
	#define RUNSTATEDEBUG 2
	#define RUNSTATESTOPING 3
	#define RUNSTATERUNDEBUG 4

	// imagesave valid image types
	#define IMAGETYPE_BMP "BMP"
	#define IMAGETYPE_JPG "JPG"
	#define IMAGETYPE_JPEG "JPEG"
	#define IMAGETYPE_PNG "PNG"
	
	// mouse button value (clickb, mouseb)
	#define MOUSEBUTTON_CENTER 4
	#define MOUSEBUTTON_LEFT 1
	#define MOUSEBUTTON_NONE 0
	#define MOUSEBUTTON_RIGHT 2
    #define MOUSEBUTTON_DOUBLECLICK 32
    	
	// ostypes returned by ostype function
	#define OSTYPE_ANDROID 3
	#define OSTYPE_LINUX 1
	#define OSTYPE_MACINTOSH 2
	#define OSTYPE_WINDOWS 0
	
	// GetSlice Layers
	#define SLICE_ALL 0
	#define SLICE_PAINT 1
	#define SLICE_SPRITE 2
	
	// Transparency Color used in Interperter
	#define COLOR_CLEAR 0
	
	// Constants used in seralize and unserialize
	#define SERALIZE_DELIMITER ':'
	#define SERALIZE_INT '1'
	#define SERALIZE_FLOAT '2'
	#define SERALIZE_STRING '3'
	#define SERALIZE_UNASSIGNED '0'

#endif