PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/visualizations/Milkdrop/vis_milkdrop/evallib/eval.h

http://github.com/xbmc/xbmc
C++ Header | 82 lines | 25 code | 12 blank | 45 comment | 0 complexity | ad0ceba50dd324d8d37b644d913bdc7d MD5 | raw file
 1/*
 2  LICENSE
 3  -------
 4Copyright 2005 Nullsoft, Inc.
 5All rights reserved.
 6
 7Redistribution and use in source and binary forms, with or without modification, 
 8are permitted provided that the following conditions are met:
 9
10  * Redistributions of source code must retain the above copyright notice,
11    this list of conditions and the following disclaimer. 
12
13  * Redistributions in binary form must reproduce the above copyright notice,
14    this list of conditions and the following disclaimer in the documentation
15    and/or other materials provided with the distribution. 
16
17  * Neither the name of Nullsoft nor the names of its contributors may be used to 
18    endorse or promote products derived from this software without specific prior written permission. 
19 
20THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
21IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
22FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
23CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
26IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
27OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29*/
30#ifndef __EVAL_H
31#define __EVAL_H
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37  // stuff that apps will want to use
38#define EVAL_MAX_VARS 103//90
39        // note: in order for presets not to break, this 
40        // value must be equal to the number of built-in
41        // per-frame variables (see CState::var_pf_*), 
42        // PLUS 30.  otherwise, the presets might try to
43        // create too many of their own new custom per-
44        // frame variables, and there wouldn't be room.
45        // 
46        // A good preset to test with is Krash & Telek - Real Noughts and Crosses (random ending),
47        // as it uses exactly 30 custom per-frame vars.
48        // 
49        // History:         # pf vars  EVAL_MAX_VARS  # left for user (should never decrease!)
50        // ---------------  ---------  -------------  ----------------------------------------
51        //  Milkdrop 1.03   60         90             30
52        //  Milkdrop 1.04   73         103            30
53
54typedef struct 
55{
56  char name[8];
57  double value;
58} varType;
59
60void resetVars(varType *vars);
61double *getVarPtr(char *varName);
62double *registerVar(char *varName);
63
64
65// other shat
66
67extern varType *varTable;
68extern int *errPtr;
69extern int colCount;
70extern int result;
71
72int setVar(int varNum, double value);
73int getVar(int varNum);
74void *compileExpression(char *txt);
75
76
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif