Ticket #423: 423.patch
File 423.patch, 86.2 KB (added by , 14 years ago) |
---|
-
docs/doxygen/config
3 3 4 4 TAB_SIZE = 4 5 5 6 INPUT = ../../source /simulation2 ../../source/scriptinterface ../../source/network ../../source/gui6 INPUT = ../../source 7 7 INCLUDE_PATH = ../../source 8 8 EXAMPLE_PATH = ../../source 9 9 RECURSIVE = YES 10 10 EXCLUDE_PATTERNS = */.svn* */tests/test_* 11 EXCLUDE = ../../source/dcdt ../../source/tools ../../source/i18n/tests2 11 EXCLUDE = ../../source/dcdt ../../source/tools ../../source/i18n/tests2 ../../source/simulation 12 12 13 13 JAVADOC_AUTOBRIEF = YES 14 14 … … 23 23 24 24 MACRO_EXPANSION = YES 25 25 EXPAND_ONLY_PREDEF = YES 26 PREDEFINED = "UNUSED(x)=x" 26 PREDEFINED = "UNUSED(x)=x" \ 27 "METHODDEF(x)=static x" \ 28 "GLOBAL(x)=x" 27 29 EXPAND_AS_DEFINED += DEFAULT_COMPONENT_ALLOCATOR DEFAULT_SCRIPT_WRAPPER DEFAULT_INTERFACE_WRAPPER DEFAULT_MESSAGE_IMPL 28 EXPAND_AS_DEFINED += MESSAGE INTERFACE COMPONENT 30 EXPAND_AS_DEFINED += MESSAGE INTERFACE COMPONENT GUISTDTYPE 31 32 WARN_LOGFILE = doxygen.log -
source/collada/CommonConvert.h
66 66 67 67 /** 68 68 * Standard document loader. Based on FCDocument::LoadFromText, but allows 69 * access to <extra> nodes at the document level (i.e. directly in <COLLADA>).69 * access to \<extra\> nodes at the document level (i.e. directly in \<COLLADA\>). 70 70 */ 71 71 class FColladaDocument 72 72 { … … 81 81 /** Returns the FCDocument that was loaded. */ 82 82 FCDocument* GetDocument() const { return document.get(); } 83 83 84 /** Returns the <extra> data from the <COLLADA> element. */84 /** Returns the \<extra\> data from the \<COLLADA\> element. */ 85 85 FCDExtra* GetExtra() const { return extra.get(); } 86 86 87 87 private: -
source/collada/StdSkeletons.h
84 84 /** 85 85 * Initialises the global state with skeleton data loaded from the 86 86 * given XML data. Must only be called once. 87 * (TODO: stop using global state.) 87 * @todo Stop using global state. 88 * @param xmlData 89 * @param xmlLength 88 90 * @param xmlErrors output - XML parser error messages; will be non-empty 89 * on failure (and failure will always throw)91 * on failure (and failure will always throw) 90 92 * @throws ColladaException on failure 91 93 */ 92 94 static void LoadSkeletonDataFromXml(const char* xmlData, size_t xmlLength, std::string& xmlErrors); -
source/graphics/ColladaManager.h
36 36 * Performs a (cached) conversion from COLLADA if necessary. 37 37 * 38 38 * @param pathnameNoExtension path and name, minus extension, of file to load. 39 * One of either "sourceName.pmd" or "sourceName.dae" should exist. 39 * One of either "sourceName.pmd" or "sourceName.dae" should exist. 40 * @param type FileType, .pmd or .psa 40 41 * 41 42 * @return full VFS path (including extension) of file to load; or empty 42 43 * string if there was a problem and it could not be loaded. -
source/graphics/UnitManager.cpp
125 125 126 126 /////////////////////////////////////////////////////////////////////////////// 127 127 // CreateUnit: create a new unit and add it to the world 128 CUnit* CUnitManager::CreateUnit(const CStrW& actorName, const std::set<CStr >& selections)128 CUnit* CUnitManager::CreateUnit(const CStrW& actorName, const std::set<CStr8>& selections) 129 129 { 130 130 if (! m_ObjectManager) 131 131 return NULL; -
source/gui/CGUI.h
155 155 * @param DefaultColor Color used if no tag applied. 156 156 * @param pos position 157 157 * @param z z value. 158 * @param clipping 158 159 */ 159 160 void DrawText(SGUIText &Text, const CColor &DefaultColor, 160 161 const CPos &pos, const float &z, const CRect &clipping); … … 242 243 * can be changed by tags. 243 244 * @param Width Width, 0 if no word-wrapping. 244 245 * @param BufferZone space between text and edge, and space between text and images. 245 * 246 * pObject is *only* if error parsing fails, and we need to be able to output 247 * which object the error occured in to aid the user. The parameter is completely 248 * optional. 246 * @param pObject Optional parameter for error output. Used *only* if error parsing fails, 247 * and we need to be able to output which object the error occured in to aid the user. 249 248 */ 249 250 250 SGUIText GenerateText(const CGUIString &Text, const CStr& Font, 251 251 const float &Width, const float &BufferZone, 252 252 const IGUIObject *pObject=NULL); … … 370 370 * @param Element The Xeromyces object that represents 371 371 * the objects-tag. 372 372 * @param pFile The Xeromyces object for the file being read 373 * @param Paths 373 374 * 374 375 * @see LoadXmlFile() 375 376 */ … … 448 449 * @param Element The Xeromyces object that represents 449 450 * the script-tag. 450 451 * @param pFile The Xeromyces object for the file being read 452 * @param Paths 451 453 * 452 454 * @see LoadXmlFile() 453 455 */ -
source/gui/CGUISprite.h
120 120 121 121 /** 122 122 * The GUI sprite, is actually several real sprites (images) 123 * like a collage. View the section <sprites> in the GUI123 * like a collage. View the section \<sprites\> in the GUI 124 124 * TDD for more information. 125 125 * 126 126 * Drawing routine is located in CGUI -
source/gui/CList.h
111 111 virtual void SelectLastElement(); 112 112 113 113 /** 114 * Handle the <item> tag.114 * Handle the \<item\> tag. 115 115 */ 116 116 virtual bool HandleAdditionalChildren(const XMBElement& child, CXeromyces* pFile); 117 117 -
source/gui/GUIbase.h
68 68 // Types 69 69 //-------------------------------------------------------- 70 70 /** 71 * @enum EGUIMessage 71 * @enum EGUIMessageType 72 72 * Message types 73 73 * 74 74 * @see SGUIMessage -
source/gui/GUItext.h
291 291 * @param from From character n, 292 292 * @param to to character n. 293 293 * @param FirstLine Whether this is the first line of text, to calculate its height correctly 294 * 295 * pObject Only for Error outputting, optional! If NULL 296 * then no Errors will be reported! Useful when you need 297 * to make several GenerateTextCall in different phases, 298 * it avoids duplicates. 294 * @param pObject Only for Error outputting, optional! If NULL 295 * then no Errors will be reported! Useful when you need 296 * to make several GenerateTextCall in different phases, 297 * it avoids duplicates. 299 298 */ 300 299 void GenerateTextCall(SFeedback &Feedback, 301 300 const CStr& DefaultFont, -
source/gui/GUIutil.h
140 140 /** 141 141 * Retrieves a setting by settings name and object name 142 142 * 143 * @param GUI GUI Object const ref143 * @param GUIinstance GUI Object const ref 144 144 * @param Object Object name 145 145 * @param Setting Setting by name 146 146 * @param Value Stores value here, note type T! … … 165 165 * This is just a wrapper so that we can type the object name 166 166 * and not input the actual pointer. 167 167 * 168 * @param GUI GUI Object, reference since we'll be changing values168 * @param GUIinstance GUI Object, reference since we'll be changing values 169 169 * @param Object Object name 170 170 * @param Setting Setting by name 171 171 * @param Value Sets value to this, note type T! 172 * @param SkipMessage Set to true to HandleMessage 172 173 */ 173 174 static PSRETURN SetSetting( 174 175 CGUI &GUIinstance, const CStr& Object, -
source/gui/IGUIObject.h
255 255 */ 256 256 void CheckSettingsValidity(); 257 257 258 /// @cond Skiping Documentation Block for disabled method 258 259 /** 259 260 * Sets up a map_size_t to include the variables in m_BaseSettings 260 261 * 261 262 * @param SettingsInfo Pointers that should be filled with base variables 262 263 */ 264 /// @endcond 263 265 //void SetupBaseSettingsInfo(map_Settings &SettingsInfo); 264 266 265 267 /** … … 269 271 * 270 272 * @param Setting Setting by name 271 273 * @param Value Value to set to 274 * @param SkipMessage 272 275 * 273 276 * @return PSERROR (PSRETURN_OK if successful) 274 277 */ … … 416 419 /** 417 420 * Same as reference, but returns a const 418 421 */ 419 // IGUIObject const *GetParent() const;422 // IGUIObject const *GetParent() const; 420 423 424 /// @cond Excluding the block from documentation since the method is disabled 421 425 /** 422 426 * You input the setting struct you want, and it will return a pointer to 423 427 * the struct. 424 428 * 425 429 * @param SettingsStruct tells us which pointer ot return 426 430 */ 431 /// @endcond 432 427 433 //virtual void *GetStructPointer(const EGUISettingsStruct &SettingsStruct) const; 434 428 435 429 436 /** 430 437 * Get Mouse from CGUI. … … 500 507 * 501 508 * @return the error result 502 509 */ 503 PSRETURN LogInvalidSettings(const CStr & Setting) const;510 PSRETURN LogInvalidSettings(const CStr8& Setting) const; 504 511 505 512 // Variables 506 513 -
source/gui/IGUIScrollBar.h
177 177 /** 178 178 * Hovering the scroll minus button 179 179 * 180 * @param m _x mousex181 * @param m _y mousey180 * @param mouse x m_x 181 * @param mouse y m_y 182 182 * @return True if mouse positions are hovering the button 183 183 */ 184 184 virtual bool HoveringButtonMinus(const CPos& UNUSED(mouse)) { return false; } … … 186 186 /** 187 187 * Hovering the scroll plus button 188 188 * 189 * @param m _x mousex190 * @param m _y mousey189 * @param mouse x m_x 190 * @param mouse y m_y 191 191 * @return True if mouse positions are hovering the button 192 192 */ 193 193 virtual bool HoveringButtonPlus(const CPos& UNUSED(mouse)) { return false; } … … 289 289 290 290 /** 291 291 * Set bar pressed 292 * @param pressedTrue if bar is pressed292 * @param b True if bar is pressed 293 293 */ 294 294 void SetBarPressed(const bool &b) { m_BarPressed = b; } 295 295 -
source/gui/IGUITextOwner.h
82 82 * Draws the Text. 83 83 * 84 84 * @param index Index value of text. Mostly this will be 0 85 * @param color 85 86 * @param pos Position 86 87 * @param z Z value 87 88 * @param clipping Clipping rectangle, don't even add a parameter -
source/gui/scripting/JSInterface_GUITypes.cpp
21 21 #include "ps/CStr.h" 22 22 23 23 /**** GUISize ****/ 24 25 24 JSClass JSI_GUISize::JSI_class = { 26 25 "GUISize", 0, 27 26 JS_PropertyStub, JS_PropertyStub, -
source/lib/allocators/allocators.h
58 58 /** 59 59 * free a previously allocated page-aligned region. 60 60 * 61 * @param p exact value returned from page_aligned_alloc62 * @param size exact value passed to page_aligned_alloc61 * @param p Exact value returned from page_aligned_alloc 62 * @param unaligned_size Exact value passed to page_aligned_alloc 63 63 **/ 64 64 LIB_API void page_aligned_free(void* p, size_t unaligned_size); 65 65 … … 133 133 //----------------------------------------------------------------------------- 134 134 135 135 /** 136 * Allocate <size> bytes of zeroed memory.136 * Allocate \<size\> bytes of zeroed memory. 137 137 * 138 138 * intended for applications that frequently alloc/free a single 139 139 * fixed-size object. caller provides static storage and an in-use flag; … … 143 143 * 144 144 * note: thread-safe despite use of shared static data. 145 145 * 146 * @param storage Caller-allocated memory of at least <size> bytes146 * @param storage Caller-allocated memory of at least \<size\> bytes 147 147 * (typically a static array of bytes) 148 * @param in_use_flag Pointer to a flag we set when <storage> is in-use.148 * @param in_use_flag Pointer to a flag we set when \<storage\> is in-use. 149 149 * @param size [bytes] to allocate 150 * @return allocated memory (typically = <storage>, but falls back to150 * @return allocated memory (typically = \<storage\>, but falls back to 151 151 * malloc if that's in-use), or 0 (with warning) if out of memory. 152 152 **/ 153 153 extern void* single_calloc(void* storage, volatile intptr_t* in_use_flag, size_t size); … … 157 157 * 158 158 * @param storage Exact value passed to single_calloc. 159 159 * @param in_use_flag Exact value passed to single_calloc. 160 * @param Exact value returned by single_calloc.160 * @param p Exact value returned by single_calloc. 161 161 **/ 162 162 extern void single_free(void* storage, volatile intptr_t* in_use_flag, void* p); 163 163 … … 218 218 void* end; 219 219 }; 220 220 221 // define <size> bytes of storage and prepare <name> for use with221 // define \<size\> bytes of storage and prepare <name> for use with 222 222 // static_calloc. 223 223 // must be invoked from file or function scope. 224 224 #define STATIC_STORAGE(name, size)\ … … 271 271 wrapper code in release builds and re-write when looking for overruns. 272 272 273 273 example usage: 274 OverrunProtector <your_class> your_class_wrapper;274 OverrunProtector\<your_class\> your_class_wrapper; 275 275 .. 276 276 your_class* yc = your_class_wrapper.get(); // unlock, make ready for use 277 277 if(!yc) // your_class_wrapper's one-time alloc of a your_class- -
source/lib/allocators/bucket.h
69 69 /** 70 70 * ready the Bucket object for use. 71 71 * 72 * @param Bucket*72 * @param b Bucket* 73 73 * @param el_size 0 to allow variable-sized allocations (which cannot be 74 74 * freed individually); otherwise, it specifies the number of bytes that 75 75 * will be returned by bucket_alloc (whose size parameter is then ignored). … … 78 78 LIB_API LibError bucket_create(Bucket* b, size_t el_size); 79 79 80 80 /** 81 * free all memory that ensued from <b>.81 * free all memory that ensued from \<b\>. 82 82 * 83 83 * future alloc and free calls on this Bucket will fail. 84 84 * 85 * @param Bucket*85 * @param b Bucket* 86 86 **/ 87 87 LIB_API void bucket_destroy(Bucket* b); 88 88 … … 90 90 * Dole out memory from the Bucket. 91 91 * exhausts the freelist before returning new entries to improve locality. 92 92 * 93 * @param Bucket*93 * @param b Bucket* 94 94 * @param size bytes to allocate; ignored if bucket_create's el_size was not 0. 95 95 * @return allocated memory, or 0 if the Bucket would have to be expanded and 96 96 * there isn't enough memory to do so. … … 106 106 * rationale: avoids having to pass el_size here and compare with size when 107 107 * allocating; also prevents fragmentation and leaking memory. 108 108 * 109 * @param Bucket*109 * @param b Bucket* 110 110 * @param el entry allocated via bucket_alloc. 111 111 **/ 112 112 LIB_API void bucket_free(Bucket* b, void* el); -
source/lib/allocators/dynarray.h
69 69 * 70 70 * use-after-free is impossible because the memory is unmapped. 71 71 * 72 * @param DynArray* da;zeroed afterwards.72 * @param da DynArray* zeroed afterwards. 73 73 * @return LibError 74 74 **/ 75 75 LIB_API LibError da_free(DynArray* da); … … 86 86 LIB_API LibError da_set_size(DynArray* da, size_t new_size); 87 87 88 88 /** 89 * Make sure at least <size> bytes starting at da->pos are committed and89 * Make sure at least \<size\> bytes starting at da-\>pos are committed and 90 90 * ready for use. 91 91 * 92 * @param DynArray*92 * @param da DynArray* 93 93 * @param size Minimum amount to guarantee [bytes] 94 94 * @return LibError 95 95 **/ -
source/lib/allocators/pool.h
56 56 }; 57 57 58 58 /** 59 * pass as pool_create's <el_size> param to indicate variable-sized allocs59 * pass as pool_create's \<el_size\> param to indicate variable-sized allocs 60 60 * are required (see below). 61 61 **/ 62 62 const size_t POOL_VARIABLE_ALLOCS = ~(size_t)0u; … … 64 64 /** 65 65 * Ready Pool for use. 66 66 * 67 * @param Pool*67 * @param p Pool* 68 68 * @param max_size Max size [bytes] of the Pool; this much 69 69 * (rounded up to next page multiple) virtual address space is reserved. 70 70 * no virtual memory is actually committed until calls to pool_alloc. … … 84 84 * impossible because it is marked not-present via MMU. 85 85 * (* no matter if in freelist or unused or "allocated" to user) 86 86 * 87 * @param Pool*87 * @param p Pool* 88 88 * @return LibError. 89 89 **/ 90 90 LIB_API LibError pool_destroy(Pool* p); … … 94 94 * 95 95 * this is useful for callers that use several types of allocators. 96 96 * 97 * @param Pool* 97 * @param p Pool* 98 * @param el 98 99 * @return bool. 99 100 **/ 100 101 LIB_API bool pool_contains(const Pool* p, void* el); … … 103 104 * Dole out memory from the pool. 104 105 * exhausts the freelist before returning new entries to improve locality. 105 106 * 106 * @param Pool*107 * @param p Pool* 107 108 * @param size bytes to allocate; ignored if pool_create's el_size was not 0. 108 109 * @return allocated memory, or 0 if the Pool would have to be expanded and 109 110 * there isn't enough memory to do so. … … 117 118 * rationale: avoids having to pass el_size here and compare with size when 118 119 * allocating; also prevents fragmentation and leaking memory. 119 120 * 120 * @param Pool*121 * @param p Pool* 121 122 * @param el Element returned by pool_alloc. 122 123 **/ 123 124 LIB_API void pool_free(Pool* p, void* el); … … 128 129 * this resets it as if freshly pool_create-d, but doesn't release the 129 130 * underlying reserved virtual memory. 130 131 * 131 * @param Pool*132 * @param p Pool* 132 133 **/ 133 134 LIB_API void pool_free_all(Pool* p); 134 135 -
source/lib/base32.h
30 30 /** 31 31 * generate the base32 textual representation of a buffer. 32 32 * 33 * @param len size [bytes] of input34 * @param big-endian input data (assumed to be integral number of bytes)35 * @param out put string; zero-terminated. must be big enough33 * @param len Size [bytes] of input 34 * @param in Big-endian input data (assumed to be integral number of bytes) 35 * @param out Output string; zero-terminated. must be big enough 36 36 * (i.e. at least ceil(len*CHAR_BIT/5) + 1 chars) 37 37 **/ 38 38 extern void base32(const size_t len, const u8* in, u8* out); -
source/lib/bits.h
28 28 #define INCLUDED_BITS 29 29 30 30 /** 31 * value of bit number <n>.31 * value of bit number \<n\>. 32 32 * 33 33 * @param n bit index. 34 34 * … … 44 44 } 45 45 46 46 /** 47 * pretty much the same as Bit <unsigned>.47 * pretty much the same as Bit\<unsigned\>. 48 48 * this is intended for the initialization of enum values, where a 49 49 * compile-time constant is required. 50 50 **/ 51 51 #define BIT(n) (1u << (n)) 52 52 53 54 53 template<typename T> 55 54 bool IsBitSet(T value, size_t index) 56 55 { … … 67 66 /** 68 67 * a mask that includes the lowest N bits 69 68 * 70 * @param num _bits number of bits in mask69 * @param numBits Number of bits in mask. 71 70 **/ 72 71 template<typename T> 73 72 T bit_mask(size_t numBits) … … 162 161 * floor(log2(f)) 163 162 * fast, uses the FPU normalization hardware. 164 163 * 165 * @param f(float) input; MUST be > 0, else results are undefined.164 * @param x (float) input; MUST be > 0, else results are undefined. 166 165 * @return floor of the base-2 logarithm (i.e. rounded down). 167 166 **/ 168 167 extern int floor_log2(const float x); … … 179 178 /** 180 179 * round number up/down to the next given multiple. 181 180 * 182 * @param multiple: must be a power of two. 181 * @param n Number to round. 182 * @param multiple Must be a power of two. 183 183 **/ 184 184 template<typename T> 185 185 T round_up(T n, T multiple) -
source/lib/byte_order.h
113 113 LIB_API void write_be64(void* p, u64 x); /// see write_be16 114 114 115 115 /** 116 * zero-extend <size> (truncated to 8) bytes of little-endian data to u64,117 * starting at address <p> (need not be aligned).116 * zero-extend \<size\> (truncated to 8) bytes of little-endian data to u64, 117 * starting at address \<p\> (need not be aligned). 118 118 **/ 119 119 LIB_API u64 movzx_le64(const u8* p, size_t size); 120 120 LIB_API u64 movzx_be64(const u8* p, size_t size); 121 121 122 122 /** 123 * sign-extend <size> (truncated to 8) bytes of little-endian data to i64,124 * starting at address <p> (need not be aligned).123 * sign-extend \<size\> (truncated to 8) bytes of little-endian data to i64, 124 * starting at address \<p\> (need not be aligned). 125 125 **/ 126 126 LIB_API i64 movsx_le64(const u8* p, size_t size); 127 127 LIB_API i64 movsx_be64(const u8* p, size_t size); -
source/lib/code_annotation.h
124 124 #define UID2__ PASTE3__(LINE_, __LINE__, _2) 125 125 126 126 /** 127 * compile-time debug_assert. causes a compile error if the expression 128 * evaluates to zero/false. 127 * @param expr Expression that is expected to evaluate to non-zero at compile-time. 128 * Compile-time debug_assert. Causes a compile error if the expression 129 * evaluates to zero/false. 129 130 * 130 * no runtime overhead; may be used anywhere, including file scope. 131 * especially useful for testing sizeof types. 132 * 133 * @param expression that is expected to evaluate to non-zero at compile-time. 131 * No runtime overhead; may be used anywhere, including file scope. 132 * Especially useful for testing sizeof types. 134 133 **/ 135 134 #define cassert(expr) typedef static_assert_<(expr)>::type UID__ 136 135 template<bool> struct static_assert_; … … 140 139 }; 141 140 142 141 /** 143 * compile-time debug_assert. causes a compile error if the expression 144 * evaluates to zero/false. 142 *@copydoc cassert(expr) 145 143 * 146 * no runtime overhead; may be used anywhere, including file scope. 147 * especially useful for testing sizeof types. 148 * 149 * this version has a less helpful error message, but redefinition doesn't 144 * This version has a less helpful error message, but redefinition doesn't 150 145 * trigger warnings. 151 *152 * @param expression that is expected to evaluate to non-zero at compile-time.153 146 **/ 154 147 #define cassert2(expr) extern u8 CASSERT_FAILURE[1][(expr)] 155 148 -
source/lib/debug.h
65 65 * write a formatted string to the debug channel, subject to filtering 66 66 * (see below). implemented via debug_puts - see performance note there. 67 67 * 68 * @param f ormat string and varargs; see printf.68 * @param fmt Format string and varargs; see printf. 69 69 **/ 70 70 LIB_API void debug_printf(const wchar_t* fmt, ...) WPRINTF_ARGS(1); 71 71 … … 188 188 * depending on "debug level", because changing that entails lengthy 189 189 * compiles and it's too coarse-grained. instead, we require all 190 190 * strings to start with "tag_string|" (exact case and no quotes; 191 * the alphanumeric-only <tag_string> identifies output type).191 * the alphanumeric-only \<tag_string\> identifies output type). 192 192 * they are then subject to filtering: only if the tag has been 193 193 * "added" via debug_filter_add is the appendant string displayed. 194 194 * … … 231 231 * write to memory buffer (fast) 232 232 * used for "last activity" reporting in the crashlog. 233 233 * 234 * @param f ormat string and varags; see printf.234 * @param fmt Format string and varags; see printf. 235 235 **/ 236 236 LIB_API void debug_wprintf_mem(const wchar_t* fmt, ...) WPRINTF_ARGS(1); 237 237 … … 253 253 //----------------------------------------------------------------------------- 254 254 255 255 /** 256 * make sure the expression <expr> evaluates to non-zero. used to validate256 * make sure the expression \<expr\> evaluates to non-zero. used to validate 257 257 * invariants in the program during development and thus gives a 258 258 * very helpful warning if something isn't going as expected. 259 259 * sprinkle these liberally throughout your code! … … 267 267 * - consistency (everything here is prefixed with debug_) and 268 268 * - to avoid inadvertent use of the much less helpful built-in CRT assert. 269 269 * if we were to override assert, it would be difficult to tell whether 270 * user source has included <assert.h> (possibly indirectly via other270 * user source has included \<assert.h\> (possibly indirectly via other 271 271 * headers) and thereby stomped on our definition. 272 272 **/ 273 273 #define debug_assert(expr) \ … … 407 407 408 408 409 409 /** 410 * maximum number of characters (including trailing\0) written to410 * Maximum number of characters (including trailing \\0) written to 411 411 * user's buffers by debug_ResolveSymbol. 412 412 **/ 413 413 const size_t DBG_SYMBOL_LEN = 1000; … … 437 437 * write a complete stack trace (including values of local variables) into 438 438 * the specified buffer. 439 439 * 440 * @param buf target buffer441 * @param max _chars of buffer (should be several thousand)442 * @param context platform-specific representation of execution state443 * (e.g. Win32 CONTEXT). if not NULL, tracing starts there; this is useful444 * for exceptions. otherwise, tracing starts from the current call stack.445 * @param lastFuncToSkip is used for omitting error-reporting functions like446 * debug_OnAssertionFailure from the stack trace. it is either 0 (skip nothing) or447 * a substring of a function's name (this allows platform-independent448 * matching of stdcall-decorated names).449 * rationale: this is safer than specifying a fixed number of frames,450 * which can be incorrect due to inlining.440 * @param buf Target buffer. 441 * @param maxChars Max chars of buffer (should be several thousand). 442 * @param context Platform-specific representation of execution state 443 * (e.g. Win32 CONTEXT). if not NULL, tracing starts there; this is useful 444 * for exceptions. Otherwise, tracing starts from the current call stack. 445 * @param lastFuncToSkip Is used for omitting error-reporting functions like 446 * debug_OnAssertionFailure from the stack trace. It is either 0 (skip nothing) or 447 * a substring of a function's name (this allows platform-independent 448 * matching of stdcall-decorated names). 449 * Rationale: this is safer than specifying a fixed number of frames, 450 * which can be incorrect due to inlining. 451 451 * @return LibError; ERR::REENTERED if reentered via recursion or 452 * multithreading (not allowed since static data is used).452 * multithreading (not allowed since static data is used). 453 453 **/ 454 454 LIB_API LibError debug_DumpStack(wchar_t* buf, size_t maxChars, void* context, const wchar_t* lastFuncToSkip); 455 455 … … 523 523 /** 524 524 * free memory from the error message. 525 525 * 526 * @param ErrorMessageMem*526 * @param emm ErrorMessageMem* 527 527 **/ 528 528 LIB_API void debug_FreeErrorMessage(ErrorMessageMem* emm); 529 529 -
source/lib/debug_stl.h
40 40 * reduce complicated STL symbol names to human-readable form. 41 41 * 42 42 * algorithm: remove/replace undesired substrings in one pass (fast). 43 * example: "std::basic_string <char, char_traits<char>,44 * std::allocator <char> >" => "string".43 * example: "std::basic_string\<char\>, char_traits\<char\>, 44 * std::allocator\<char\> "\>" =\> "string". 45 45 * 46 * @param buffer holding input symbol name; modified in-place.47 * there is no length limit; must be large enough to hold typical STL48 * strings. DBG_SYMBOL_LEN chars is a good measure.46 * @param name Buffer holding input symbol name; modified in-place. 47 * There is no length limit; must be large enough to hold typical STL 48 * strings. DBG_SYMBOL_LEN chars is a good measure. 49 49 * @return name for convenience. 50 50 **/ 51 51 extern wchar_t* debug_stl_simplify_name(wchar_t* name); -
source/lib/file/archive/archive_zip.cpp
422 422 423 423 private: 424 424 /** 425 * scan buffer for a Zip file record.425 * Scan buffer for a Zip file record. 426 426 * 427 * @param buf 428 * @param size 427 429 * @param start position within buffer 428 430 * @param magic signature of record 429 431 * @param recordSize size of record (including signature) -
source/lib/file/archive/codec.h
58 58 /** 59 59 * process (i.e. compress or decompress) data. 60 60 * 61 * @param outSize bytes remaining in the output buffer; shall not be zero. 62 * @param inConsumed, outProduced how many bytes in the input and 63 * output buffers were used. either or both of these can be zero if 64 * the input size is small or there's not enough output space. 61 * @param in 62 * @param inSize 63 * @param out 64 * @param outSize Bytes remaining in the output buffer; shall not be zero. 65 * @param inConsumed,outProduced How many bytes in the input and 66 * output buffers were used. either or both of these can be zero if 67 * the input size is small or there's not enough output space. 65 68 **/ 66 69 virtual LibError Process(const u8* in, size_t inSize, u8* out, size_t outSize, size_t& inConsumed, size_t& outProduced) = 0; 67 70 68 71 /** 69 * flush buffers and make sure all output has been produced.72 * Flush buffers and make sure all output has been produced. 70 73 * 71 * @param checksum over all input data. 74 * @param checksum Checksum over all input data. 75 * @param outProduced 72 76 * @return error status for the entire operation. 73 77 **/ 74 78 virtual LibError Finish(u32& checksum, size_t& outProduced) = 0; … … 77 81 * update a checksum to reflect the contents of a buffer. 78 82 * 79 83 * @param checksum the initial value (must be 0 on first call) 84 * @param in 85 * @param inSize 80 86 * @return the new checksum. note: after all data has been seen, this is 81 87 * identical to the what Finish would return. 82 88 **/ -
source/lib/file/common/trace.h
108 108 /** 109 109 * load entries from file. 110 110 * 111 * @param pathname (native, absolute)111 * @param osPathname (native, absolute) 112 112 * 113 113 * replaces any existing entries. 114 114 **/ -
source/lib/file/file_system_util.h
59 59 /** 60 60 * call back for each file in a directory tree 61 61 * 62 * @param cb see DirCallback 62 * @param fs 63 * @param path 64 * @param cb See DirCallback 65 * @param cbData 63 66 * @param pattern that file names must match. '*' and '&' wildcards 64 * are allowed. 0 matches everything.65 * @param flags seeDirFlags66 * @ paramLibError67 * are allowed. 0 matches everything. 68 * @param flags @ref DirFlags 69 * @return LibError 67 70 **/ 68 71 extern LibError ForEachFile(const PIVFS& fs, const VfsPath& path, FileCallback cb, uintptr_t cbData, const wchar_t* pattern = 0, size_t flags = 0); 69 72 70 73 71 74 /** 72 * determine the next available pathname with a given format.73 * this is useful when creating new files without overwriting the previous75 * Determine the next available pathname with a given format. 76 * This is useful when creating new files without overwriting the previous 74 77 * ones (screenshots are a good example). 75 78 * 76 * @param pathnameFormat format string for the pathname; must contain one 77 * format specifier for an integer. 78 * example: "screenshots/screenshot%04d.png" 79 * @param fs 80 * @param pathnameFormat Format string for the pathname; must contain one 81 * format specifier for an integer. 82 * Example: "screenshots/screenshot%04d.png" 79 83 * @param nextNumber in: the first number to try; out: the next number. 80 * if 0, numbers corresponding to existing files are skipped.84 * If 0, numbers corresponding to existing files are skipped. 81 85 * @param nextPathname receives the output. 82 86 **/ 83 87 extern void NextNumberedFilename(const PIVFS& fs, const VfsPath& pathnameFormat, size_t& nextNumber, VfsPath& nextPathname); -
source/lib/file/io/block_cache.h
64 64 /** 65 65 * Add a block to the cache. 66 66 * 67 * @param id key that will be used to Retrieve the block. 67 * @param id Key that will be used to Retrieve the block. 68 * @param buf 68 69 * 69 * call this when the block's IO has completed; its data will70 * Call this when the block's IO has completed; its data will 70 71 * satisfy subsequent Retrieve calls for the same id. 71 * if CONFIG2_CACHE_READ_ONLY, the memory is made read-only.72 * If CONFIG2_CACHE_READ_ONLY, the memory is made read-only. 72 73 **/ 73 74 void Add(BlockId id, const shared_ptr<u8>& buf); 74 75 -
source/lib/file/vfs/file_cache.h
68 68 /** 69 69 * Add a file's contents to the cache. 70 70 * 71 * the cache will be able to satisfy subsequent Retrieve() calls by71 * The cache will be able to satisfy subsequent Retrieve() calls by 72 72 * returning this data; if CONFIG2_CACHE_READ_ONLY, the buffer is made 73 * read-only. if need be and no references are currently attached to it,73 * read-only. If need be and no references are currently attached to it, 74 74 * the memory can also be commandeered by Reserve(). 75 75 * 76 * @param data 77 * @param size 76 78 * @param pathname key that will be used to Retrieve file contents. 77 79 * @param cost is the expected cost of retrieving the file again and 78 * influences how/when it is evicted from the cache.80 * influences how/when it is evicted from the cache. 79 81 **/ 80 82 void Add(const VfsPath& pathname, const shared_ptr<u8>& data, size_t size, size_t cost = 1); 81 83 -
source/lib/file/vfs/vfs.h
69 69 * 70 70 * @param mountPoint (will be created if it does not already exist) 71 71 * @param path real directory path 72 * @param flags 73 * @param priority 72 74 * @return LibError. 73 75 * 74 76 * if files are encountered that already exist in the VFS (sub)directories, … … 80 82 virtual LibError Mount(const VfsPath& mountPoint, const fs::wpath& path, size_t flags = 0, size_t priority = 0) = 0; 81 83 82 84 /** 83 * retrieve information about a file (similar to POSIX stat)85 * Retrieve information about a file (similar to POSIX stat). 84 86 * 85 * @param pfileInfo receives information about the file. passing NULL 86 * suppresses warnings if the file doesn't exist. 87 * @param pathname 88 * @param pfileInfo receives information about the file. Passing NULL 89 * suppresses warnings if the file doesn't exist. 87 90 * 88 91 * @return LibError. 89 92 **/ 90 93 virtual LibError GetFileInfo(const VfsPath& pathname, FileInfo* pfileInfo) const = 0; 91 94 92 95 /** 93 * retrieve lists of all files and subdirectories in a directory.96 * Retrieve lists of all files and subdirectories in a directory. 94 97 * 95 98 * @return LibError. 96 99 * 97 * rationale:100 * Rationale: 98 101 * - this interface avoids having to lock the directory while an 99 102 * iterator is extant. 100 103 * - we cannot efficiently provide routines for returning files and … … 103 106 virtual LibError GetDirectoryEntries(const VfsPath& path, FileInfos* fileInfos, DirectoryNames* subdirectoryNames) const = 0; 104 107 105 108 /** 106 * create a file with the given contents. 107 * 109 * Create a file with the given contents. 110 * @param pathname 111 * @param fileContents 108 112 * @param size [bytes] of the contents, will match that of the file. 109 113 * @return LibError. 110 114 * … … 114 118 virtual LibError CreateFile(const VfsPath& pathname, const shared_ptr<u8>& fileContents, size_t size) = 0; 115 119 116 120 /** 117 * read an entire file into memory.121 * Read an entire file into memory. 118 122 * 123 * @param pathname 119 124 * @param fileContents receives a smart pointer to the contents. 120 * 121 * created with cacheSize != 0 and size < cacheSize. there is no122 * provision for Copy-on-Write, which means that such buffers123 * must not be modified (this is enforced via mprotect).125 * CAVEAT: this will be taken from the file cache if the VFS was 126 * created with cacheSize != 0 and size < cacheSize. There is no 127 * provision for Copy-on-Write, which means that such buffers 128 * must not be modified (this is enforced via mprotect). 124 129 * @param size receives the size [bytes] of the file contents. 125 130 * @return LibError. 126 131 **/ -
source/lib/file/vfs/vfs_lookup.h
49 49 * Resolve a pathname. 50 50 * 51 51 * @param pathname 52 * @param vfsStartDirectory52 * @param startDirectory VfsStartDirectory. 53 53 * @param directory is set to the last directory component that is encountered. 54 * @param file is set to 0 if there is no name component, otherwise the55 * corresponding file.56 * @param flags see VfsLookupFlags.54 * @param pfile File is set to 0 if there is no name component, otherwise the 55 * corresponding file. 56 * @param flags @see VfsLookupFlags. 57 57 * @return LibError (INFO::OK if all components in pathname exist). 58 58 * 59 59 * to allow noiseless file-existence queries, this does not raise warnings. -
source/lib/path_util.h
70 70 LIB_API bool path_is_subpath(const wchar_t* s1, const wchar_t* s2); 71 71 72 72 /** 73 * get the name component of a path. 73 * Get the name component of a path. 74 * Skips over all characters up to the last dir separator, if any. 74 75 * 75 * skips over all characters up to the last dir separator, if any. 76 * @param path input path. 77 * @return pointer to name component within <path>. 76 * @param path Input path. 77 * @return pointer to name component within \<path\>. 78 78 **/ 79 79 LIB_API const wchar_t* path_name_only(const wchar_t* path); 80 80 -
source/lib/res/graphics/cursor.h
30 30 #include "lib/file/vfs/vfs.h" 31 31 32 32 /** 33 * draw the cursor on-screen.33 * Draw the cursor on-screen. 34 34 * 35 * @param name base name of cursor or zero to hide the cursor. 36 * @param x,y coordinates [pixels] (origin at lower left) 37 * (the origin is convenient for drawing via OpenGL, but requires the 38 * mouse Y coordinate to be subtracted from the client area height. 39 * making the caller responsible for this avoids a dependency on 40 * the g_yres global variable.) 35 * @param vfs 36 * @param name Base name of cursor or zero to hide the cursor. 37 * @param x,y Coordinates [pixels] (origin at lower left) 38 * (the origin is convenient for drawing via OpenGL, but requires the 39 * mouse Y coordinate to be subtracted from the client area height. 40 * Making the caller responsible for this avoids a dependency on 41 * the g_yres global variable.) 41 42 * 42 * uses a hardware mouse cursor where available, otherwise a43 * Uses a hardware mouse cursor where available, otherwise a 43 44 * portable OpenGL implementation. 44 45 **/ 45 46 extern LibError cursor_draw(const PIVFS& vfs, const wchar_t* name, int x, int y); -
source/lib/res/graphics/ogl_shader.h
54 54 /** 55 55 * Create, load and compile a shader object. 56 56 * 57 * @param pathname location of the file containing the shader's source code. 58 * @param type e.g. GL_VERTEX_SHADER_ARB. 57 * @param vfs 58 * @param pathname Location of the file containing the shader's source code. 59 * @param type Type e.g. GL_VERTEX_SHADER_ARB. 59 60 **/ 60 61 Handle ogl_shader_load(const PIVFS& vfs, const VfsPath& pathname, GLenum type); 61 62 … … 78 79 /** 79 80 * Load a program object. 80 81 * 82 * @param vfs 81 83 * @param pathname XML file describing the program. 82 84 * 83 85 * note: Shader objects are loaded and attached automatically. -
source/lib/res/graphics/ogl_tex.h
216 216 /** 217 217 * Load and return a handle to the texture. 218 218 * 219 * @param vfs 220 * @param pathname 219 221 * @param flags h_alloc flags. 220 222 * @return Handle to texture or negative LibError 221 223 * for a list of supported formats, see tex.h's tex_load. … … 226 228 * Find and return an existing texture object, if it has already been 227 229 * loaded and is still in memory. 228 230 * 229 * @param fn VFS filename of texture.231 * @param pathname fn VFS filename of texture. 230 232 * @return Handle to texture or negative LibError 231 233 */ 232 234 extern Handle ogl_tex_find(const VfsPath& pathname); … … 237 239 * had been loaded by ogl_tex_load. 238 240 * 239 241 * @param t Texture object. 240 * @param fn filename or description of texture. not strictly needed, 242 * @param vfs 243 * @param pathname fn filename or description of texture. not strictly needed, 241 244 * but would allow h_filename to return meaningful info for 242 245 * purposes of debugging. 246 * @param flags 243 247 * @return Handle to texture or negative LibError 244 248 * 245 249 * note: because we cannot guarantee that callers will pass distinct … … 272 276 * Override default filter (see {@link #ogl_tex_set_defaults}) for 273 277 * this texture. 274 278 * 279 * @param ht Texture handle 275 280 * @param filter OpenGL minification and magnification filter 276 281 * (rationale: see {@link OglTexState}) 277 282 * @return LibError … … 283 288 /** 284 289 * Override default wrap mode (GL_REPEAT) for this texture. 285 290 * 291 * @param ht Texture handle 286 292 * @param wrap OpenGL wrap mode (for both S and T coordinates) 287 293 * (rationale: see {@link OglTexState}) 288 294 * @return LibError … … 312 318 * Override the default decision and force/disallow use of the 313 319 * given feature. Typically called from ah_override_gl_upload_caps. 314 320 * 315 * @param what feature to influence316 * @param allow disable/enable flag321 * @param what Feature to influence. 322 * @param allow Disable/enable flag. 317 323 */ 318 324 extern void ogl_tex_override(OglTexOverrides what, OglTexAllow allow); 319 325 320 326 /** 321 327 * Upload texture to OpenGL. 322 328 * 329 * @param ht Texture handle 323 330 * @param fmt_ovr optional override for OpenGL format (e.g. GL_RGB), 324 331 * which is decided from bpp / Tex flags 325 332 * @param q_flags_ovr optional override for global default 326 333 * OglTexQualityFlags 327 334 * @param int_fmt_ovr optional override for OpenGL internal format 328 335 * (e.g. GL_RGB8), which is decided from fmt / q_flags. 329 * @return LibError 336 * @return LibError. 337 * 330 338 * Side Effects: 331 * <UL> 332 * <LI>enables texturing on TMU 0 and binds the texture to it; 333 * <LI>frees the texel data! see ogl_tex_get_data. 334 * </UL> 339 * - enables texturing on TMU 0 and binds the texture to it; 340 * - frees the texel data! see ogl_tex_get_data. 335 341 */ 336 342 extern LibError ogl_tex_upload(const Handle ht, GLenum fmt_ovr = 0, int q_flags_ovr = 0, GLint int_fmt_ovr = 0); 337 343 … … 404 410 /** 405 411 * (partially) Transform pixel format of the texture. 406 412 * 407 * @param ht Texture handle 408 * @param flags the TexFlags that are to be <em>changed</em>413 * @param ht Texture handle. 414 * @param flags the TexFlags that are to be \<em\>changed\</em\>. 409 415 * @return LibError 410 416 * @see tex_transform 411 417 * … … 416 422 /** 417 423 * Transform pixel format of the texture. 418 424 * 419 * @param ht Texture handle 420 * @param flags desired new TexFlags indicating pixel format.425 * @param ht Texture handle. 426 * @param new_flags Flags desired new TexFlags indicating pixel format. 421 427 * @return LibError 422 428 * @see tex_transform 423 429 * … … 431 437 * Return whether native S3TC texture compression support is available. 432 438 * If not, textures will be decompressed automatically, hurting performance. 433 439 * 434 * @return true if native S3TC supported 440 * @return true if native S3TC supported. 435 441 * 436 442 * ogl_tex_upload must be called at least once before this. 437 443 */ -
source/lib/res/graphics/unifont.h
35 35 /** 36 36 * Load a font. 37 37 * 38 * @param vfs 38 39 * @param pathname path and basename of the font definition file 39 * (.fnt) and its texture (.png) 40 * (.fnt) and its texture (.png) 41 * @param flags 40 42 **/ 41 43 extern Handle unifont_load(const PIVFS& vfs, const VfsPath& pathname, size_t flags = 0); 42 44 … … 69 71 extern void glwprintf(const wchar_t* fmt, ...) WPRINTF_ARGS(1); 70 72 71 73 /** 72 * varargs version of glwprintf.74 * Varargs version of glwprintf. 73 75 * 74 * @param fmt, args - see vfprintf 76 * @param fmt 77 * @param args 78 * @see vfprintf 75 79 **/ 76 80 extern void glvwprintf(const wchar_t* fmt, va_list args) VWPRINTF_ARGS(1); 77 81 78 82 /** 79 83 * Determine pixel extents of a string. 80 84 * 85 * @param h 81 86 * @param text string in question. 87 * @param width 82 88 * @param height is roughly the pixel height of a capital letter, for use 83 89 * when aligning text in an aesthetically pleasing way. 84 90 * -
source/lib/res/sound/snd_mgr.cpp
899 899 900 900 901 901 /** 902 * open and return a handle to a sound file's data.902 * Open and return a handle to a sound file's data. 903 903 * 904 * @param vfs 905 * @param pathname 904 906 * @param is_stream (default false) indicates whether this file should be 905 * streamed in (opening is faster, it won't be kept in memory, but906 * only one instance can be open at a time; makes sense for large music files)907 * or loaded immediately.907 * streamed in (opening is faster, it won't be kept in memory, but 908 * only one instance can be open at a time; makes sense for large music files) 909 * or loaded immediately. 908 910 * @return Handle or LibError on failure 909 911 */ 910 912 static Handle snd_data_load(const PIVFS& vfs, const VfsPath& pathname, bool is_stream) … … 915 917 } 916 918 917 919 918 919 920 /** 920 921 * Free the sound. 921 922 * … … 1160 1161 /** 1161 1162 * Is the fade operation currently active? 1162 1163 * 1163 * @param FadeInfo1164 * @param fi FadeInfo. 1164 1165 * @return bool 1165 1166 */ 1166 1167 static bool fade_is_active(FadeInfo& fi) … … 1327 1328 1328 1329 1329 1330 /** 1330 * open and return a handle to a sound instance.1331 * Open and return a handle to a sound instance. 1331 1332 * 1332 * @param pathname. if a text file (extension ".txt"), 1333 * @param vfs 1334 * @param pathname If a text file (extension ".txt"), 1333 1335 * it is assumed to be a definition file containing the 1334 1336 * sound file name and its gain (0.0 .. 1.0). 1335 1337 * otherwise, it is taken to be the sound file name and … … 1482 1484 } 1483 1485 1484 1486 1485 //-----------------------------------------------------------------------------1486 1487 1487 /** 1488 1488 * Send the VSrc properties to OpenAL (when we actually have a source). 1489 1489 * called by snd_set * and vsrc_grant. 1490 1490 * 1491 * @param VSrc*1491 * @param vs VSrc* 1492 1492 */ 1493 1493 static void vsrc_latch(VSrc* vs) 1494 1494 { … … 1551 1551 /** 1552 1552 * Dequeue any of the VSrc's sound buffers that are finished playing. 1553 1553 * 1554 * @param VSrc*1554 * @param vs VSrc* 1555 1555 * @return int number of entries that were removed. 1556 1556 */ 1557 1557 static int vsrc_deque_finished_bufs(VSrc* vs) … … 1585 1585 * Update the VSrc - perform fade (if active), queue/unqueue buffers. 1586 1586 * Called once a frame. 1587 1587 * 1588 * @param VSrc*1588 * @param vs VSrc* 1589 1589 * @return LibError 1590 1590 */ 1591 1591 static LibError vsrc_update(VSrc* vs) … … 1645 1645 * Try to give the VSrc an AL source so that it can (re)start playing. 1646 1646 * called by snd_play and voice management. 1647 1647 * 1648 * @param VSrc*1648 * @param vs VSrc* 1649 1649 * @return LibError (ERR::FAIL if no AL source is available) 1650 1650 */ 1651 1651 static LibError vsrc_grant(VSrc* vs) … … 1678 1678 * called when closing the VSrc, or when voice management decides 1679 1679 * this VSrc must yield to others of higher priority. 1680 1680 * 1681 * @param VSrc*1681 * @param vs VSrc* 1682 1682 * @return LibError 1683 1683 */ 1684 1684 static LibError vsrc_reclaim(VSrc* vs) … … 1762 1762 * 1763 1763 * @param hvs Handle to VSrc 1764 1764 * @param x,y,z coordinates (interpretation: see below) 1765 * @param relative if true, (x,y,z) is treated as relative to the listener;1765 * @param relative If true, (x,y,z) is treated as relative to the listener; 1766 1766 * otherwise, it is the position in world coordinates (default). 1767 1767 * @return LibError 1768 1768 */ … … 1848 1848 * - once looping is again disabled and the sound has reached its end, 1849 1849 * the sound instance is freed automatically (as if never looped). 1850 1850 * 1851 * @param hvs Handle to VSrc 1852 * @param bool loop1851 * @param hvs Handle to VSrc. 1852 * @param loop Boolean to enable/disable looping on the sound source. 1853 1853 * @return LibError 1854 1854 */ 1855 1855 LibError snd_set_loop(Handle hvs, bool loop) … … 1865 1865 1866 1866 /** 1867 1867 * Fade the sound source in or out over time. 1868 * Its gain starts at <initial_gain> immediately and is moved toward1869 * <final_gain> over <length> seconds.1868 * Its gain starts at \<initial_gain\> immediately and is moved toward 1869 * \<final_gain\> over \<length\> seconds. 1870 1870 * 1871 1871 * may be called at any time; fails with invalid handle return if 1872 1872 * the sound has already been closed (e.g. it never played). … … 1954 1954 return v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; 1955 1955 } 1956 1956 1957 1958 1957 /** 1959 * determine new priority of the VSrc based on distance to listener and1958 * Determine new priority of the VSrc based on distance to listener and 1960 1959 * static priority. 1961 * called via list_foreach.1960 * Called via list_foreach. 1962 1961 * 1963 * @param VSrc*1962 * @param vs VSrc* 1964 1963 */ 1965 1964 static void calc_cur_pri(VSrc* vs) 1966 1965 { -
source/lib/res/sound/snd_mgr.h
142 142 extern LibError snd_dev_set(const char* alc_new_dev_name); 143 143 144 144 /** 145 * set maximum number of voices to play simultaneously;145 * Set maximum number of voices to play simultaneously; 146 146 * this can be used to reduce mixing cost on low-end systems. 147 147 * 148 * @param cap maximum number of voices. ignored if higher than149 * an implementation-defined limit anyway.148 * @param limit Maximum number of voices. Ignored if higher than 149 * an implementation-defined limit anyway. 150 150 * @return LibError 151 151 **/ 152 extern LibError snd_set_max_voices(size_t cap);152 extern LibError snd_set_max_voices(size_t limit); 153 153 154 154 /** 155 155 * set amplitude modifier, which is effectively applied to all sounds. … … 167 167 // 168 168 169 169 /** 170 * open and return a handle to a sound instance.171 * this loads the sound data and makes it ready for other snd_* APIs.170 * Open and return a handle to a sound instance. 171 * This loads the sound data and makes it ready for other snd_* APIs. 172 172 * 173 * @param pathname. if a text file (extension ".txt"), it is174 * assumed to be a definition file containing the sound file name and175 * its gain (0.0 .. 1.0).176 * otherwise, it is taken to be the sound file name and177 * gain is set to the default of 1.0 (no attenuation).178 * 179 * @param is_stream ( default false)forces the sound to be opened as a180 * stream: opening is faster, it won't be kept in memory, but181 * only one instance can be open at a time.173 * @param vfs 174 * @param pathname If a text file (extension ".txt"), it is 175 * assumed to be a definition file containing the sound file name and 176 * its gain (0.0 .. 1.0). 177 * Otherwise, it is taken to be the sound file name and 178 * gain is set to the default of 1.0 (no attenuation). 179 * @param is_stream (Default false) Set to true to forces the sound to be opened as a 180 * stream: opening is faster, it won't be kept in memory, but 181 * only one instance can be open at a time. 182 182 * @return Handle or LibError 183 183 **/ 184 extern Handle snd_open(const PIVFS& vfs, const VfsPath& name, boolstream = false);184 extern Handle snd_open(const PIVFS& vfs, const VfsPath& pathname, bool is_stream = false); 185 185 186 186 /** 187 * close the sound instance. if it was playing, it will be stopped.187 * Close the sound instance. If it was playing, it will be stopped. 188 188 * 189 * rationale: sounds are already closed automatically when done playing;189 * Rationale: sounds are already closed automatically when done playing; 190 190 * this API is provided for completeness only. 191 191 * 192 * @param h s Handle to sound instance. zeroed afterwards.192 * @param hvs Handle to sound instance. Zeroed afterwards. 193 193 * @return LibError 194 194 **/ 195 extern LibError snd_free(Handle& h s);195 extern LibError snd_free(Handle& hvs); 196 196 197 197 /** 198 * start playing the sound.198 * Start playing the sound. 199 199 * 200 200 * Notes: 201 * <UL> 202 * <LI> once done playing, the sound is automatically closed (allows 203 * fire-and-forget play code). 204 * <LI> if no hardware voice is available, this sound may not be 205 * played at all, or in the case of looped sounds, start later. 206 * </UL> 201 * - once done playing, the sound is automatically closed (allows 202 * fire-and-forget play code). 203 * - if no hardware voice is available, this sound may not be 204 * played at all, or in the case of looped sounds, start later. 207 205 * 208 * @param priority (min 0 .. max 1, default 0) indicates which sounds are 206 * @param hvs Handle to VSrc. 207 * @param static_pri (min 0 .. max 1, default 0) indicates which sounds are 209 208 * considered more important (i.e. will override others when no hardware 210 209 * voices are available). the static priority is attenuated by 211 210 * distance to the listener; see snd_update. 212 211 * 213 212 * @return LibError 214 213 **/ 215 extern LibError snd_play(Handle h s, float priority= 0.0f);214 extern LibError snd_play(Handle hvs, float static_pri = 0.0f); 216 215 217 216 /** 218 * change 3d position of the sound source.217 * Change 3d position of the sound source. 219 218 * 220 * may be called at any time; fails with invalid handle return if219 * May be called at any time; fails with invalid handle return if 221 220 * the sound has already been closed (e.g. it never played). 222 221 * 222 * @param hvs Handle to the sound. 223 * @param x,y,z 223 224 * @param relative treat (x,y,z) as relative to the listener; 224 * if false (the default), it is the position in world coordinates.225 * if false (the default), it is the position in world coordinates. 225 226 * @return LibError 226 227 **/ 227 extern LibError snd_set_pos(Handle h s, float x, float y, float z, bool relative = false);228 extern LibError snd_set_pos(Handle hvs, float x, float y, float z, bool relative = false); 228 229 229 230 /** 230 231 * change gain (amplitude modifier) of the sound source. … … 234 235 * closed (e.g. it never played). 235 236 * 236 237 * @param gain amplitude modifier. must be non-negative; 237 * 1 - > unattenuated, 0.5 -> -6 dB, 0 -> silence.238 * 1 -\> unattenuated, 0.5 -\> -6 dB, 0 -\> silence. 238 239 * @return LibError 239 240 **/ 240 241 extern LibError snd_set_gain(Handle hs, float gain); … … 252 253 extern LibError snd_set_pitch(Handle hs, float pitch); 253 254 254 255 /** 255 * enable/disable looping on the sound source.256 * used to implement variable-length sounds (e.g. while building).256 * Enable/disable looping on the sound source. 257 * Used to implement variable-length sounds (e.g. while building). 257 258 * 258 * may be called at any time; fails with invalid handle return if259 * May be called at any time; fails with invalid handle return if 259 260 * the sound has already been closed (e.g. it never played). 260 261 * 261 262 * Notes: 262 * <UL> 263 * <LI> looping sounds are not discarded if they cannot be played for 264 * lack of a hardware voice at the moment play was requested. 265 * <LI> once looping is again disabled and the sound has reached its end, 266 * the sound instance is freed automatically (as if never looped). 267 * </UL> 263 * - looping sounds are not discarded if they cannot be played for 264 * - lack of a hardware voice at the moment play was requested. 265 * - once looping is again disabled and the sound has reached its end, 266 * the sound instance is freed automatically (as if never looped). 267 * 268 * @param hvs Handle to the sound. 269 * @param loop Boolean to enable/disable lopping on the sound. 268 270 * @return LibError 269 271 **/ 270 extern LibError snd_set_loop(Handle h s, bool loop);272 extern LibError snd_set_loop(Handle hvs, bool loop); 271 273 272 274 /// types of fade in/out operations 273 275 enum FadeType … … 281 283 }; 282 284 283 285 /** 284 * fade the sound source in or out over time.286 * Fade the sound source in or out over time. 285 287 * 286 * may be called at any time; fails with invalid handle return if288 * May be called at any time; fails with invalid handle return if 287 289 * the sound has already been closed (e.g. it never played). 288 290 * 289 * gain starts at <initial_gain> (immediately) and is moved toward 290 * <final_gain> over <length> seconds. 291 * @param type of fade curve: linear, exponential or S-curve. 292 * for guidance on which to use, see 291 * Gain starts at \<initial_gain\> (immediately) and is moved toward 292 * \<final_gain\> over \<length\> seconds. 293 * 294 * @param hvs Handle to the sound. 295 * @param initial_gain 296 * @param final_gain 297 * @param length 298 * @param type Type of fade curve: linear, exponential or S-curve. 299 * 300 * For guidance on which to use, see 293 301 * http://www.transom.org/tools/editing_mixing/200309.stupidfadetricks.html 294 302 * you can also pass FT_ABORT to stop fading (if in progress) and 295 * set gain to the current <final_gain> parameter.296 * special cases:297 * - if <initial_gain>< 0 (an otherwise illegal value), the sound's303 * set gain to the current \<final_gain\> parameter. 304 * Special cases: 305 * - if \<initial_gain\> \< 0 (an otherwise illegal value), the sound's 298 306 * current gain is used as the start value (useful for fading out). 299 * - if <final_gain> is 0, the sound is freed when the fade completes or307 * - if \<final_gain\> is 0, the sound is freed when the fade completes or 300 308 * is aborted, thus allowing fire-and-forget fadeouts. no cases are 301 309 * foreseen where this is undesirable, and it is easier to implement 302 310 * than an extra set-free-after-fade-flag function. 303 311 * 304 * note that this function doesn't busy-wait until the fade is complete;312 * Note that this function doesn't busy-wait until the fade is complete; 305 313 * any number of fades may be active at a time (allows cross-fading). 306 * each snd_update calculates a new gain value for all pending fades.307 * it is safe to start another fade on the same sound source while314 * Each snd_update calculates a new gain value for all pending fades. 315 * It is safe to start another fade on the same sound source while 308 316 * one is already in progress; the old one will be discarded. 317 * 309 318 * @return LibError 310 319 **/ 311 320 extern LibError snd_fade(Handle hvs, float initial_gain, float final_gain, … … 330 339 * 331 340 * can later be called to reactivate sound; all settings ever changed 332 341 * will be applied and subsequent sound load / play requests will work. 342 * 343 * @param disabled 333 344 * @return LibError 334 345 **/ 335 346 extern LibError snd_disable(bool disabled); 336 347 337 348 /** 338 * perform housekeeping (e.g. streaming); call once a frame.349 * Perform housekeeping (e.g. streaming); call once a frame. 339 350 * 340 * all parameters are expressed in world coordinates. they can all be NULL351 * All parameters are expressed in world coordinates. they can all be NULL 341 352 * to avoid updating the listener data; this is useful when the game world 342 353 * has not been initialized yet. 343 354 * @param pos listener's position … … 347 358 **/ 348 359 extern LibError snd_update(const float* pos, const float* dir, const float* up); 349 360 350 /** added by GF 361 /** 362 * Added by GF 351 363 * find out if a sound is still playing 352 364 * 353 * @param hvs - handle to the snd to check365 * @param hvs Handle to the snd to check. 354 366 * @return bool true if playing 355 367 356 368 **/ -
source/lib/sysdep/arch/x86_x64/topology.cpp
192 192 193 193 194 194 /** 195 * count the number of values assumed by a certain field within APIC IDs.195 * Count the number of values assumed by a certain field within APIC IDs. 196 196 * 197 * @param offset index of the lowest bit that is part of the field. 198 * @param numValues number of values that can be assumed by the field. 199 * if equal to one, the field is zero-width. 197 * @param apicIds 198 * @param offset Index of the lowest bit that is part of the field. 199 * @param numValues Number of values that can be assumed by the field. 200 * If equal to one, the field is zero-width. 200 201 * @return number of unique values (for convenience of the topology code, 201 202 * this is always at least one) 202 203 **/ … … 286 287 { 287 288 public: 288 289 /** 289 * add processor to the processor mask owned by cache identified by <id>290 * add processor to the processor mask owned by cache identified by \<id\> 290 291 **/ 291 292 void Add(u8 cacheId, size_t processor) 292 293 { -
source/lib/sysdep/arch/x86_x64/topology.h
81 81 LIB_API size_t cache_topology_NumCaches(); 82 82 83 83 /** 84 * @return L2 cache number (zero-based) to which <processor> belongs.84 * @return L2 cache number (zero-based) to which \<processor\> belongs. 85 85 **/ 86 86 LIB_API size_t cache_topology_CacheFromProcessor(size_t processor); 87 87 88 88 /** 89 * @return bit-mask of all processors sharing <cache>.89 * @return bit-mask of all processors sharing \<cache\>. 90 90 **/ 91 91 LIB_API uintptr_t cache_topology_ProcessorMaskFromCache(size_t cache); 92 92 -
source/lib/sysdep/cursor.h
30 30 typedef void* sys_cursor; 31 31 32 32 /** 33 * create a cursor from the given color image.33 * Create a cursor from the given color image. 34 34 * 35 * @ w, h image dimensions [pixels]. the maximum value is36 * implementation-defined; 32x32 is typical and safe.35 * @param w,h Image dimensions [pixels]. the maximum value is 36 * implementation-defined; 32x32 is typical and safe. 37 37 * @param bgra_img cursor image (BGRA format, bottom-up). 38 * it is copied and can be freed after this call returns.38 * It is copied and can be freed after this call returns. 39 39 * @param hx,hy 'hotspot', i.e. offset from the upper-left corner to the 40 * position where mouse clicks are registered.41 * @param cursor is 0 if the return code indicates failure, otherwise42 * a valid cursor that must be sys_cursor_free-ed when no longer needed.40 * position where mouse clicks are registered. 41 * @param cursor Is 0 if the return code indicates failure, otherwise 42 * a valid cursor that must be sys_cursor_free-ed when no longer needed. 43 43 **/ 44 44 extern LibError sys_cursor_create(int w, int h, void* bgra_img, int hx, int hy, sys_cursor* cursor); 45 45 46 46 /** 47 * create a transparent cursor (used to hide the system cursor)47 * Create a transparent cursor (used to hide the system cursor). 48 48 * 49 49 * @param cursor is 0 if the return code indicates failure, otherwise 50 50 * a valid cursor that must be sys_cursor_free-ed when no longer needed. -
source/lib/sysdep/numa.h
32 32 LIB_API size_t numa_NumNodes(); 33 33 34 34 /** 35 * @return node number (zero-based) to which <processor> belongs. 35 * @param processor 36 * @return node number (zero-based) to which \<processor\> belongs. 36 37 **/ 37 38 LIB_API size_t numa_NodeFromProcessor(size_t processor); 38 39 39 40 /** 40 * @return bit-mask of all processors constituting <node>. 41 * @param node 42 * @return bit-mask of all processors constituting \<node\>. 41 43 **/ 42 44 LIB_API uintptr_t numa_ProcessorMaskFromNode(size_t node); 43 45 … … 47 49 48 50 49 51 /** 50 * @return bytes of memory available for allocation on <node>. 52 * @param node 53 * @return bytes of memory available for allocation on \<node\>. 51 54 **/ 52 55 LIB_API size_t numa_AvailableMemory(size_t node); 53 56 -
source/lib/sysdep/os/win/wdbg_sym.h
44 44 typedef LibError (*StackFrameCallback)(const _tagSTACKFRAME64* frame, uintptr_t cbData); 45 45 46 46 /** 47 * iterate over a call stack, invoking a callback for each frame encountered.47 * Iterate over a call stack, invoking a callback for each frame encountered. 48 48 * 49 * @param pcontext processor context from which to start (usually taken from 50 * an exception record), or 0 to walk the current stack. 49 * @param cb 50 * @param cbData 51 * @param pcontext Processor context from which to start (usually taken from 52 * an exception record), or 0 to walk the current stack. 53 * @param lastFuncToSkip 51 54 * 52 * note: it is safe to use debug_assert/debug_warn/CHECK_ERR even during a55 * @note It is safe to use debug_assert/debug_warn/CHECK_ERR even during a 53 56 * stack trace (which is triggered by debug_assert et al. in app code) because 54 57 * nested stack traces are ignored and only the error is displayed. 55 58 **/ -
source/lib/sysdep/os/win/wdll_ver.h
28 28 #define INCLUDED_WDLL_VER 29 29 30 30 /** 31 * read DLL version information and append it to a string.31 * Read DLL version information and append it to a string. 32 32 * 33 33 * @param pathname of DLL (preferably the complete path, so that we don't 34 * inadvertently load another one on the library search path.) 35 * if no extension is given, .dll will be appended. 34 * inadvertently load another one on the library search path.) 35 * If no extension is given, .dll will be appended. 36 * @param list 36 37 * 37 * the text output includes the module name.38 * on failure, the version is given as "unknown".38 * The text output includes the module name. 39 * On failure, the version is given as "unknown". 39 40 **/ 40 41 extern void wdll_ver_Append(const fs::wpath& pathname, std::wstring& list); 41 42 -
source/lib/sysdep/os/win/whrt/counter.cpp
43 43 // create/destroy counters 44 44 45 45 /** 46 * @return pointer to a newly constructed ICounter subclass of type <id> at 47 * the given address, or 0 iff the ID is invalid. 48 * @param size maximum allowable size [bytes] of the subclass instance 46 * @param id 47 * @param address 48 * @param size Maximum allowable size [bytes] of the subclass instance 49 * @return pointer to a newly constructed ICounter subclass of type \<id\> at 50 * the given address, or 0 iff the ID is invalid. 49 51 **/ 50 52 static ICounter* ConstructCounterAt(size_t id, void* address, size_t size) 51 53 { -
source/lib/sysdep/os/win/whrt/counter.h
75 75 76 76 77 77 /** 78 * @return a newly created ICounter of type <id> or 0 iff the ID is invalid.78 * @return a newly created ICounter of type \<id\> or 0 iff the ID is invalid. 79 79 * @param id integer ID (0..N-1) 80 80 * 81 81 * there can only be one active counter at a time; the previous one must -
source/lib/sysdep/os/win/wseh.cpp
95 95 } 96 96 97 97 /** 98 * @param er an exception record for which IsCppException returned true. 98 * @param er An exception record for which IsCppException returned true. 99 * @param description 100 * @param maxChars 99 101 **/ 100 102 static const wchar_t* GetCppExceptionDescription(const EXCEPTION_RECORD* er, 101 103 wchar_t* description, size_t maxChars) -
source/lib/sysdep/sysdep.h
89 89 /** 90 90 * determine filename of the module to whom an address belongs. 91 91 * 92 * @param path full path to module (unchanged unless INFO::OK is returned). 92 * @param addr 93 * @param pathname Full path to module (unchanged unless INFO::OK is returned). 93 94 * @return LibError 94 95 * 95 96 * note: this is useful for handling exceptions in other modules. … … 97 98 LibError sys_get_module_filename(void* addr, fs::wpath& pathname); 98 99 99 100 /** 100 * get path to the current executable.101 * Get path to the current executable. 101 102 * 102 * @param path full path to executable (unchanged unless INFO::OK is returned).103 * @param pathname Full path to executable (unchanged unless INFO::OK is returned). 103 104 * @return LibError 104 105 * 105 106 * this is useful for determining installation directory, e.g. for VFS. … … 107 108 LIB_API LibError sys_get_executable_name(fs::wpath& pathname); 108 109 109 110 /** 110 * get the current user's login name.111 * Get the current user's login name. 111 112 * 112 113 * @return login name, or empty string on error 113 114 */ 114 115 extern std::wstring sys_get_user_name(); 115 116 116 117 /** 117 * have the user choose a directory via OS dialog.118 * Have the user choose a directory via OS dialog. 118 119 * 119 * @param path 's input value determines the starting directory for120 * faster browsing. if INFO::OK is returned, it receives121 * chosen directory path.120 * @param path Path's input value determines the starting directory for 121 * faster browsing. if INFO::OK is returned, it receives 122 * chosen directory path. 122 123 **/ 123 124 extern LibError sys_pick_directory(fs::wpath& path); 124 125 125 126 /** 126 * open the user's default web browser to the given URL.127 * Open the user's default web browser to the given URL. 127 128 **/ 128 129 extern LibError sys_open_url(const std::string& url); 129 130 -
source/lib/tex/tex.h
235 235 236 236 237 237 /** 238 * is the texture object valid and self-consistent? 238 * Is the texture object valid and self-consistent? 239 * 240 * @param t 239 241 * @return LibError 240 242 **/ 241 243 extern LibError tex_validate(const Tex* t); 242 244 243 245 244 246 /** 245 * set the orientation to which all loaded images will247 * Set the orientation to which all loaded images will 246 248 * automatically be converted (excepting file formats that don't specify 247 * their orientation, i.e. DDS). see "Default Orientation" in docs.248 * @param orientation either TEX_BOTTOM_UP or TEX_TOP_DOWN249 * their orientation, i.e. DDS). See "Default Orientation" in docs. 250 * @param orientation Either TEX_BOTTOM_UP or TEX_TOP_DOWN; 249 251 **/ 250 252 extern void tex_set_global_orientation(int orientation); 251 253 252 254 253 255 /** 254 * manually register codecs. must be called before first use of a256 * Manually register codecs. must be called before first use of a 255 257 * codec (e.g. loading a texture). 256 258 * 257 * this would normally be taken care of by TEX_CODEC_REGISTER, but259 * This would normally be taken care of by TEX_CODEC_REGISTER, but 258 260 * no longer works when building as a static library. 259 * workaround: hard-code a list of codecs in tex_codec.cpp and261 * Workaround: hard-code a list of codecs in tex_codec.cpp and 260 262 * call their registration functions. 261 263 **/ 262 264 extern void tex_codec_register_all(); … … 272 274 * FYI, currently BMP, TGA, JPG, JP2, PNG, DDS are supported - but don't 273 275 * rely on this (not all codecs may be included). 274 276 * 275 * @param data input data276 * @param data_size its size [bytes]277 * @param t output texture object.277 * @param data Input data. 278 * @param data_size Its size [bytes]. 279 * @param t Output texture object. 278 280 * @return LibError. 279 281 **/ 280 282 extern LibError tex_decode(const shared_ptr<u8>& data, size_t data_size, Tex* t); … … 282 284 /** 283 285 * encode a texture into a memory buffer in the desired file format. 284 286 * 285 * @param t input texture object286 * @param extension (including '.') 287 * @param da output memory array. allocated here; caller must free it288 * when no longer needed. invalid unless function succeeds.287 * @param t Input texture object. 288 * @param extension (including '.'). 289 * @param da Output memory array. Allocated here; caller must free it 290 * when no longer needed. Invalid unless function succeeds. 289 291 * @return LibError 290 292 **/ 291 293 extern LibError tex_encode(Tex* t, const std::wstring& extension, DynArray* da); … … 299 301 * however, we don't want to provide an alternate interface for each API; 300 302 * these would have to be changed whenever fields are added to Tex. 301 303 * instead, provide one entry point for specifying images. 302 * note: since we do not know how <img> was allocated, the caller must free304 * note: since we do not know how \<img\> was allocated, the caller must free 303 305 * it themselves (after calling tex_free, which is required regardless of 304 306 * alloc type). 305 307 * 306 308 * we need only add bookkeeping information and "wrap" it in 307 309 * our Tex struct, hence the name. 308 310 * 309 * @param w, h pixel dimensions 310 * @param bpp bits per pixel 311 * @param flags TexFlags 312 * @param img texture data. note: size is calculated from other params. 311 * @param w,h Pixel dimensions. 312 * @param bpp Bits per pixel. 313 * @param flags TexFlags. 314 * @param data Img texture data. note: size is calculated from other params. 315 * @param ofs 313 316 * @param t output texture object. 314 317 * @return LibError 315 318 **/ … … 330 333 // 331 334 332 335 /** 333 * change <t>'s pixel format.336 * Change \<t\>'s pixel format. 334 337 * 338 * @param t Input texture object. 335 339 * @param transforms TexFlags that are to be flipped. 336 340 * @return LibError 337 341 **/ 338 342 extern LibError tex_transform(Tex* t, size_t transforms); 339 343 340 344 /** 341 * change <t>'s pixel format (2nd version)342 * (note: this is equivalent to tex_transform(t, t- >flags^new_flags).345 * Change \<t\>'s pixel format (2nd version) 346 * (note: this is equivalent to tex_transform(t, t-\>flags^new_flags). 343 347 * 348 * @param t Input texture object. 344 349 * @param new_flags desired new value of TexFlags. 345 350 * @return LibError 346 351 **/ … … 400 405 * for a series of mipmaps stored from base to highest, call back for 401 406 * each level. 402 407 * 403 * @param w, h pixel dimensions404 * @param bpp bits per pixel405 * @param data series of mipmaps406 * @param levels_to_skip number of levels (counting from base) to skip, or407 * TEX_BASE_LEVEL_ONLY to only call back for the base image.408 * rationale: this avoids needing to special case for images with or409 * without mipmaps.410 * @param data_padding minimum pixel dimensions of mipmap levels.411 * this is used in S3TC images, where each level is actually stored in412 * 4x4 blocks. usually 1 to indicate levels are consecutive.413 * @param cb MipmapCB to call 414 * @param cbData extra data to pass to cb408 * @param w,h Pixel dimensions. 409 * @param bpp Bits per pixel. 410 * @param data Series of mipmaps. 411 * @param levels_to_skip Number of levels (counting from base) to skip, or 412 * TEX_BASE_LEVEL_ONLY to only call back for the base image. 413 * Rationale: this avoids needing to special case for images with or 414 * without mipmaps. 415 * @param data_padding Minimum pixel dimensions of mipmap levels. 416 * This is used in S3TC images, where each level is actually stored in 417 * 4x4 blocks. usually 1 to indicate levels are consecutive. 418 * @param cb MipmapCB to call. 419 * @param cbData Extra data to pass to cb. 415 420 **/ 416 421 extern void tex_util_foreach_mipmap(size_t w, size_t h, size_t bpp, const u8* data, int levels_to_skip, size_t data_padding, MipmapCB cb, void* RESTRICT cbData); 417 422 … … 421 426 // 422 427 423 428 /** 424 * is the file's extension that of a texture format supported by tex_load?429 * Is the file's extension that of a texture format supported by tex_load? 425 430 * 426 * rationale: tex_load complains if the given file is of an431 * Rationale: tex_load complains if the given file is of an 427 432 * unsupported type. this API allows users to preempt that warning 428 433 * (by checking the filename themselves), and also provides for e.g. 429 434 * enumerating only images in a file picker. 430 435 * an alternative might be a flag to suppress warning about invalid files, 431 436 * but this is open to misuse. 432 437 * 433 * @param pathname only the extension (starting with '.') is used. case-insensitive.438 * @param pathname Only the extension (starting with '.') is used. case-insensitive. 434 439 * @return bool 435 440 **/ 436 441 extern bool tex_is_known_extension(const VfsPath& pathname); … … 444 449 * extra and pass the pointer as base+hdr_size. this allows writing the 445 450 * header directly into the output buffer and makes for zero-copy IO. 446 451 * 447 * @param f n filename; only the extension (that after '.') is used.448 * case-insensitive.452 * @param filename Filename; only the extension (that after '.') is used. 453 * case-insensitive. 449 454 * @return size [bytes] or 0 on error (i.e. no codec found). 450 455 **/ 451 456 extern size_t tex_hdr_size(const VfsPath& filename); -
source/lib/tex/tex_codec.h
162 162 163 163 164 164 /** 165 * find codec that recognizes the desired output file extension.165 * Find codec that recognizes the desired output file extension. 166 166 * 167 * @param extension 167 168 * @param c (out) vtbl of responsible codec 168 169 * @return LibError; ERR::RES_UNKNOWN_FORMAT (without warning, because this is 169 170 * called by tex_is_known_extension) if no codec indicates they can -
source/lib/timer.h
322 322 * billed to it, along with a description string. These are displayed when 323 323 * timer_DisplayClientTotals is called. 324 324 * Invoke this at file or function scope; a (static) TimerClient pointer of 325 * name <id> will be defined, which should be passed to TIMER_ACCRUE.325 * name \<id\> will be defined, which should be passed to TIMER_ACCRUE. 326 326 **/ 327 327 #define TIMER_ADD_CLIENT(id)\ 328 328 static TimerClient UID__;\ -
source/maths/scripting/JSInterface_Vector3D.h
57 57 Vector3D_Info( float x, float y, float z ); 58 58 Vector3D_Info( const CVector3D& copy ); 59 59 Vector3D_Info( CVector3D* attach, IPropertyOwner* _owner ); 60 Vector3D_Info( CVector3D* attach, IPropertyOwner* _owner, void (IPropertyOwner::*_updateFn)( ) );61 Vector3D_Info( CVector3D* attach, IPropertyOwner* _owner, void (IPropertyOwner::*_updateFn)( ), void (IPropertyOwner::*_freshenFn)() );60 Vector3D_Info( CVector3D* attach, IPropertyOwner* _owner, void (IPropertyOwner::*_updateFn)(void) ); 61 Vector3D_Info( CVector3D* attach, IPropertyOwner* _owner, void (IPropertyOwner::*_updateFn)(void), void (IPropertyOwner::*_freshenFn)(void) ); 62 62 ~Vector3D_Info(); 63 63 }; 64 64 extern JSClass JSI_class; -
source/ps/FileIo.cpp
162 162 } 163 163 164 164 165 void CFileUnpacker::UnpackString(CStr & result)165 void CFileUnpacker::UnpackString(CStr8& result) 166 166 { 167 167 const size_t length = UnpackSize(); 168 168 -
source/ps/Game.cpp
190 190 * Periodic heartbeat that controls the process. 191 191 * Simulation update is called and game status update is called. 192 192 * 193 * @param d ouble deltaTime elapsed time since last beat in seconds.194 * @param bool doInterpolate perform interpolation if true.193 * @param deltaTime Double. Elapsed time since last beat in seconds. 194 * @param doInterpolate Bool. Perform interpolation if true. 195 195 * @return bool false if it can't keep up with the desired simulation rate 196 196 * indicating that you might want to render less frequently. 197 197 **/ -
source/ps/Game.h
148 148 /** 149 149 * Set the simulation scale multiplier. 150 150 * 151 * @param float simRatevalue to set m_SimRate to.151 * @param simRate Float value to set m_SimRate to. 152 152 * Because m_SimRate is also used to 153 153 * scale TimeSinceLastFrame it must be 154 154 * clamped to 0.0f. -
source/ps/Overlay.cpp
27 27 #include "Parser.h" 28 28 29 29 30 bool CColor::ParseString(const CStr & Value, float DefaultAlpha)30 bool CColor::ParseString(const CStr8& Value, float DefaultAlpha) 31 31 { 32 32 // Use the parser to parse the values 33 33 CParser& parser (CParserCache::Get("_[-$arg(_minus)]$value_[-$arg(_minus)]$value_[-$arg(_minus)]$value_[[-$arg(_minus)]$value_]")); -
source/ps/World.cpp
52 52 /** 53 53 * Constructor. 54 54 * 55 * @param CGame * pGame pointer to the container game object.55 * @param pGame CGame * pGame pointer to the container game object. 56 56 **/ 57 57 CWorld::CWorld(CGame *pGame): 58 58 m_pGame(pGame), -
source/renderer/TerrainRenderer.h
82 82 * preconditions : PrepareForRendering must have been called this 83 83 * frame before calling RenderTerrain. 84 84 * 85 * @param shadow a prepared shadow map, in case rendering with shadows is enabled86 * @param shadowColor color of shadows85 * @param shadow A prepared shadow map, in case rendering with shadows is enabled. 86 * \@param shadowColor color of shadows 87 87 */ 88 88 void RenderTerrain(ShadowMap* shadow); 89 89 -
source/renderer/TransparencyRenderer.cpp
91 91 * BackToFrontIndexSort: Sort polygons by distance to camera for 92 92 * transparency rendering and fill the indices array appropriately. 93 93 * 94 * @param worldToCam World to camera coordinate space transform94 * @param objToCam World to camera coordinate space transform 95 95 * 96 96 * @return Square of the estimated distance to the nearest triangle. 97 97 */ -
source/simulation2/components/ICmpObstructionManager.h
211 211 * Return true if the shape should be counted for collisions. 212 212 * This is called for all shapes that would collide, and also for some that wouldn't. 213 213 * @param tag tag of shape being tested 214 * @param moving boolean moving 214 215 */ 215 216 virtual bool Allowed(ICmpObstructionManager::tag_t tag, bool moving) const = 0; 216 217 }; -
source/simulation2/serialization/ISerializer.h
150 150 PutNumber(name, value); 151 151 } 152 152 153 void NumberI32_Unbounded(const char* name, int32_t value) /// < @copydoc NumberU8_Unbounded153 void NumberI32_Unbounded(const char* name, int32_t value) ///@copydoc NumberU8_Unbounded() 154 154 { 155 155 PutNumber(name, value); 156 156 } 157 157 158 void NumberU32_Unbounded(const char* name, uint32_t value) /// < @copydoc NumberU8_Unbounded158 void NumberU32_Unbounded(const char* name, uint32_t value) ///@copydoc NumberU8_Unbounded() 159 159 { 160 160 PutNumber(name, value); 161 161 } 162 162 163 void NumberFloat_Unbounded(const char* name, float value) /// < @copydoc NumberU8_Unbounded163 void NumberFloat_Unbounded(const char* name, float value) ///@copydoc NumberU8_Unbounded() 164 164 { 165 165 PutNumber(name, value); 166 166 } 167 167 168 void NumberDouble_Unbounded(const char* name, double value) /// < @copydoc NumberU8_Unbounded168 void NumberDouble_Unbounded(const char* name, double value) ///@copydoc NumberU8_Unbounded() 169 169 { 170 170 PutNumber(name, value); 171 171 } 172 172 173 void NumberFixed_Unbounded(const char* name, fixed value) /// < @copydoc NumberU8_Unbounded173 void NumberFixed_Unbounded(const char* name, fixed value) ///@copydoc NumberU8_Unbounded() 174 174 { 175 175 PutNumber(name, value); 176 176 }