- irr::io::IFileArchive** retArchiveReference = 0;
- if (!scm_is_false (ret_archive))
- {
- irr::io::IFileArchive* retArchive = unwrap_file_archive (ret_archive);
- retArchiveReference = &retArchive;
- }
- irr::io::IFileSystem* file_system = unwrap_file_system (wrapped_file_system);
- return scm_from_bool
- (file_system->addFileArchive (scm_to_utf8_stringn (filename, NULL),
- scm_to_bool (ignore_case),
- scm_to_bool (ignore_paths),
- scm_to_file_archive_type (archive_type),
- scm_to_utf8_stringn (password, NULL),
- retArchiveReference));
- }
-
- SCM
- irr_getFileSystem (SCM wrapped_obj)
- {
- irr::io::IFileSystem* file_system;
- if (gui_environment_p (wrapped_obj))
- {
- file_system = unwrap_gui_environment (wrapped_obj)->getFileSystem ();
- }
- else if (device_p (wrapped_obj))
- {
- file_system = unwrap_device (wrapped_obj)->getFileSystem ();
- }
- else if (scene_manager_p (wrapped_obj))
- {
- file_system = unwrap_scene_manager (wrapped_obj)->getFileSystem ();
- }
- else
- {
- scm_error (scm_arg_type_key, NULL, "Cannot get file system from object: ~S",
- scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj));
- }
- return wrap_file_system (file_system);
- }