summaryrefslogtreecommitdiffstats
path: root/src/ui/edit.h
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-06-11 17:28:27 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-06-11 17:28:27 +0200
commita8665d204255b4b0ad9ae6982f77ecd5e053c1b6 (patch)
tree5f7e58785f5175e7f067ffaf8f96d16272c92d1e /src/ui/edit.h
parent8ffdf2583e4ea77731490dcaad51dbc08d7f26fa (diff)
downloadcolobot-a8665d204255b4b0ad9ae6982f77ecd5e053c1b6.tar.gz
colobot-a8665d204255b4b0ad9ae6982f77ecd5e053c1b6.tar.bz2
colobot-a8665d204255b4b0ad9ae6982f77ecd5e053c1b6.zip
Changed #defined constants to consts; typedef struct -> struct
Diffstat (limited to 'src/ui/edit.h')
-rw-r--r--src/ui/edit.h37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/ui/edit.h b/src/ui/edit.h
index fb6d7ae..7ac6c53 100644
--- a/src/ui/edit.h
+++ b/src/ui/edit.h
@@ -28,15 +28,15 @@ class CScroll;
-#define EDITSTUDIOMAX 20000 // maximum number of characters in CBOT edit
-#define EDITLINEMAX 1000 // maximum total number of lines
-#define EDITIMAGEMAX 50 // maximum total number of lines with images
-#define EDITLINKMAX 100 // maximum number of links
-#define EDITHISTORYMAX 50 // max number of levels preserves
+const int EDITSTUDIOMAX = 20000; // maximum number of characters in CBOT edit
+const int EDITLINEMAX = 1000; // maximum total number of lines
+const int EDITIMAGEMAX = 50; // maximum total number of lines with images
+const int EDITLINKMAX = 100; // maximum number of links
+const int EDITHISTORYMAX = 50; // max number of levels preserves
-#define EDITUNDOMAX 20 // max number of successive undo
+const int EDITUNDOMAX = 20; // max number of successive undo
-typedef struct
+struct EditUndo
{
char* text; // original text
int len; // length of the text
@@ -44,8 +44,7 @@ typedef struct
int cursor2; // offset cursor
int lineFirst; // the first line displayed.
-}
-EditUndo;
+};
enum OperUndo
{
@@ -54,35 +53,31 @@ enum OperUndo
OPERUNDO_DELETE = 2, // deleting characters
};
-typedef struct
+struct ImageLine
{
char name[40]; // name of the image (without diagram \)
float offset; // vertical offset (v texture)
float height; // height of the part (dv texture)
float width; // width
-}
-ImageLine;
+};
-typedef struct
+struct HyperLink
{
char name[40]; // text file name (without help \)
char marker[20]; // name of the marker
-}
-HyperLink;
+};
-typedef struct
+struct HyperMarker
{
char name[20]; // name of the marker
int pos; // position in the text
-}
-HyperMarker;
+};
-typedef struct
+struct HyperHistory
{
char filename[50]; // full file name text
int firstLine; // rank of the first displayed line
-}
-HyperHistory;
+};