Commit dedef7a4 authored by nicolas.albanesi's avatar nicolas.albanesi
Browse files

Added commands list

parent cf885463
......@@ -15,8 +15,8 @@
#include "../includes/gfx.h"
#include "../includes/elec_charge.h"
#define NB_OF_LINES 1000
#define NB_OF_CHARGES 3
#define NB_OF_LINES 250
#define NB_OF_CHARGES 2
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
......@@ -53,6 +53,12 @@ int main()
printf("SDL STUFF SUCCESSFULLY SPAWNED!\n");
}
printf("LIST OF COMMANDS : \n");
printf("- H : Heatmap view\n");
printf("- L : Line view\n");
printf("- Right Click : Change particle sign\n");
printf("- Left Click : Move particle\n");
// ! INIT CHARGES
charge_t *charges = malloc(NB_OF_CHARGES * sizeof(*charges));
......@@ -156,13 +162,13 @@ int main()
case LIGNES:
GFX_ClearScreen(renderer, COLOR_BLACK);
draw_lines(renderer, charges, lines, NB_OF_LINES);
draw_charges(renderer, charges, NB_OF_CHARGES, 10);
draw_charges(renderer, charges, NB_OF_CHARGES, 20);
SDL_RenderPresent(renderer);
state = IDLE;
break;
case HEATMAP:
draw_heatmap(renderer, charges);
draw_charges(renderer, charges, NB_OF_CHARGES, 10);
draw_charges(renderer, charges, NB_OF_CHARGES, 20);
SDL_RenderPresent(renderer);
state = IDLE;
break;
......@@ -172,7 +178,7 @@ int main()
charges[choosen_part].pos.y = (double)mouse_y / HEIGHT;
GFX_ClearScreen(renderer, COLOR_BLACK);
draw_lines(renderer, charges, lines, NB_OF_LINES);
draw_charges(renderer, charges, NB_OF_CHARGES, 10);
draw_charges(renderer, charges, NB_OF_CHARGES, 20);
SDL_RenderPresent(renderer);
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment