I know I'll be reading writing and rewriting a lot but I think I'll be okay without the byte index since all the structures are the same size so I just need to al_fseek to start of the struct when reading/writing it.
Does that sound okay ?
/*** EDIT *****/
I've got another query hopefully someone can help with :
I was thinking that since I'm only going to be using my file editor on my machine it won't matter if the size of types is different on another, so I thought maybe I didn't need to change the code.
Then I thought, what about when the game runs on another machine ?
My struct looks like this :
4 char png_filename[ MAX_LENGTH_FOR_FRD_STRING ];
6 int type;
8 int squares_wide_on_map;
9 int squares_high_on_map;
11 int x_offset; /* the x offset from the top left square indicating where the feature is positioned */
12 int y_offset;
16 int num_layers_or_frames;
18 int ticks_per_frame;
20 int line_in_animation_specs_file;
22 int altitude;
25 int feature_has_shadow;
27 int shadow_x_offset;
28 int shadow_y_offset;
30 int feature_has_collision_map;
32 int c_x_offset;
33 int c_y_offset;
35 int has_mask;
Could this potentially cause problems when
fread( *array_of_F_REP, sizeof(F_REP), num_reps, file);
So what I'm really asking is Do I really need to rewrite the code ?