Raylib 3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB

2 years ago
#ifndef CONSTANTS_H
#define CONSTANTS_H
#include "raylib.h"
#ifndef MAX
#define MAX(a,b) ( (a) < (b) ? (b) : (a) )
#endif
#define VIS_PORTS 16 // Program is able to handle <100 ports. But we never intend anything different than 16 to be honest.
#define VIS_PORTS_SQRT 4 //please choose by hand. If not possibe choose the next higher. e.g. 13 ports -> 4²
//Pixel values
#define NOTE_SMALL_SIDE 14
#define NOTE_LONG_SIDE 20
#define NOTE_BORDER 4 //halved for left/right padding. the NOTE sides already include the border.
#define NOTE_GAP 3
//For GUI
#define HEIGHT 25
#define SPACING 35
typedef struct { // C-N00b: using typedef lets us type Note nt; or (Note){...} instead of struct Note.
int active;
int port;
int x;
int y;
int pitch;
int velocity; //converted to color, size etc. by raylib
float countdown; //0.0f is not existent, 1 is permanently visible, everything between is the fade out process with auto-decrement. To start the timer set to 0.999 or so
} Note;
enum {
//ports are 0-15
background=VIS_PORTS+0,
backgroundLight=VIS_PORTS+1,
backgroundLighter=VIS_PORTS+2,
};
enum {
//Layers in order.
layerIndex_notes,
layerIndex_effects,
layerIndex_sprites,
layerIndex_count, //last one
};
#endif // not defined CONSTANTS_H