# HG changeset patch # User Eleni Maria Stea # Date 1390771093 -7200 # Node ID 8ffa6d61eb56fee482c744b17410cb2f4b216b96 # Parent 40febfed6cff77a88da9eac454f394640a446b92 changed main.cc functions to static :p diff -r 40febfed6cff -r 8ffa6d61eb56 src/main.cc --- a/src/main.cc Sun Jan 26 23:13:37 2014 +0200 +++ b/src/main.cc Sun Jan 26 23:18:13 2014 +0200 @@ -10,14 +10,14 @@ #include "mesh.h" #include "volume.h" -bool init(void); -GLUI *create_ui(void); -void display(void); -void reshape(int x, int y); -void keyboard(unsigned char key, int x, int y); -void keyboard_up(unsigned char key, int x, int y); -void mouse(int button, int state, int x, int y); -void motion(int x, int y); +static bool init(void); +static GLUI *create_ui(void); +static void display(void); +static void reshape(int x, int y); +static void keyboard(unsigned char key, int x, int y); +static void keyboard_up(unsigned char key, int x, int y); +static void mouse(int button, int state, int x, int y); +static void motion(int x, int y); static int win_xsz, win_ysz; static float cam_phi, cam_theta, cam_dist = 6; @@ -65,7 +65,7 @@ return 0; } -bool init() +static bool init() { vol = new Volume; if(!vol->load("data/test1.vol")) { @@ -87,7 +87,6 @@ } static GLUI_Spinner *res_spin[3]; - static void toggle_use_orig(int id) { for(int i=0; i<3; i++) { @@ -98,7 +97,6 @@ } } } - static void thres_change(int id) { static float prev_thres = thres; @@ -108,8 +106,7 @@ mesh->clear(); } } - -GLUI *create_ui() +static GLUI *create_ui() { GLUI *ui = GLUI_Master.create_glui("ui"); assert(ui); @@ -133,7 +130,7 @@ return ui; } -void display(void) +static void display(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -168,7 +165,7 @@ assert(glGetError() == GL_NO_ERROR); } -void reshape(int x, int y) +static void reshape(int x, int y) { glViewport(0, 0, x, y); glMatrixMode(GL_PROJECTION); @@ -181,7 +178,7 @@ } } -void keyboard(unsigned char key, int x, int y) +static void keyboard(unsigned char key, int x, int y) { key_state[(int)key] = true; @@ -201,7 +198,7 @@ } } -void keyboard_up(unsigned char key, int x, int y) +static void keyboard_up(unsigned char key, int x, int y) { key_state[(int) key] = false; } @@ -210,7 +207,7 @@ static bool bn_state[32]; static float prev_thres; -void mouse(int bn, int state, int x, int y) +static void mouse(int bn, int state, int x, int y) { prev_x = x; prev_y = y; @@ -227,7 +224,7 @@ } } -void motion(int x, int y) +static void motion(int x, int y) { int dx = x - prev_x; int dy = y - prev_y;