#define INFOTEXT_UNKNOWN_ELEMENT "unknown"
-/*
- -----------------------------------------------------------------------------
- screen and artwork graphic pixel position definitions
- -----------------------------------------------------------------------------
-*/
+// ----------------------------------------------------------------------------
+// screen and artwork graphic pixel position definitions
+// ----------------------------------------------------------------------------
// values for the control window
#define ED_CTRL1_BUTTONS_HORIZ 4 // toolbox
SYSIZE - INFOTEXT_YSIZE)
-/*
- -----------------------------------------------------------------------------
- editor gadget definitions
- -----------------------------------------------------------------------------
-*/
+// ----------------------------------------------------------------------------
+// editor gadget definitions
+// ----------------------------------------------------------------------------
enum
{
#define ED_DRAWING_ID_EDITOR_LAST ED_DRAWING_ID_RANDOM_BACKGROUND
-/*
- -----------------------------------------------------------------------------
- some internally used definitions
- -----------------------------------------------------------------------------
-*/
+// ----------------------------------------------------------------------------
+// some internally used definitions
+// ----------------------------------------------------------------------------
// values for CopyLevelToUndoBuffer()
#define UNDO_IMMEDIATE 0
#define DEFAULT_EDITOR_TILESIZE_MM TILESIZE
-/*
- -----------------------------------------------------------------------------
- some internally used data structure definitions
- -----------------------------------------------------------------------------
-*/
+// ----------------------------------------------------------------------------
+// some internally used data structure definitions
+// ----------------------------------------------------------------------------
static struct
{
char shortcut;
} controlbutton_info[ED_NUM_CTRL_BUTTONS] =
{
- /* note: some additional characters are already reserved for "cheat mode"
- shortcuts (":XYZ" style) -- for details, see "events.c" */
+ // note: some additional characters are already reserved for "cheat mode"
+ // shortcuts (":XYZ" style) -- for details, see "events.c"
// ---------- toolbox control buttons ---------------------------------------
GADGET_ID_AUTO_EXIT_SOKOBAN, GADGET_ID_NONE,
&level.auto_exit_sokoban,
NULL, NULL,
- "exit level if all fields solved", "automatically finish Sokoban levels"
+ "exit level if all tasks solved", "automatically finish Sokoban levels"
},
{
ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(14),
};
-/*
- -----------------------------------------------------------------------------
- some internally used variables
- -----------------------------------------------------------------------------
-*/
+// ----------------------------------------------------------------------------
+// some internally used variables
+// ----------------------------------------------------------------------------
// maximal size of level editor drawing area
static int MAX_ED_FIELDX, MAX_ED_FIELDY;
};
-/*
- -----------------------------------------------------------------------------
- functions
- -----------------------------------------------------------------------------
-*/
+// ----------------------------------------------------------------------------
+// functions
+// ----------------------------------------------------------------------------
static int getMaxInfoTextLength(void)
{
if (selectbox_info[i].size == -1) // dynamically determine size
{
- /* (we cannot use -1 for uninitialized values if we directly compare
- with results from strlen(), because the '<' and '>' operation will
- implicitely cast -1 to an unsigned integer value!) */
+ // (we cannot use -1 for uninitialized values if we directly compare
+ // with results from strlen(), because the '<' and '>' operation will
+ // implicitely cast -1 to an unsigned integer value!)
selectbox_info[i].size = 0;
for (j = 0; selectbox_info[i].options[j].text != NULL; j++)
radius = (int)(sqrt((float)(len_x * len_x + len_y * len_y)) + 0.5);
- /* not optimal (some points get drawn twice) but simple,
- and fast enough for the few points we are drawing */
+ // not optimal (some points get drawn twice) but simple,
+ // and fast enough for the few points we are drawing
for (x = 0; x <= radius; x++)
{
case GADGET_ID_SAVE:
{
- /* saving read-only levels into personal level set modifies global vars
- "leveldir_current" and "level_nr"; restore them after saving level */
+ // saving read-only levels into personal level set modifies global vars
+ // "leveldir_current" and "level_nr"; restore them after saving level
LevelDirTree *leveldir_former = leveldir_current;
int level_nr_former = level_nr;
char *level_filename;