void get_arg(t_args *arg, t_champ *champ, unsigned char *board, int mv) { int i; t_byte tmp; arg->val = 0; tmp.full = 0; i = -1; while (++i < mv) { tmp.byte[4 - mv + i] = (*champ->instru); moving_PC(champ, board, 1); } revert_endian(&tmp.full); arg->val = tmp.full; }
template<typename T> inline void from_big_endian (T &t) { if (little_endian()) revert_endian(t); }