<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Core Resources - ClanLib Game SDK</title> <link rel="stylesheet" type="text/css" href="../../default.css"> </head> <body style="background-color: #a4daea; color: black; margin: 1em 3em 1em 3em;"> <div style="border-style: solid; border-width:thin; border-color: black;"> <div style="background-color: white; color: black; padding: .3em 1em .3em 1em; border-bottom-style: dotted; border-bottom-width: 2px;"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td align="center"> <h1> <a href="http://www.clanlib.org"><img style="border-style: none; padding-right: 130px;" src="../../gfx/clanlib.png" alt="ClanLib"></a> </h1> </td> </tr> </table> <!--<div class="menu"> <a href="index.html">News</a> <a href="intro.html">About</a> <a href="download.html">Download</a> <a href="cvs.html">CVS</a> <a class="active" href="docs.html">Docs</a> <a href="games.html">Games</a> <a href="contact.html">Contact</a> <a href="links.html">Links</a> </div>--> </div> <div style="background-color: white; padding: 1em 3em 1em 3em;"> <!-- clanlib header end --> <div style="border-bottom-style: dotted; border-bottom-width: 1px; margin-bottom: 1em;"><h2>Core Resources</h2></div> <p>ClanLib got the following core resource types:</p> <div style="border-bottom-style: dotted; border-bottom-width: 1px;"><h3><string> resource</h3></div> <pre> <string name="my_string" value="value" /> </pre> <p>String resources allow an application to easilly use text strings inside the program specified in a resource file. CL_String::load is used to extract the value specified in a string resource.</p> <div style="border-bottom-style: dotted; border-bottom-width: 1px;"><h3><integer> resource</h3></div> <pre> <integer name="my_integer" value="value" /> </pre> <p>Integer resources work the same way a string resources, except they contain integer values instead of string values and are retrieved using CL_Integer.</p> <div style="border-bottom-style: dotted; border-bottom-width: 1px;"><h3><float> resource</h3></div> <pre> <float name="my_float" value="value" /> </pre> <p>Float resources work the same way a string resources, except they contain float values instead of string values and are retrieved using CL_Float.</p> <div style="border-bottom-style: dotted; border-bottom-width: 1px;"><h3><boolean> resource</h3></div> <pre> <boolean name="my_boolean" value="value" /> </pre> <p>Boolean resources work just like the integer resource, but for booleans and via CL_Boolean instead.</p> <div style="border-bottom-style: dotted; border-bottom-width: 1px;"><h3><raw> resource</h3></div> <pre> <raw name="my_raw" file="filename" /> </pre> <p>The raw resource is a way to access a file via the resource system. A <raw> resource is accessed inside ClanLib using the CL_Raw class. In CL_Raw the file is accessable as a std::vector<unsigned char> (binary array). Alternatively the data can be used as an input source by constructing a CL_InputSource_Raw object.</p> <!-- clanlib footer begin --> <div style="margin-top: 0em; text-align: center; color: #a0a0a0; border-top-style: dotted; border-top-width: 1px;"> Questions or comments, write to the <a href="http://clanlib.org/contact.html">ClanLib mailing list</a>. </div> </div> </div> </body> </html>