You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
353 lines
17 KiB
HTML
353 lines
17 KiB
HTML
2 years ago
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<meta name="generator" content="Doxygen 1.8.5"/>
|
||
|
<title>Otter: Otter.Files Class Reference</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="resize.js"></script>
|
||
|
<script type="text/javascript" src="navtree.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(initResizable);
|
||
|
$(window).load(resizeHeight);
|
||
|
</script>
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||
|
</script>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td id="projectlogo"><img alt="Logo" src="otterlogosmall.png"/></td>
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectname">Otter
|
||
|
 <span id="projectnumber">0.9.8.91</span>
|
||
|
</div>
|
||
|
<div id="projectbrief">2d Game Development Framework based on SFML.Net</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.5 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="namespaces.html"><span>Packages</span></a></li>
|
||
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="navrow2" class="tabs2">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div><!-- top -->
|
||
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||
|
<div id="nav-tree">
|
||
|
<div id="nav-tree-contents">
|
||
|
<div id="nav-sync" class="sync"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="splitbar" style="-moz-user-select:none;"
|
||
|
class="ui-resizable-handle">
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function(){initNavTree('class_otter_1_1_files.html','');});
|
||
|
</script>
|
||
|
<div id="doc-content">
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Properties</a></div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<div class="header">
|
||
|
<div class="summary">
|
||
|
<a href="#pub-static-methods">Static Public Member Functions</a> |
|
||
|
<a href="#pub-static-attribs">Static Public Attributes</a> |
|
||
|
<a href="class_otter_1_1_files-members.html">List of all members</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<div class="title">Otter.Files Class Reference</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
|
||
|
<p>Manages files used for game assets. Can use a packed data file of paths and byte arrays. The game will attempt to use local files before the packed data file. Packed data is expected as: bool: true to continue reading, false to stop string: the path of the file that was packed int32: the size of the file that was packed bytes: the actual data from the file
|
||
|
<a href="class_otter_1_1_files.html#details">More...</a></p>
|
||
|
<table class="memberdecls">
|
||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
|
||
|
Static Public Member Functions</h2></td></tr>
|
||
|
<tr class="memitem:ad99f74f5ca167bd1cab8b1717459a18f"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_files.html#ad99f74f5ca167bd1cab8b1717459a18f">LoadPackedData</a> (string path)</td></tr>
|
||
|
<tr class="memdesc:ad99f74f5ca167bd1cab8b1717459a18f"><td class="mdescLeft"> </td><td class="mdescRight">Reads data from a uncompressed packed file <a href="#ad99f74f5ca167bd1cab8b1717459a18f">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ad99f74f5ca167bd1cab8b1717459a18f"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ad2bdce8b4f8fa1ecb7a477c5ed5ce90c"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_files.html#ad2bdce8b4f8fa1ecb7a477c5ed5ce90c">FileExists</a> (string path)</td></tr>
|
||
|
<tr class="memdesc:ad2bdce8b4f8fa1ecb7a477c5ed5ce90c"><td class="mdescLeft"> </td><td class="mdescRight">Check if a file exists, or if it has been loaded from the packed data. <a href="#ad2bdce8b4f8fa1ecb7a477c5ed5ce90c">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ad2bdce8b4f8fa1ecb7a477c5ed5ce90c"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ac63b0e4da57af7a49fc352c49a55fa1c"><td class="memItemLeft" align="right" valign="top">static Stream </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_files.html#ac63b0e4da57af7a49fc352c49a55fa1c">LoadFileStream</a> (string path)</td></tr>
|
||
|
<tr class="memdesc:ac63b0e4da57af7a49fc352c49a55fa1c"><td class="mdescLeft"> </td><td class="mdescRight">Load a file as a memory stream from local files or packed data. Probably don't use this a lot it probably is memory leak city. <a href="#ac63b0e4da57af7a49fc352c49a55fa1c">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ac63b0e4da57af7a49fc352c49a55fa1c"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ab5657cab8b3e02ec48de9073f9c67ac2"><td class="memItemLeft" align="right" valign="top">static byte[] </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_files.html#ab5657cab8b3e02ec48de9073f9c67ac2">LoadFileBytes</a> (string path)</td></tr>
|
||
|
<tr class="memdesc:ab5657cab8b3e02ec48de9073f9c67ac2"><td class="mdescLeft"> </td><td class="mdescRight">Load a file as a byte array from local files or packed data. <a href="#ab5657cab8b3e02ec48de9073f9c67ac2">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ab5657cab8b3e02ec48de9073f9c67ac2"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:acc88c605e35ff9c6176b6f449e232155"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_files.html#acc88c605e35ff9c6176b6f449e232155">IsUsingDataPack</a> (string path)</td></tr>
|
||
|
<tr class="memdesc:acc88c605e35ff9c6176b6f449e232155"><td class="mdescLeft"> </td><td class="mdescRight">Check if a file is being loaded from a local file or the packed data. Note that the game will attempt to load from local files before packed data. <a href="#acc88c605e35ff9c6176b6f449e232155">More...</a><br/></td></tr>
|
||
|
<tr class="separator:acc88c605e35ff9c6176b6f449e232155"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table><table class="memberdecls">
|
||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
|
||
|
Static Public Attributes</h2></td></tr>
|
||
|
<tr class="memitem:a0b4a5c886f9867a61c7249d06530043c"><td class="memItemLeft" align="right" valign="top">static Dictionary< string, byte[]> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_otter_1_1_files.html#a0b4a5c886f9867a61c7249d06530043c">Data</a> = new Dictionary<string, byte[]>()</td></tr>
|
||
|
<tr class="memdesc:a0b4a5c886f9867a61c7249d06530043c"><td class="mdescLeft"> </td><td class="mdescRight">The unpacked data from a packed data file. File paths mapped to byte arrays. <a href="#a0b4a5c886f9867a61c7249d06530043c">More...</a><br/></td></tr>
|
||
|
<tr class="separator:a0b4a5c886f9867a61c7249d06530043c"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:a327e05ff371bad32c17040239424eba6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a327e05ff371bad32c17040239424eba6"></a>
|
||
|
static string </td><td class="memItemRight" valign="bottom"><b>AssetsFolderPrefix</b> = "Assets/"</td></tr>
|
||
|
<tr class="separator:a327e05ff371bad32c17040239424eba6"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table>
|
||
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||
|
<div class="textblock"><p>Manages files used for game assets. Can use a packed data file of paths and byte arrays. The game will attempt to use local files before the packed data file. Packed data is expected as: bool: true to continue reading, false to stop string: the path of the file that was packed int32: the size of the file that was packed bytes: the actual data from the file </p>
|
||
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||
|
<a class="anchor" id="ad2bdce8b4f8fa1ecb7a477c5ed5ce90c"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static bool Otter.Files.FileExists </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">string </td>
|
||
|
<td class="paramname"><em>path</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Check if a file exists, or if it has been loaded from the packed data. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">path</td><td>The path to check.</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>True if the file exists or if it has been loaded from the packed data.</dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="acc88c605e35ff9c6176b6f449e232155"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static bool Otter.Files.IsUsingDataPack </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">string </td>
|
||
|
<td class="paramname"><em>path</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Check if a file is being loaded from a local file or the packed data. Note that the game will attempt to load from local files before packed data. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">path</td><td>The path to check.</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>True if the data is coming from the packed file.</dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ab5657cab8b3e02ec48de9073f9c67ac2"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static byte [] Otter.Files.LoadFileBytes </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">string </td>
|
||
|
<td class="paramname"><em>path</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Load a file as a byte array from local files or packed data. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">path</td><td>The path to load from.</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>The byte array of the data from the file.</dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ac63b0e4da57af7a49fc352c49a55fa1c"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static Stream Otter.Files.LoadFileStream </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">string </td>
|
||
|
<td class="paramname"><em>path</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Load a file as a memory stream from local files or packed data. Probably don't use this a lot it probably is memory leak city. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">path</td><td>The path to load from.</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>The stream.</dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ad99f74f5ca167bd1cab8b1717459a18f"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static void Otter.Files.LoadPackedData </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">string </td>
|
||
|
<td class="paramname"><em>path</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Reads data from a uncompressed packed file </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">path</td><td>The path to the packed data file.</td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<h2 class="groupheader">Member Data Documentation</h2>
|
||
|
<a class="anchor" id="a0b4a5c886f9867a61c7249d06530043c"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="mlabels">
|
||
|
<tr>
|
||
|
<td class="mlabels-left">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">Dictionary<string, byte[]> Otter.Files.Data = new Dictionary<string, byte[]>()</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
<td class="mlabels-right">
|
||
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>The unpacked data from a packed data file. File paths mapped to byte arrays. </p>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
||
|
<li>Otter/Utility/Cache.cs</li>
|
||
|
</ul>
|
||
|
</div><!-- contents -->
|
||
|
</div><!-- doc-content -->
|
||
|
<!-- start footer part -->
|
||
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||
|
<ul>
|
||
|
<li class="navelem"><a class="el" href="namespace_otter.html">Otter</a></li><li class="navelem"><a class="el" href="class_otter_1_1_files.html">Files</a></li>
|
||
|
<li class="footer">Generated on Thu May 12 2016 18:16:53 for Otter by
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|