first try of custom conversion

This commit is contained in:
Shadow15510 2021-05-27 18:04:45 +02:00
parent 9e26003200
commit 0df11fb8d4
6 changed files with 13 additions and 14 deletions

Binary file not shown.

Binary file not shown.

View File

@ -3,7 +3,7 @@ import fxconv
def convert(input_name, output, params, target):
if params["custom-type"] == "mutation-table":
convert_mt(map, input_name, output, params, target)
convert_mt(input_name, output, params, target)
return 0
else:
return 1
@ -17,8 +17,8 @@ def convert_mt(input_name, output, params, target):
# Encode information into bytes
data = bytes()
for i in enumerate(mutation_matrix):
for j in enumerate(i):
mutation += fxconv.u32(int(j))
for i in mutation_matrix:
for j in i:
data += fxconv.u32(int(j))
fxconv.elf(data, output, "_" + params["name"], **target)

View File

@ -1,4 +1,4 @@
1 | 0 | 0 | 0 | 6 | 0 | 0 | 0
7 | 7 | 0 | 7 | 0 | 0 | 0 | 0
0 | 0 | 0 | 0 | 7 | 0 | 0 | 0
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0

View File

@ -56,15 +56,6 @@ struct plane
};
// mutation : contain the map of the mutation available
struct mutation_table
{
// Data of the map
int data[4][8];
};
// get_inputs : detect and manage inputs
int get_inputs(const int background, int *mutation_menu);

View File

@ -13,4 +13,12 @@ void display_mutation(const struct game *current_game, const int mutation_menu,
// init_mat : copy src into dest
void init_mat(int x, int y, int dest[][x], int src[][x]);
// mutation_table : contain the map of the mutation available
struct mutation_table
{
// Data of the map
int data[4][8];
};
#endif /* _PLAGUE_DISPLAY_ENGINE_H */