Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct
- {
- float32 wall_vertex[2][2];
- int8 wall_texture_id[4];
- int16 wall_lightmap_id[4];
- int8 flat_texture_id[2];
- int16 flat_lightmap_id[2];
- int8 cell_type;
- int8 was_floor_negative;
- int8 was_ceil_negative;
- int8 is_lightmapped;
- } sLV_Cell__File_Only;
- typedef struct
- {
- sLV_Cell__File_Only map[LV_MAP_CELLS_COUNT];
- char wall_texture_filename[128][IO_MAX_STRING_TEX_FILENAME];
- char flat_texture_filename[128][IO_MAX_STRING_TEX_FILENAME];
- char title_01[IO_MAX_STRING_TITLE];
- char title_02[IO_MAX_STRING_TITLE];
- int16 wall_lightmaps_count;
- int16 flat_lightmaps_count;
- int8 wall_textures_count;
- int8 flat_textures_count;
- int8 player_starting_cell_x;
- int8 player_starting_cell_y;
- int8 player_starting_angle;
- } sLV_Level__File_Only;
- // WCZYTYWANIE
- FILE* file_in;
- file_in = fopen(level_filename, "rb");
- if (file_in == NULL)
- return 0;
- fread(&LV_Level__File_Only, sizeof(sLV_Level__File_Only), 1, file_in);
- fclose(file_in);
- // ZAPIS
- FILE* file_out;
- file_out = _wfopen(APP_filename, L"wb");
- int result = (int)fwrite(&APP_level_file, sizeof(sLV_Level__File_Only), 1, file_out);
- fclose(file_out);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement