int main() { Instr instr= { HALT, 0x1337, 1, 2, 3 }; instr.operation= LW; test_instruction(instr, 1); instr.operation= SW; test_instruction(instr, 1); instr.operation= BLT; test_instruction(instr, 0); printf("Test finished!\n"); return 0; }
int launch_one_champ_pc(t_data *data, t_champion *champ, int pc, char *go) { t_pc *tmp; tmp = champ->pc; while (--pc >= 0 && tmp->next) tmp = tmp->next; if (tmp) { if (test_instruction(data, tmp)) return (1); if (tmp->next) *go = 1; else *go = 0; } return (0); }