Adapt for OpenClonk file extensions

scancodes-fix
Armin Burgmeier 2013-01-07 21:13:40 +01:00
parent b2be39b576
commit f8a61b4a00
5 changed files with 21 additions and 21 deletions

View File

@ -136,7 +136,7 @@ static gboolean mape_disk_view_load_materials(MapeDiskView* disk_view,
gboolean overload_materials;
gboolean overload_textures;
/* Open Material.c4g group */
/* Open Material.ocg group */
gtk_tree_model_get(
disk_view->tree_store,
material_iter,
@ -172,7 +172,7 @@ static gboolean mape_disk_view_load_materials(MapeDiskView* disk_view,
group = mape_group_open_child(
parent_group,
"Material.c4g",
"Material.ocg",
error
);
@ -199,7 +199,7 @@ static gboolean mape_disk_view_load_materials(MapeDiskView* disk_view,
if(overload_materials || overload_textures)
{
/* Look for overloaded Material.c4g */
/* Look for overloaded Material.ocg */
has_parent = gtk_tree_model_iter_parent(
disk_view->tree_store,
&parent_iter,
@ -229,14 +229,14 @@ static gboolean mape_disk_view_load_materials(MapeDiskView* disk_view,
-1
);
if(mape_group_has_entry(overloaded_group, "Material.c4g") ==
if(mape_group_has_entry(overloaded_group, "Material.ocg") ==
TRUE)
{
/* TODO: Check if the group is already open!
(mape_disk_view_find_iter). */
overloaded_group = mape_group_open_child(
overloaded_group,
"Material.c4g",
"Material.ocg",
error
);
@ -455,7 +455,7 @@ static gboolean mape_disk_view_load(MapeDiskView* disk_view,
);
/* Create temporary entry to show the expander arrow */
if(g_strcasecmp(filename, "Material.c4g") != 0)
if(g_strcasecmp(filename, "Material.ocg") != 0)
{
gtk_tree_store_append(
GTK_TREE_STORE(disk_view->tree_store),
@ -469,13 +469,13 @@ static gboolean mape_disk_view_load(MapeDiskView* disk_view,
if(fileext != NULL)
{
if(g_strcasecmp(fileext, ".c4d") == 0)
if(g_strcasecmp(fileext, ".ocd") == 0)
icon_type = MAPE_FILE_ICON_C4OBJECT;
else if(g_strcasecmp(fileext, ".c4f") == 0)
else if(g_strcasecmp(fileext, ".ocf") == 0)
icon_type = MAPE_FILE_ICON_C4FOLDER;
else if(g_strcasecmp(fileext, ".c4g") == 0)
else if(g_strcasecmp(fileext, ".ocg") == 0)
icon_type = MAPE_FILE_ICON_C4GROUP;
else if(g_strcasecmp(fileext, ".c4s") == 0)
else if(g_strcasecmp(fileext, ".ocs") == 0)
icon_type = MAPE_FILE_ICON_C4SCENARIO;
}
@ -640,8 +640,8 @@ static gboolean mape_disk_view_cb_button_press_event(GtkWidget* widget,
-1
);
/* Load Material.c4g */
if(g_strcasecmp(filename, "Material.c4g") == 0)
/* Load Material.ocg */
if(g_strcasecmp(filename, "Material.ocg") == 0)
{
result = mape_disk_view_load_materials(
disk_view,
@ -1092,7 +1092,7 @@ gboolean mape_disk_view_extend_to_path(MapeDiskView* disk_view,
return FALSE;
}
if(g_ascii_strcasecmp(file, "Material.c4g") == 0)
if(g_ascii_strcasecmp(file, "Material.ocg") == 0)
{
/* Assume end of path */
result = mape_disk_view_load_materials(
@ -1132,7 +1132,7 @@ gboolean mape_disk_view_extend_to_path(MapeDiskView* disk_view,
}
}
/* All nodes expanded without opening Material.c4g */
/* All nodes expanded without opening Material.ocg */
g_strfreev(path_components);
return TRUE;
}

View File

@ -81,7 +81,7 @@ static GdkPixbuf* mape_edit_view_render_map(const gchar* source,
error,
g_quark_from_static_string("MAPE_EDIT_VIEW_ERROR"),
MAPE_EDIT_VIEW_ERROR_MISSING_MAPS,
"Material.c4g is not loaded"
"Material.ocg is not loaded"
);
return NULL;

View File

@ -671,10 +671,10 @@ mape_group_is_child_folder(MapeGroup* group,
ext = strrchr(child, '.');
if(ext != NULL)
{
if(g_ascii_strcasecmp(ext, ".c4s") == 0 ||
g_ascii_strcasecmp(ext, ".c4d") == 0 ||
g_ascii_strcasecmp(ext, ".c4f") == 0 ||
g_ascii_strcasecmp(ext, ".c4g") == 0)
if(g_ascii_strcasecmp(ext, ".o4s") == 0 ||
g_ascii_strcasecmp(ext, ".o4d") == 0 ||
g_ascii_strcasecmp(ext, ".o4f") == 0 ||
g_ascii_strcasecmp(ext, ".o4g") == 0)
{
return TRUE;
}

View File

@ -23,7 +23,7 @@
* @stability: Unstable
*
* #MapeMaterialMap is a simple GObject-based interface to C4MaterialMap.
* It supports loading a material map from a Material.c4g group file. It can
* It supports loading a material map from a Material.ocg group file. It can
* load multiple files, with newer entries overloading previous ones in case
* of name clashes to support material overloading.
**/

View File

@ -537,7 +537,7 @@ MapeWindow* mape_window_new(int argc,
for(i = 1; i < argc; ++ i)
{
basename = g_path_get_basename(argv[i]);
if(g_strcasecmp(basename, "Material.c4g") == 0)
if(g_strcasecmp(basename, "Material.ocg") == 0)
{
if(!g_path_is_absolute(argv[i]))
{