Go Back   Orbiter-Forum > Projects > ORBITER: 2010-P1 and newer > Feature
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Add oapiGetSpecialFolderPath(PathRoot root) method to API Issue Tools
issueid=936 03-29-2012 10:49 PM
Addon Developer
Add oapiGetSpecialFolderPath(PathRoot root) method to API
Add oapiGetSpecialFolderPath(PathRoot root) method to API which would allow devs to use existing directory mappings

Leaving reasons aside, as a matter of fact graphic client developers currently have to manually load and process some files in some Orbiter's "special" directories (like "Textures", "Config" and so on), which either requires us to manually process main config file to figure out these paths (correct way, but time consuming), or just hardcode them (fast, but dirty way). There is a function oapiOpenFile() which opens file and takes care of directory mappings, but with it we're forced to use Orbiter's built-in function to work with the file, and they don't support some of the features that are supported by Orbiter itself - for example config file blocks like this one:
POS -11001 0 5056
ROT 90
TEX Lpad02
So having a function like that:
const char * oapiGetSpecialFolderPath(PathRoot root);
would help us a lot since we won't have to hardcode directories or manually do a mapping. Since there is oapiOpenFile() function which does the mapping I imagine it would be pretty easy to implement requested function.

Issue Details
Issue Type Feature
Project ORBITER: 2010-P1 and newer
Status Request
Priority 1 - Highest
Suggested Version 111105
Implemented Version (none)
Votes for this feature 9
Votes against this feature 0
Assigned Users (none)
Tags (none)

07-12-2013 08:24 AM
My proposal for the API (orbiterAPI.h):

PHP Code:
// =============================================================================================
/// \defgroup FileIO File IO Functions
// =============================================================================================


   * \brief Get full path of a standard Orbiter subfolder.
   * \param root path origin to get (see notes)
   * \return full path (absolute path) of the requested folder
   * \note The root parameter determines which of Orbiter's default subfolder
   *  paths to be returned:\n
   *  - \c ROOT Orbiter main directory\n
   *  - \c CONFIG Orbiter config folder\n
   *  - \c SCENARIOS Orbiter scenarios folder\n
   *  - \c TEXTURES Orbiter standard texture folder\n
   *  - \c TEXTURES2 Orbiter high-res texture folder\n
   *  - \c MESHES Orbiter mesh folder\n
   *  - \c MODULES Orbiter module folder\n
   * \note Be careful when opening a file for writing in any of the returned
   *  standard Orbiter subfolders, any standard folder may be readonly
   *  (e.g. for CD installations)
   * \sa oapiOpenFile, oapiCloseFile
OAPIFUNC const char *oapiGetFolderPath(PathRoot root ROOT);


The only change to the original request is the function name... I skipped the 'Special' part

Issue Tools
Subscribe to this issue

All times are GMT. The time now is 05:59 AM.

Quick Links Need Help?

About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.