+\r
+/* Every odat has a single map variant. We track the odats that have related map variants\r
+ by adding the name of the map to the end of the odat name. E.g. for an odat with name\r
+ A and map variants a,b,c we get A_a, A_b, A_c. We create new odats for each map variant*/\r
+void\r
+insert_map\r
+( uint8_t* name,\r
+ int height,\r
+ int width,\r
+ uint8_t* filepath\r
+)\r
+{\r
+ struct odat* curr_odatp;\r
+ int curr_odat_vdatid;\r
+\r
+ curr_odatp = curr_odat();\r
+\r
+ curr_odat_vdatid = curr_odatp->vdat_id;\r
+ \r
+\r
+ \r
+ if(curr_odatp->map.name[0] != 0) //odat already has a map so make a new odat\r
+ { curr_odatp = alloc_odat();\r
+ curr_odatp->vdat_id = curr_odat_vdatid;\r
+ }\r
+ /* Add a delimiter '_' in between odat name and map variant name */\r
+ u8_strcat(curr_odatp->map.name, (uint8_t*) '_'); \r
+ u8_strcat(curr_odatp->map.name, name);\r
+ \r
+ u8_strcpy(curr_odatp->map.filepath, filepath);\r
+ curr_odatp->map.height = height;\r
+ curr_odatp->map.width = width;\r
+ \r
+}\r
+ \r
+\r
+\r
+\r
+\r