JNR
JNR, Engine Core Parameters

Macros

#define M_ENV_WINDOWS   1
 Operating System.
 
#define NOMINMAX
 
#define M_GRAPHICS_GL
 Available rendering implementations. More...
 
#define M_MAXOBJCNT   1024
 Count limitations.
 
#define M_MAXVARCNT   5
 
#define M_MAXFORCECNT   10
 
#define M_MAXLITTER_POOLS   32
 
#define M_MAXLITTER_BOX   10
 
#define M_MAX_COLLISION_DOMAIN_SZ   128
 
#define WAVE_SPEED   2
 
#define WAVE_AMPLITUDE   M_UNIT*0.1
 
#define WAVE_FREQUENCY   15
 
#define M_LAVASURFACE_OFFSET   M_UNIT*1.45
 
#define M_DIR_L   1
 
#define M_DIR_R   2
 
#define M_DIR_T   3
 
#define M_DIR_B   4
 
#define M_OBJ_OBJECT   0
 
#define M_OBJ_PLAYER   1
 
#define M_OBJ_MONSTER   2
 
#define M_OBJ_FINISH   3
 
#define M_OBJ_CHECKPT   4
 
#define M_OBJ_ARROW   5
 
#define M_AI_WALKER   1
 
#define M_AI_JUMPY   2
 
#define M_STAGE_MENU   ((unsigned)0)
 
#define M_STAGE_LOAD   1
 
#define M_STAGE_GAME   2
 
#define M_STAGE_GEN   3
 
#define M_STAGE_EDIT   4
 
#define M_STAGE_INTRO   5
 
#define M_UI_SPACING   10
 
#define M_UI_HEIGHT   30
 
#define M_UI_POTIONFX_W   170
 
#define M_UI_POTIONFX_MARGIN   4
 
#define M_BATTLEICON_SZ   (M_UNIT/2.0)
 
#define M_HPBAR_W   (M_UNIT*0.8)
 
#define M_HPBAR_H   (M_UNIT/18.0)
 
#define M_HPBAR_HOVER   (M_UNIT/10.0)
 
#define M_POTION_LABEL_RANGE   6*M_UNIT
 
#define M_SEGW   10
 
#define M_SEGH   20
 
#define M_DEFAULT_SPEED   50
 
#define M_DEFAULT_JUMP   100
 
#define M_DEFAULT_SOMERSAULT   80
 
#define M_PLAYER_SPEED   70
 
#define M_PLAYER_JUMP   150
 
#define M_PLAYER_SOMERSAULT   100
 
#define M_PUNCH_TIME   2
 
#define M_HP_VISIBILITY_DISTANCE   (M_UNIT*4)
 
#define M_TOUCH_HIT_INTERVAL   (1.1)
 
#define M_PLAYER_ATTACK_RANGE   (M_UNIT*2.2)
 
#define M_PLAYER_ATTACK_INTERVAL   (0.4)
 
#define M_MATTACK_RANGE   (M_UNIT*1)
 
#define M_DISPLAY_DAMAGE   2.0
 
#define M_XP_LVL2   20
 
#define M_XP_INCREMENT   1.5
 
#define M_HP_INCREMENT   2
 
#define M_AP_INCREMENT   1
 
#define M_DP_INCREMENT   0.1
 

Types and values

#define M_BOOL   unsigned char
 
#define M_TRUE   1
 
#define M_FALSE   0
 

Files and directories

#define M_LOGFILE   "engine-log.txt"
 Log file.
 
#define M_DIR_MODEL   "model\\"
 3D models directory
 
#define M_DIR_FX   "fx\\"
 Visual effects directory.
 
#define M_DIR_TEXTURE   "texture\\"
 Textures directory.
 
#define M_DIR_FONT   "font\\"
 Fonts directory.
 
#define M_DLABEL   ':'
 
#define M_DTEXT   '\''
 
#define M_DSECTION_1   '['
 
#define M_DSECTION_2   ']'
 
#define M_DIR_LEVEL   "level\\"
 
#define M_DIR_TILESET   "tileset\\"
 
#define M_NEWGAME_FIRST_LEVEL   "test-1.lvl"
 
#define M_INTRO_LEVEL   "mmenu.lvl"
 

Maths helper functions

#define M_MIN(a, b)   ((a)<(b)?(a):(b))
 
#define M_MAX(a, b)   ((a)>(b)?(a):(b))
 
#define M_CLAMP(mini, maxi, val)   M_MIN( (maxi), M_MAX( (mini), (val) ))
 
#define M_SIGN(a)   ((a)>=0?(1):(-1))
 Return sign (+1 or -1)
 
#define M_ABS(a)   ((a)>0?(a):(-(a)))
 Return abs(a)
 
#define M_R2D(r)   ((r)*(180.0/3.14159))
 Convert radians to degrees.
 
#define M_D2R(r)   ((r)*(3.14159/180.0))
 Convert degrees to radians.
 

Engine physics parameters

#define M_UNIT   0.1
 Unit of 1 meter.
 
#define M_SMALL_VECT_DOUBLE   (M_UNIT*0.001)
 A "small value" in comparison to M_UNIT.
 
#define M_GRAVITATION_ON
 Enable gravity.
 
#define M_NORMAL_RESPONSE   (0.04*M_UNIT)
 Distance an object "bounces back" form a collision surface.
 
#define M_GRAVITATIONAL_HOVER   (0.15*M_UNIT)
 Gravity surface distance.
 
#define M_GRAVITATION_ACC   (600.0)
 Force of gravity accelleration;.
 
#define M_CUTOFF   0
 

Copyright, version and other strings

#define M_COPYRIGHT_STRING   (laFont::getSourceStr(0))
 
#define M_VERSION_STRING   "Alpha"
 
#define M_JRTITLE_STRING   (laFont::getSourceStr(1))
 
#define M_EDITORTITLE_STRING   (laFont::getSourceStr(2))
 

Graphics renderer parameters and types

#define M_TEXTURE   unsigned long
 
#define M_TEX_SIMPLE   1
 Simple texture (no transparency)
 
#define M_TEX_TMAP   2
 Transparent texture with an alpha channel.
 
#define M_TEX_CKEY   3
 Transparent texture with color key ( use upper-left corner pixel as key )
 
#define M_CHARCNT   32.0
 Font parameters More...
 
#define M_MAX_FONT_CNT   10
 Limit for the number of fonts.
 
#define M_AL   0x1
 Text align left.
 
#define M_AR   0x2
 Text align right.
 
#define M_AC   0x3
 Text align center.
 
#define M_AT   0x10
 Text align top.
 
#define M_AB   0x20
 Text align bottom.
 
#define M_AM   0x30
 Text align middle.
 

Debug helpers

#define MSG(str, ...)   (::laSystemIntegrator::getEnvironment()->message(M_FALSE, str, __VA_ARGS__))
 
#define MLOG(str, ...)   (::laSystemIntegrator::getEnvironment()->mlog(__FUNCTION__, str, __VA_ARGS__))
 

Performance profiler helpers

#define M_MODE_PROFILE
 
#define PROFILE(x)   Prof(x)
 
#define PROFILE_COL(x)
 
#define PROFILE_REN(x)
 
#define PROFILE_ANIM(x)
 
#define PROFILE_LVL(x)
 

Detailed Description

Macro Definition Documentation

#define M_CHARCNT   32.0

Font parameters

Number of graphically represented characters in fonts

Definition at line 144 of file Core-Parameters.h.

#define M_GRAPHICS_GL

Available rendering implementations.

Enable OpenGL graphics renderer

Definition at line 131 of file Core-Parameters.h.