Small fixes for the example
This commit is contained in:
parent
7119ca1050
commit
02c350de9a
3 changed files with 27 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
HEPTC=../../compiler/heptc.byte
|
||||
HEPTC_OPTIONS=
|
||||
HEPTC_OPTIONS=-memalloc
|
||||
|
||||
GCC=gcc
|
||||
GCC_OPTIONS="-std=c99 -I ../../../lib/c"
|
||||
GCC_OPTIONS="-g -O2 -std=c99 -I ../../../lib/c"
|
||||
|
||||
VERBOSE=1
|
||||
|
||||
|
|
|
@ -11,6 +11,11 @@ void print_mission_track(TypeArray__tmissiontracksarray mt) {
|
|||
}
|
||||
}
|
||||
|
||||
/* fighterdebug(res, rdronoffclicked, iffonoffclicked)
|
||||
res est le reset: mettre a 1 le premier coup puis a 0
|
||||
|
||||
*/
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
int step_c;
|
||||
int step_max;
|
||||
|
@ -29,9 +34,26 @@ int main(int argc, char** argv) {
|
|||
};
|
||||
Debug__fighterdebug_reset(&_mem);
|
||||
|
||||
Debug__fighterdebug_step(true, false, false, &_res, &_mem);
|
||||
Debug__fighterdebug_step(false, false, false, &_res, &_mem);
|
||||
Debug__fighterdebug_step(false, true, false, &_res, &_mem);
|
||||
Debug__fighterdebug_step(false, false, false, &_res, &_mem);
|
||||
Debug__fighterdebug_step(false, false, false, &_res, &_mem);
|
||||
Debug__fighterdebug_step(false, true, false, &_res, &_mem);
|
||||
Debug__fighterdebug_step(false, false, true, &_res, &_mem);
|
||||
Debug__fighterdebug_step(false, false, false, &_res, &_mem);
|
||||
Debug__fighterdebug_step(false, false, true, &_res, &_mem);
|
||||
Debug__fighterdebug_step(false, false, false, &_res, &_mem);
|
||||
|
||||
printf("init:\n");
|
||||
printf("=> \n");
|
||||
print_mission_track(_res.missiontracks);
|
||||
fflush(stdout);
|
||||
|
||||
while ((!(step_max)||(step_c<step_max))) {
|
||||
step_c = (step_c+1);
|
||||
|
||||
/*
|
||||
printf("res ? ");
|
||||
scanf("%d", &res);;
|
||||
|
||||
|
@ -40,11 +62,12 @@ int main(int argc, char** argv) {
|
|||
|
||||
printf("iffonoffclicked ? ");
|
||||
scanf("%d", &iffonoffclicked);;
|
||||
*/
|
||||
|
||||
Debug__fighterdebug_step(res, rdronoffclicked, iffonoffclicked, &_res,
|
||||
&_mem);
|
||||
printf("=> \n");
|
||||
print_mission_track(_res.missiontracks);
|
||||
puts("");
|
||||
fflush(stdout);
|
||||
};
|
||||
return 0;
|
||||
|
|
|
@ -239,7 +239,7 @@ let
|
|||
0., 0., 0., 0., 0))(); *)
|
||||
(sloperad, speedt, x0, y0, id) =
|
||||
if res then createtracks_createonetrack_init_rand()
|
||||
else (0.0, 0.0, 0.0, 0.0, 0) -> pre (sloperad, speedt, x0, y0, id);
|
||||
else (0.0, 0.0, 0.0, 0.0, 0) fby (sloperad, speedt, x0, y0, id);
|
||||
l18 = y0 -> Mathext.sinr(sloperad) *. speedt +. (y0 -> pre l18);
|
||||
l9 = x0 -> (x0 -> pre l9) +. speedt *. Mathext.cosr(sloperad);
|
||||
track = { t_pos = { x = l9; y = l18 }; t_id = id };
|
||||
|
|
Loading…
Reference in a new issue