diff options
Diffstat (limited to 'Game/Code/lib/projectM/projectM.pas')
-rw-r--r-- | Game/Code/lib/projectM/projectM.pas | 251 |
1 files changed, 126 insertions, 125 deletions
diff --git a/Game/Code/lib/projectM/projectM.pas b/Game/Code/lib/projectM/projectM.pas index 26c2588d..29e9a60c 100644 --- a/Game/Code/lib/projectM/projectM.pas +++ b/Game/Code/lib/projectM/projectM.pas @@ -13,6 +13,7 @@ interface uses SysUtils, + ctypes, gl, UConfig; @@ -29,7 +30,7 @@ type { Event types } type - TProjectMEvent = integer; + TProjectMEvent = cint; const PROJECTM_KEYUP = 0; PROJECTM_KEYDOWN = 1; @@ -39,137 +40,137 @@ const { Keycodes } type - TProjectMKeycode = integer; + TProjectMKeycode = cint; const - PROJECTM_K_RETURN = 0; - PROJECTM_K_RIGHT = 1; - PROJECTM_K_LEFT = 2; - PROJECTM_K_UP = 3; - PROJECTM_K_DOWN = 4; - PROJECTM_K_PAGEUP = 5; - PROJECTM_K_PAGEDOWN = 6; - PROJECTM_K_INSERT = 7; - PROJECTM_K_DELETE = 8; - PROJECTM_K_ESCAPE = 9; - PROJECTM_K_LSHIFT = 10; - PROJECTM_K_RSHIFT = 11; - PROJECTM_K_CAPSLOCK = 12; - PROJECTM_K_LCTRL = 13; - PROJECTM_K_HOME = 14; - PROJECTM_K_END = 15; - PROJECTM_K_BACKSPACE = 16; - - PROJECTM_K_F1 = 17; - PROJECTM_K_F2 = (PROJECTM_K_F1 + 1); - PROJECTM_K_F3 = (PROJECTM_K_F1 + 2); - PROJECTM_K_F4 = (PROJECTM_K_F1 + 3); - PROJECTM_K_F5 = (PROJECTM_K_F1 + 4); - PROJECTM_K_F6 = (PROJECTM_K_F1 + 5); - PROJECTM_K_F7 = (PROJECTM_K_F1 + 6); - PROJECTM_K_F8 = (PROJECTM_K_F1 + 7); - PROJECTM_K_F9 = (PROJECTM_K_F1 + 8); - PROJECTM_K_F10 = (PROJECTM_K_F1 + 9); - PROJECTM_K_F11 = (PROJECTM_K_F1 + 10); - PROJECTM_K_F12 = (PROJECTM_K_F1 + 11); - - PROJECTM_K_0 = 48; - PROJECTM_K_1 = (PROJECTM_K_0 + 1); - PROJECTM_K_2 = (PROJECTM_K_0 + 2); - PROJECTM_K_3 = (PROJECTM_K_0 + 3); - PROJECTM_K_4 = (PROJECTM_K_0 + 4); - PROJECTM_K_5 = (PROJECTM_K_0 + 5); - PROJECTM_K_6 = (PROJECTM_K_0 + 6); - PROJECTM_K_7 = (PROJECTM_K_0 + 7); - PROJECTM_K_8 = (PROJECTM_K_0 + 8); - PROJECTM_K_9 = (PROJECTM_K_0 + 9); - - { Upper case } - PROJECTM_K_A_UPPERCASE = 65; - PROJECTM_K_B_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 1); - PROJECTM_K_C_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 2); - PROJECTM_K_D_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 3); - PROJECTM_K_E_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 4); - PROJECTM_K_F_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 5); - PROJECTM_K_G_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 6); - PROJECTM_K_H_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 7); - PROJECTM_K_I_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 8); - PROJECTM_K_J_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 9); - PROJECTM_K_K_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 10); - PROJECTM_K_L_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 11); - PROJECTM_K_M_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 12); - PROJECTM_K_N_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 13); - PROJECTM_K_O_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 14); - PROJECTM_K_P_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 15); - PROJECTM_K_Q_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 16); - PROJECTM_K_R_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 17); - PROJECTM_K_S_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 18); - PROJECTM_K_T_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 19); - PROJECTM_K_U_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 20); - PROJECTM_K_V_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 21); - PROJECTM_K_W_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 22); - PROJECTM_K_X_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 23); - PROJECTM_K_Y_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 24); - PROJECTM_K_Z_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 25); - - { Lower case } - PROJECTM_K_a_LOWERCASE = 97; - PROJECTM_K_b_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 1); - PROJECTM_K_c_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 2); - PROJECTM_K_d_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 3); - PROJECTM_K_e_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 4); - PROJECTM_K_f_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 5); - PROJECTM_K_g_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 6); - PROJECTM_K_h_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 7); - PROJECTM_K_i_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 8); - PROJECTM_K_j_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 9); - PROJECTM_K_k_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 10); - PROJECTM_K_l_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 11); - PROJECTM_K_m_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 12); - PROJECTM_K_n_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 13); - PROJECTM_K_o_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 14); - PROJECTM_K_p_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 15); - PROJECTM_K_q_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 16); - PROJECTM_K_r_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 17); - PROJECTM_K_s_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 18); - PROJECTM_K_t_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 19); - PROJECTM_K_u_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 20); - PROJECTM_K_v_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 21); - PROJECTM_K_w_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 22); - PROJECTM_K_x_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 23); - PROJECTM_K_y_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 24); - PROJECTM_K_z_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 25); - - PROJECTM_K_NONE = (PROJECTM_K_z_LOWERCASE + 1); + PROJECTM_K_RETURN = 0; + PROJECTM_K_RIGHT = 1; + PROJECTM_K_LEFT = 2; + PROJECTM_K_UP = 3; + PROJECTM_K_DOWN = 4; + PROJECTM_K_PAGEUP = 5; + PROJECTM_K_PAGEDOWN = 6; + PROJECTM_K_INSERT = 7; + PROJECTM_K_DELETE = 8; + PROJECTM_K_ESCAPE = 9; + PROJECTM_K_LSHIFT = 10; + PROJECTM_K_RSHIFT = 11; + PROJECTM_K_CAPSLOCK = 12; + PROJECTM_K_LCTRL = 13; + PROJECTM_K_HOME = 14; + PROJECTM_K_END = 15; + PROJECTM_K_BACKSPACE = 16; + + PROJECTM_K_F1 = 17; + PROJECTM_K_F2 = (PROJECTM_K_F1 + 1); + PROJECTM_K_F3 = (PROJECTM_K_F1 + 2); + PROJECTM_K_F4 = (PROJECTM_K_F1 + 3); + PROJECTM_K_F5 = (PROJECTM_K_F1 + 4); + PROJECTM_K_F6 = (PROJECTM_K_F1 + 5); + PROJECTM_K_F7 = (PROJECTM_K_F1 + 6); + PROJECTM_K_F8 = (PROJECTM_K_F1 + 7); + PROJECTM_K_F9 = (PROJECTM_K_F1 + 8); + PROJECTM_K_F10 = (PROJECTM_K_F1 + 9); + PROJECTM_K_F11 = (PROJECTM_K_F1 + 10); + PROJECTM_K_F12 = (PROJECTM_K_F1 + 11); + + PROJECTM_K_0 = 48; + PROJECTM_K_1 = (PROJECTM_K_0 + 1); + PROJECTM_K_2 = (PROJECTM_K_0 + 2); + PROJECTM_K_3 = (PROJECTM_K_0 + 3); + PROJECTM_K_4 = (PROJECTM_K_0 + 4); + PROJECTM_K_5 = (PROJECTM_K_0 + 5); + PROJECTM_K_6 = (PROJECTM_K_0 + 6); + PROJECTM_K_7 = (PROJECTM_K_0 + 7); + PROJECTM_K_8 = (PROJECTM_K_0 + 8); + PROJECTM_K_9 = (PROJECTM_K_0 + 9); + + { Upper case } + PROJECTM_K_A_UPPERCASE = 65; + PROJECTM_K_B_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 1); + PROJECTM_K_C_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 2); + PROJECTM_K_D_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 3); + PROJECTM_K_E_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 4); + PROJECTM_K_F_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 5); + PROJECTM_K_G_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 6); + PROJECTM_K_H_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 7); + PROJECTM_K_I_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 8); + PROJECTM_K_J_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 9); + PROJECTM_K_K_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 10); + PROJECTM_K_L_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 11); + PROJECTM_K_M_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 12); + PROJECTM_K_N_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 13); + PROJECTM_K_O_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 14); + PROJECTM_K_P_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 15); + PROJECTM_K_Q_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 16); + PROJECTM_K_R_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 17); + PROJECTM_K_S_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 18); + PROJECTM_K_T_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 19); + PROJECTM_K_U_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 20); + PROJECTM_K_V_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 21); + PROJECTM_K_W_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 22); + PROJECTM_K_X_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 23); + PROJECTM_K_Y_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 24); + PROJECTM_K_Z_UPPERCASE = (PROJECTM_K_A_UPPERCASE + 25); + + { Lower case } + PROJECTM_K_a_LOWERCASE = 97; + PROJECTM_K_b_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 1); + PROJECTM_K_c_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 2); + PROJECTM_K_d_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 3); + PROJECTM_K_e_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 4); + PROJECTM_K_f_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 5); + PROJECTM_K_g_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 6); + PROJECTM_K_h_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 7); + PROJECTM_K_i_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 8); + PROJECTM_K_j_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 9); + PROJECTM_K_k_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 10); + PROJECTM_K_l_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 11); + PROJECTM_K_m_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 12); + PROJECTM_K_n_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 13); + PROJECTM_K_o_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 14); + PROJECTM_K_p_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 15); + PROJECTM_K_q_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 16); + PROJECTM_K_r_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 17); + PROJECTM_K_s_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 18); + PROJECTM_K_t_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 19); + PROJECTM_K_u_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 20); + PROJECTM_K_v_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 21); + PROJECTM_K_w_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 22); + PROJECTM_K_x_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 23); + PROJECTM_K_y_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 24); + PROJECTM_K_z_LOWERCASE = (PROJECTM_K_a_LOWERCASE + 25); + + PROJECTM_K_NONE = (PROJECTM_K_z_LOWERCASE + 1); { Modifiers } type - TProjectMModifier = integer; + TProjectMModifier = cint; const - PROJECTM_KMOD_LSHIFT = 0; - PROJECTM_KMOD_RSHIFT = 1; - PROJECTM_KMOD_CAPS = 2; - PROJECTM_KMOD_LCTRL = 3; - PROJECTM_KMOD_RCTRL = 4; + PROJECTM_KMOD_LSHIFT = 0; + PROJECTM_KMOD_RSHIFT = 1; + PROJECTM_KMOD_CAPS = 2; + PROJECTM_KMOD_LCTRL = 3; + PROJECTM_KMOD_RCTRL = 4; type - PSettings = ^TSettings; - TSettings = record - meshX: integer; - meshY: integer; - fps: integer; - textureSize: integer; - windowWidth: integer; - windowHeight: integer; - presetURL: PChar; - titleFontURL: PChar; - menuFontURL: PChar; - smoothPresetDuration: integer; - presetDuration: integer; - beatSensitivity: single; - aspectCorrection: byte; - easterEgg: single; - shuffleEnabled: byte; - end; + PSettings = ^TSettings; + TSettings = record + meshX: cint; + meshY: cint; + fps: cint; + textureSize: cint; + windowWidth: cint; + windowHeight: cint; + presetURL: PChar; + titleFontURL: PChar; + menuFontURL: PChar; + smoothPresetDuration: cint; + presetDuration: cint; + beatSensitivity: cfloat; + aspectCorrection: byte; + easterEgg: cfloat; + shuffleEnabled: byte; + end; type PProjectM = ^TProjectM; |