File: cs_107.html

package info (click to toggle)
crystalspace 0.94-20020412-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 62,276 kB
  • ctags: 52,843
  • sloc: cpp: 274,783; ansic: 6,608; perl: 6,276; objc: 3,952; asm: 2,942; python: 2,354; php: 542; pascal: 530; sh: 430; makefile: 370; awk: 193
file content (156 lines) | stat: -rw-r--r-- 5,640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created by texi2html 1.64 -->
<!-- 
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
 
-->
<HTML>
<HEAD>
<TITLE>Crystal Space: View Library in Walktest</TITLE>

<META NAME="description" CONTENT="Crystal Space: View Library in Walktest">
<META NAME="keywords" CONTENT="Crystal Space: View Library in Walktest">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">

</HEAD>

<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">

<A NAME="SEC208"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_106.html#SEC207"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_108.html#SEC209"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_87.html#SEC185"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_99.html#SEC200"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_108.html#SEC209"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<HR SIZE=1>
<H3> 5.6.8 <EM>Optional:</EM> View the Crystal Space Sprite in Walktest </H3>
<!--docid::SEC208::-->
<P>

<UL>
<LI>
Make sure you have <CODE>walktest</CODE> built, running and <EM>tested</EM> with 
your map file.
<P>

<LI>
Compile the Motion Manager (<VAR>motman</VAR> plugin) and Motion Loader 
(<VAR>motldr</VAR> plugin).
<P>

<LI>
Edit the mapfile of the map that you wish to place your characters in.  You 
will want to add a line to load the library file containing your sprite to the 
WORLD section of the mapfile with the LIBRARY command.
<P>

Sample File:
<TABLE><tr><td>&nbsp;</td><td class=example><pre>WORLD (
  LIBRARY '/lev/flarge/test.csk' ()
)
</pre></td></tr></table></P><P>

Run <CODE>walktest</CODE> and make sure that the mapfile still loads correctly, 
although you won't see your model yet.       
</P><P>

<LI>
Next, we are going to add your sprite to one of the sectors in your mapfile.
<P>

Sample File:
<TABLE><tr><td>&nbsp;</td><td class=example><pre>WORLD (
  LIBRARY '/lev/flarge/test.csk' ()
  SECTOR 'room' (
    MESHOBJ 'test1' (
      PLUGIN ('spr3d')
      PARAMS (
        FACTORY ('test')
        ACTION ('default')
      )
      MOVE (V (0,0,0))
    )
  )
)
</pre></td></tr></table></P><P>

Run <CODE>walktest</CODE> and you should see your model in the mapfile.
</P><P>

<BLOCKQUOTE>
<STRONG>Note:</STRONG> If you do not see the object, chances are your object is either 
outside the room or way too big or way too small.  
<P>

<STRONG>Note:</STRONG> Try playing with the <VAR>geomscale</VAR> setting in your model 
config file, and the xyz coordinates in the MOVE macro in your mapfile. 
See section <A HREF="cs_105.html#SEC206">5.6.6 Create the Crystal Space Library file containing the Sprite</A>.
</P><P>

<STRONG>Note:</STRONG> <CODE>viewmesh</CODE> is a useful tool for tracking down problems 
with your sprite. See section <A HREF="cs_106.html#SEC207">5.6.7 <EM>Optional:</EM> View the Crystal Space Sprite in Viewmesh</A>.
</BLOCKQUOTE>
<P>

<LI>
Lastly, we are going to animate your sprite with the APPLY_MOTION line.
<P>

Sample File:
<TABLE><tr><td>&nbsp;</td><td class=example><pre>WORLD (
  LIBRARY '/lev/flarge/test.csk' ()
  SECTOR 'room' (
    MESHOBJ 'test1' (
      PLUGIN ('spr3d')
      PARAMS (
        FACTORY ('test')
        ACTION ('default')
      )
      APPLY_MOTION ('test_0')
      MOVE (V (0,0,0))
    )
  )
)
</pre></td></tr></table></P><P>

Run <CODE>walktest</CODE> and you should see your model animating in the mapfile.
</P><P>

</UL>
<P>

<A NAME="WinCVS Tutorial"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_106.html#SEC207"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_108.html#SEC209"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_87.html#SEC185"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_99.html#SEC200"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_108.html#SEC209"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>  
<FONT SIZE="-1">
This document was generated

using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>

</BODY>
</HTML>