Returns a type string for the given filename extension
| 240 | |
| 241 | // Returns a type string for the given filename extension |
| 242 | void CHogEditView::GetFileType(char *type, char *filename) { |
| 243 | char ext[PSFILENAME_LEN + 1]; |
| 244 | _splitpath(filename, NULL, NULL, NULL, ext); |
| 245 | |
| 246 | if (!strcmp(ext, ".ogf")) { |
| 247 | strcpy(type, "Outrage Graphics File"); |
| 248 | return; |
| 249 | } |
| 250 | if (!strcmp(ext, ".oof")) { |
| 251 | strcpy(type, "Outrage Object File"); |
| 252 | return; |
| 253 | } |
| 254 | if (!strcmp(ext, ".oaf")) { |
| 255 | strcpy(type, "Outrage Animation File"); |
| 256 | return; |
| 257 | } |
| 258 | if (!strcmp(ext, ".orf")) { |
| 259 | strcpy(type, "Outrage Room File"); |
| 260 | return; |
| 261 | } |
| 262 | if (!strcmp(ext, ".wav")) { |
| 263 | strcpy(type, "Sound File"); |
| 264 | return; |
| 265 | } |
| 266 | if (!strcmp(ext, ".scr")) { |
| 267 | strcpy(type, "Script File"); |
| 268 | return; |
| 269 | } |
| 270 | if (!strcmp(ext, ".d3x")) { |
| 271 | strcpy(type, "D3X Object Code"); |
| 272 | return; |
| 273 | } |
| 274 | if (!strcmp(ext, ".inf")) { |
| 275 | strcpy(type, "Misc Config File"); |
| 276 | return; |
| 277 | } |
| 278 | |
| 279 | // Default |
| 280 | strcpy(type, "Unknown"); |
| 281 | } |
| 282 | |
| 283 | void CHogEditView::OnActionInsert() { |
| 284 | // TODO: Add your command handler code here |
nothing calls this directly
no test coverage detected