feat(main.c, input.c): Print important information to stdout
This commit is contained in:
@@ -60,7 +60,7 @@ void __key_callback_input(
|
||||
if (selected_coord == projection.z)
|
||||
return;
|
||||
|
||||
selected_coord = projection.w;
|
||||
projection.w = selected_coord;
|
||||
}
|
||||
|
||||
if (projection.w >= projection.m)
|
||||
@@ -88,8 +88,11 @@ void __key_callback_input(
|
||||
projection.z = tmp;
|
||||
animate_index = 3;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
printf("[AXIS] (X,Y,Z,W) = (%d,%d,%d,%d)\n", projection.x, projection.y, projection.z, projection.w);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -232,8 +235,6 @@ end:
|
||||
if (0)
|
||||
{
|
||||
printf("QUAT: %2.5f %2.5f %2.5f %2.5f\n", q[0], q[1], q[2], q[3]);
|
||||
printf("PROY: %3d %3d %3d (%3d)\n", projection.x, projection.y,
|
||||
projection.z, projection.w);
|
||||
printf("\n");
|
||||
}
|
||||
*/
|
||||
|
||||
22
src/main.c
22
src/main.c
@@ -18,6 +18,24 @@
|
||||
struct projection projection = {.x = 0, .y = 1, .z = 2, .w = 3, .mesh = NULL};
|
||||
|
||||
const char *wname = "manigraph: manifold grapher";
|
||||
const char *input_map =
|
||||
"\n"
|
||||
"DRAG AND DROP: Graph a klein file from the file system\n"
|
||||
"LEFT-CLICK: Rotate surface on DRAG direction\n"
|
||||
"SCROLL: Rotate surface on SCROLL direction\n"
|
||||
"\n"
|
||||
"W,S: Rotate sufrace on X axis\n"
|
||||
"A,D: Rotate sufrace on Y axis\n"
|
||||
"Q,E: Rotate sufrace on Z axis\n"
|
||||
"LEFT-RIGHT: Rotate sufrace Horizontally\n"
|
||||
"UP-DOWN: Rotate sufrace Vetrically\n"
|
||||
"\n"
|
||||
"Z: Rotate W axis to X axis\n"
|
||||
"X: Rotate W axis to Y axis\n"
|
||||
"C: Rotate W axis to Z axis\n"
|
||||
"1-9: Rotate n axis to W axis\n"
|
||||
"\n"
|
||||
;
|
||||
|
||||
unsigned char color[4] = {0x2F, 0x3C, 0x7E, 0xff};
|
||||
|
||||
@@ -129,7 +147,11 @@ int main(void)
|
||||
fix_matrix_load(shader_plain, (float)WIDTH / HEIGHT);
|
||||
}
|
||||
|
||||
mlog("[INPUTS] Imprimiendo...\n");
|
||||
printf(input_map);
|
||||
|
||||
mlog("[MAIN LOOP] Inicializando...\n");
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
emscripten_set_main_loop(&main_loop, 60, 1);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user