File: cs_282.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 (1133 lines) | stat: -rw-r--r-- 40,310 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
<!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: API Modifications 90</TITLE>

<META NAME="description" CONTENT="Crystal Space: API Modifications 90">
<META NAME="keywords" CONTENT="Crystal Space: API Modifications 90">
<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="SEC668"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_281.html#SEC657"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_283.html#SEC692"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_279.html#SEC650"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_279.html#SEC650"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711"> &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>
<H2> C.3 API Changes from 0.18 to 0.90 </H2>
<!--docid::SEC668::-->
<P>

This section documents the major changes between versions 0.18 and 0.90 of of
Crystal Space.
</P><P>

<A NAME="SEC669"></A>
<H3> SCF  </H3>
<!--docid::SEC669::-->
<P>

The set of SCF functions has been removed except for
<CODE>scfInitialize()</CODE>.  This function creates a global instance of the
`<SAMP>iSCF</SAMP>' interface which is always available to the application and to
plugin modules as `<SAMP>iSCF::SCF</SAMP>'.  All other SCF functionality should be
accessed via this shared object.  This change makes it possible to call
SCF functions from within dynamic libraries (i.e. from plugins), which
was not possible before.  The only thing that is still not allowed is to use
the <CODE>SCF_REGISTER_STATIC()</CODE> family of macros in dynamic libraries.
</P><P>

SCF now associates a so-called <EM>Interface ID Number</EM> with every
interface name.  You can get the number for an interface by calling
`<SAMP>iSCF::SCF-&#62;GetInterfaceID("iInterface")</SAMP>'.  It is currently not possible
to get the interface name for a given number, but this should not be needed
anyway (see below).
</P><P>

<CODE>iBase::QueryInterface()</CODE> now takes the interface ID as its parameter
instead of the interface name. This makes a lot of optimization possible,
because interfaces can be compared using simple integer comparison instead
of string comparison. You will not see anything of this because the
<CODE>SCF_QUERY_INTERFACE()</CODE> macro shields you from it. As a result, your
program should not require any changes.
</P><P>

However, you can increase performance in critical areas by using two new macros
which have been introduced.  Place <CODE>SCF_DECLARE_FAST_INTERFACE()</CODE>
somewhere at top-level in your source files (or in one of your header files).
For every interface you do this you can then use
<CODE>SCF_QUERY_INTERFACE_FAST()</CODE>.  The advantage of this is a performance
gain.  The disadvantage is that you have to use
<CODE>SCF_DECLARE_FAST_INTERFACE()</CODE> and that the name of the interface must be
hard-coded (e.g. you cannot use <CODE>SCF_QUERY_INTERFACE_FAST()</CODE> if the name
of the interface is given to your function as a parameter).
</P><P>

Three other changes have been done to SCF.  First, it is now possible to
get a list of registered classes using <CODE>iSCF::SCF-&#62;QueryClassList()</CODE>.
Second, <CODE>scfGetRefCount()</CODE> has been introduced which allows access to an
object's reference count without accessing the reference count variable
directly.  This function should only be used for debugging, however.  Third,
the macros which implement `<SAMP>iBase</SAMP>' functions have been split up.  For
example, `<SAMP>SCF_IMPLEMENT_IBASE()</SAMP>' is now composed from these components:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>SCF_IMPLEMENT_IBASE_INCREF()
SCF_IMPLEMENT_IBASE_DECREF()
SCF_IMPLEMENT_IBASE_GETREFCOUNT()
SCF_IMPLEMENT_IBASE_QUERY()
</pre></td></tr></table></P><P>

This decomposition makes it easier to replace iBase methods individually in a
particular implementation.
</P><P>

<A NAME="SEC670"></A>
<H3> <CODE>csObject</CODE>, RTTI </H3>
<!--docid::SEC670::-->
<P>

The pseudo-RTTI system has been removed from <CODE>csObject</CODE>.  Instead,
SCF functions are now used to identify an object's type.  As an example of
how this affects your code, if your old code was checking an object's type in
this fashion:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>csObject* obj = <small>...</small>;
if (obj-&#62;Type == csMyClass::Type)
{
  csMyClass* a = (csMyClass*)obj;
  <small>...</small>
}
</pre></td></tr></table></P><P>

Then it should now do so in this fashion:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>csObject *obj = <small>...</small>;
iMyInterface* a = SCF_QUERY_INTERFACE(obj, iMyInterface);
if (a != NULL)
{
  <small>...</small>
}
</pre></td></tr></table></P><P>

In performance-critical areas, you should use <CODE>SCF_QUERY_INTERFACE_FAST()</CODE>
rather than <CODE>SCF_QUERY_INTERFACE()</CODE>.
</P><P>

A result of this change is that child object iterators cannot easily iterate
over objects of a certain type anymore.  To achieve the same effect, you should
create an iterator for all children and then use <CODE>SCF_QUERY_INTERFACE()</CODE>
to test if an object implements a certain interface.
</P><P>

Note that if you don't want to create proper interfaces for all your classes,
it is possible to query the class itself instead of an interface.  Assuming
that <CODE>csMyClass</CODE> is just a set of values, and you don't want to create an
interface with accessor functions for it.  Then you may place
<CODE>SCF_DECLARE_IBASE_EXT()</CODE> into the class as usual (note the `<SAMP>EXT</SAMP>'
version of the macro because it extends the interface list of `<SAMP>csObject</SAMP>').
In addition, you must set a version number for the class using
<CODE>SCF_VERSION(csMyClass, ?, ?, ?)</CODE>.  The interface list then looks like
this:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>SCF_IMPLEMENT_IBASE_EXT (csMyClass)
  SCF_IMPLEMENTS_INTERFACE (csMyClass)
SCF_IMPLEMENT_IBASE_EXT_END
</pre></td></tr></table></P><P>

Using this you can use <CODE>SCF_QUERY_INTERFACE(object, csMyClass)</CODE>, i.e.
use the class without an interface.
</P><P>

Another change is that `<SAMP>csObject</SAMP>' stores its children as `<SAMP>iObject</SAMP>'
references now.  It does not deal with `<SAMP>csObject</SAMP>' pointers any longer.
All children are correctly reference-counted.  Also, all objects maintain a
pointer to their "parent" object.  How this pointer is used is left to you.
The pointer is not reference-counted in order to avoid circular referencing.
Consequently, the classes `<SAMP>csPObject</SAMP>' and `<SAMP>csObjNoDel</SAMP>', and the
member function <CODE>ObjRelease()</CODE> have been removed.
</P><P>

This usually means that after calling <CODE>ObjAdd()</CODE>, you have to call
<CODE>DecRef()</CODE> on the added child because you don't want to use the reference
anymore.  Of course, this only applies if you possess a valid reference.
Similarly, if you want to unlink the object from its parent without deleting it
(i.e.  wherever you used <CODE>ObjRelease()</CODE> before), you should now call
<CODE>IncRef()</CODE> on the child before removing it from its parent.
</P><P>

<A NAME="SEC671"></A>
<H3> Platform Portability Encapsulation </H3>
<!--docid::SEC671::-->
<P>

The new macro `<SAMP>CS_IMPLEMENT_APPLICATION</SAMP>' must now be invoked by exactly
one compilation unit of each application.  This macro encapsulates
platform-specific implementation details for any given platform.  For instance,
on Windows, this macro defines the <CODE>WinMain()</CODE> function required by all
Windows GUI applications.
</P><P>

The new macro `<SAMP>CS_IMPLEMENT_PLUGIN</SAMP>' must now be invoked by exactly one
compilation unit of each plugin module.  This macro encapsulates
platform-specific implementation details for any given platform.  For instance,
on Windows, this macro defins the <CODE>DllMain()</CODE> function required by all
Windows DLL modules.
</P><P>

These macros alleviate the need to link applications with specially prepared
object files or libraries.  The summary below explains what this means for
various platforms.
</P><P>

<UL>
<LI>
Unix
<P>

No longer required to link plugin modules against the `<TT>dummy.o</TT>' file.
</P><P>

<LI>
Visual-C++
<P>

No longer required to link applications against Crystal Space's
`<TT>win32exe.lib</TT>' library.  No longer required to link plugin modules
(DLL's) against the `<TT>win32dll.lib</TT>' library.  Also, the
`<TT>libwin32exe.dsp</TT>' and `<TT>libwin32dll.dsp</TT>' project files have been
removed.
</P><P>

<LI>
Mingw
<P>

No longer required to link applications with the `<TT>exeentry.o</TT>' object file.
No longer required to link plugin modules (DLL's) with the
`<TT>dllentry.o</TT>' object file.
</P><P>

<LI>
OS/2
<P>

No longer required to link plugin modules with the `<TT>dllentry.o</TT>' object
file.
</UL>
<P>

<A NAME="SEC672"></A>
<H3> System Driver Removal and Application Structure </H3>
<!--docid::SEC672::-->
<P>

The classes <CODE>SysSystemDriver</CODE>, and <CODE>csSystemDriver</CODE>, and
the interface <CODE>iSystem</CODE> have been removed. All the functionality
that used to be present in the system driver has moved to smaller
components (plugin manager, event queue, config manager, commandline parser,
virtual clock, ...).
</P><P>

There is now a new concept called the <EM>object registry</EM> which is
the central repository where all objects can register themselves.
When you used to do <CODE>CS_QUERY_PLUGIN</CODE> you now have to do
<CODE>CS_QUERY_REGISTRY</CODE> instead.
</P><P>

Applications can no longer inherit from <CODE>SysSystemDriver</CODE>. Instead
there is now a new <CODE>csInitializer</CODE> class which helps in the
initialization of an application. Check out the simple tutorial
(see section <A HREF="cs_73.html#SEC171">5.2 Simple Tutorial 1</A>) to see how this works. This tutorial also explains
all the new concepts very clearly.
</P><P>

<A NAME="SEC673"></A>
<H3> Removal of Function ID's </H3>
<!--docid::SEC673::-->
<P>

Function ID's (a concept of the old plugin system) have been removed.
This has an effect on config files where you now must replace things
like:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>System.PlugIns.LevelLoader = crystalspace.level.loader
</pre></td></tr></table></P><P>

with:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>System.PlugIns.iLoader = crystalspace.level.loader
</pre></td></tr></table></P><P>

So in general use the interface name. This interface name will be the
tag with which the loaded plugin is registered in the object registry.
</P><P>

<A NAME="SEC674"></A>
<H3> Image Loading </H3>
<!--docid::SEC674::-->
<P>

`<SAMP>csImageLoader</SAMP>' is gone and has now become a plugin which implements
the <CODE>iImageIO</CODE> interface. To use it you typically use the following
code:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>#include "igraphic/imageio.h"
<small>...</small>
iDataBuffer* buf = <small>...</small>;
iImageIO* imgldr = CS_QUERY_PLUGIN (System, iImageIO);
imgldr-&#62;Load (buf-&#62;GetUint8 (), buf-&#62;GetSize (),
txtmgr-&#62;GetTextureFormat ());
<small>...</small>
imgldr-&#62;DecRef ();
</pre></td></tr></table></P><P>

<A NAME="SEC675"></A>
<H3> Level Loading (csLoader) </H3>
<!--docid::SEC675::-->
<P>

The level loader is now a plugin. Make sure you have it loaded by putting the
following in your config file:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>System.PlugIns.iLoader = crystalspace.level.loader
</pre></td></tr></table></P><P>

Or you can add the following line to the call to
<CODE>csInitializer::RequestPlugins()</CODE> in your <CODE>main()</CODE> function:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>CS_REQUEST_LEVELLOADER,
</pre></td></tr></table></P><P>

Then you can get the level loader with:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>iLoader* level_loader = CS_QUERY_REGISTRY (object_reg, iLoader);
</pre></td></tr></table></P><P>

When you don't need it anymore you must call <CODE>level_loader-&#62;DecRef ()</CODE>.
Check the API reference to see what functions you can use on level_loader.
There are functions to load a map, textures, mesh objects, etc. Many of
these functions have been renamed as well.
</P><P>

<A NAME="SEC676"></A>
<H3> Things are Mesh Objects </H3>
<!--docid::SEC676::-->
<P>

Things are now mesh objects which means that you can no longer access
<CODE>csThing</CODE> directly.
<CODE>iThing</CODE> has been removed. Instead there is <CODE>iThingState</CODE>.
Check out the simple tutorial (see section <A HREF="cs_73.html#SEC171">5.2 Simple Tutorial 1</A>) for more information
about this.
</P><P>

<A NAME="SEC677"></A>
<H3> Map File Changes </H3>
<!--docid::SEC677::-->
<P>

<UL>
<LI>
<CODE>PLANE</CODE> => <CODE>ADDON</CODE>
<LI>
<CODE>THING</CODE> => <CODE>MESHOBJ</CODE>
<LI>
<CODE>SKY</CODE> => <CODE>MESHOBJ + RENDPRI</CODE>
<LI>
<CODE>MESHOBJ</CODE> => <CODE>MESHFACT</CODE> -- (for factories)
<LI>
<CODE>BEZIER</CODE> => <CODE>ADDON</CODE>
<LI>
<CODE>MATERIALS</CODE>
<LI>
<CODE>RENDERPRIORITIES</CODE>
<LI>
<CODE>PLUGINS</CODE>
</UL>
<P>

<A NAME="SEC678"></A>
<H3> Sky Objects Gone </H3>
<!--docid::SEC678::-->
<P>

Sky objects must now be created the same as normal mesh objects
but you need to give them a low render priority (i.e. 'sky' render
priority).
</P><P>

<A NAME="SEC679"></A>
<H3> Using the Engine as a Plugin </H3>
<!--docid::SEC679::-->
<P>

It is now recommended to use the engine as a plugin. Linking directly
to the `<TT>csengine</TT>' library is still possible but strongly discouraged.
We will not be able to guarantee API compatibility on this level.
</P><P>

Using the engine as a plugin means in the first loading the engine plugin
instead of linking to the `<TT>csengine</TT>' library.  You can do this with:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>csInitializer::RequestPlugins (object_reg,
CS_REQUEST_ENGINE,
<small>...</small>
iEngine* engine = CS_QUERY_REGISTRY (object_reg, iEngine);
</pre></td></tr></table></P><P>

You then use the engine through SCF interfaces.  Therefore, your programs
should include header files from `<TT>CS/include/iengine</TT>' rather than
`<TT>CS/include/csengine</TT>'.  Importing files from `<TT>CS/include/csengine</TT>'
is discourages.
</P><P>

<A NAME="SEC680"></A>
<H3> Sectors Have No Polygons </H3>
<!--docid::SEC680::-->
<P>

Sectors can no longer contain polygons. All geometry is now represented
with mesh objects (see the section above about how to create csThing
mesh objects). To create the outer walls of a sector (i.e. the geometry
that used to go to the sector in 0.18 or earlier) you create a csThing
mesh object. In a world file this happens like this:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>SECTOR 'room' (
  MESHOBJ 'walls' (
    PLUGIN ('crystalspace.mesh.loader.thing')
    PARAMS (
      VERTEX (<small>...</small>) <small>...</small>
      POLYGON (<small>...</small>) <small>...</small>
    )
    ZFILL ()
    PRIORITY ('wall')
  )
  <small>...</small>
)
</pre></td></tr></table></P><P>

In code you can use <CODE>iEngine::CreateSectorWallsMesh()</CODE> like this:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>iMeshWrapper* mesh =
  engine-&#62;CreateSectorWallsMesh (sector, "walls");
</pre></td></tr></table></P><P>

<A NAME="SEC681"></A>
<H3> Include Directory Changes </H3>
<!--docid::SEC681::-->
<P>

All SCF interfaces (class names starting with the letter `<SAMP>i</SAMP>' such as
`<SAMP>iPolygon3D</SAMP>') have moved from `<TT>CS/include</TT>' to individual
subddirectories of `<TT>CS/include</TT>'.  A few brief examples:
</P><P>

<UL>
<LI>
<CODE>imeshobj.h</CODE> => <CODE>imesh/object.h</CODE> and <CODE>iengine/mesh.h</CODE>
<LI>
<CODE>light.h</CODE> => <CODE>iengine/light.h</CODE>
<LI>
<CODE>ipolygon.h</CODE> => <CODE>imesh/thing/polygon.h</CODE>
</UL>
<P>

The following new header directories exist:
</P><P>

<DL COMPACT>
<DT><CODE>include/iengine</CODE>
<DD>Everything related to the engine itself
(<CODE>view.h</CODE>, <CODE>camera.h</CODE>, <CODE>light.h</CODE>, <CODE>sector.h</CODE>,
<CODE>engine.h</CODE>, <CODE>texture.h</CODE>, <small>...</small>).
<DT><CODE>include/igame</CODE>
<DD>For the `<TT>csgame</TT>' plugin (<CODE>csgame.h</CODE>).
<DT><CODE>include/igeom</CODE>
<DD>For the `<TT>csgeom</TT>' library (<CODE>clip2d.h</CODE>).
<DT><CODE>include/igraphic</CODE>
<DD>For the `<TT>csgfx</TT>' library and the image loader
plugins (<CODE>image.h</CODE>, <CODE>imageio.h</CODE>, and <CODE>loader.h</CODE>).
<DT><CODE>include/imap</CODE>
<DD>For the map loader and mesh object loaders and
savers (<CODE>parser.h</CODE>, <CODE>reader.h</CODE>, and <CODE>writer.h</CODE>).
<DT><CODE>include/imesh</CODE>
<DD>For everything related to mesh objects and the
state interfaces of mesh objects (<CODE>object.h</CODE>, <CODE>spr3d.h</CODE>,
<CODE>ball.h</CODE>, <CODE>thing/thing.h</CODE>, <CODE>thing/polygon.h</CODE>, <small>...</small>).
<DT><CODE>include/inetwork</CODE>
<DD>For networking plugins (<CODE>driver.h</CODE> and <CODE>socket.h</CODE>).
<DT><CODE>include/isound</CODE>
<DD>For sound (<CODE>listener.h</CODE>, <CODE>renderer.h</CODE>, <small>...</small>).
<DT><CODE>include/isys</CODE>
<DD>Everything related to the system driver and its facilities (<CODE>event.h</CODE>,
<CODE>evdefs.h</CODE>, <CODE>plugin.h</CODE>, <CODE>vfs.h</CODE>, and <CODE>system.h</CODE>).
<DT><CODE>include/iutil</CODE>
<DD>For the `<TT>csutil</TT>' library (<CODE>string.h</CODE>, <CODE>object.h</CODE>,
<CODE>config.h</CODE>, <small>...</small>).
<DT><CODE>include/ivideo</CODE>
<DD>Everything for the 3D and 2D driver subsystems (<CODE>graph2d.h</CODE>,
<CODE>graph3d.h</CODE>, <CODE>texture.h</CODE>, <CODE>fontserv.h</CODE>, <CODE>txtmgr.h</CODE>,
<small>...</small>).
<DT><CODE>include/ivaria</CODE>
<DD>Everything that does not fit anywhere else
(<CODE>collider.h</CODE>, <CODE>conin.h</CODE>, <CODE>conout.h</CODE>, <CODE>iso.h</CODE>,
<CODE>keyval.h</CODE>, <CODE>script.h</CODE>, <small>...</small>).
</DL>
<P>

<A NAME="SEC682"></A>
<H3> Global API Changes </H3>
<!--docid::SEC682::-->
<P>

All SCF macro names are now prefixed with `<SAMP>SCF_</SAMP>' in order to avoid
polluting the global namespace.
</P><P>

<UL>
<LI>
<CODE>CONSTRUCT_EMBEDDED_IBASE</CODE> => <CODE>SCF_CONSTRUCT_EMBEDDED_IBASE</CODE>
<LI>
<CODE>CONSTRUCT_IBASE</CODE> => <CODE>SCF_CONSTRUCT_IBASE</CODE>
<LI>
<CODE>CREATE_INSTANCE</CODE> => <CODE>SCF_CREATE_INSTANCE</CODE>
<LI>
<CODE>DECLARE_EMBEDDED_IBASE</CODE> => <CODE>SCF_DECLARE_EMBEDDED_IBASE</CODE>
<LI>
<CODE>DECLARE_FACTORY</CODE> => <CODE>SCF_DECLARE_FACTORY</CODE>
<LI>
<CODE>DECLARE_FAST_INTERFACE</CODE> => <CODE>SCF_DECLARE_FAST_INTERFACE</CODE>
<LI>
<CODE>DECLARE_IBASE_EXT</CODE> => <CODE>SCF_DECLARE_IBASE_EXT</CODE>
<LI>
<CODE>DECLARE_IBASE</CODE> => <CODE>SCF_DECLARE_IBASE</CODE>
<LI>
<CODE>DEC_REF</CODE> => <CODE>SCF_DEC_REF</CODE>
<LI>
<CODE>EXPORT_CLASS_DEP</CODE> => <CODE>SCF_EXPORT_CLASS_DEP</CODE>
<LI>
<CODE>EXPORT_CLASS_TABLE_END</CODE> => <CODE>SCF_EXPORT_CLASS_TABLE_END</CODE>
<LI>
<CODE>EXPORT_CLASS_TABLE</CODE> => <CODE>SCF_EXPORT_CLASS_TABLE</CODE>
<LI>
<CODE>EXPORT_CLASS</CODE> => <CODE>SCF_EXPORT_CLASS</CODE>
<LI>
<CODE>IMPLEMENTS_EMBEDDED_INTERFACE</CODE> => <CODE>SCF_IMPLEMENTS_EMBEDDED_INTERFACE</CODE>
<LI>
<CODE>IMPLEMENTS_INTERFACE_COMMON</CODE> => <CODE>SCF_IMPLEMENTS_INTERFACE_COMMON</CODE>
<LI>
<CODE>IMPLEMENTS_INTERFACE</CODE> => <CODE>SCF_IMPLEMENTS_INTERFACE</CODE>
<LI>
<CODE>IMPLEMENT_EMBEDDED_IBASE_DECREF</CODE> => <CODE>SCF_IMPLEMENT_EMBEDDED_IBASE_DECREF</CODE>
<LI>
<CODE>IMPLEMENT_EMBEDDED_IBASE_END</CODE> => <CODE>SCF_IMPLEMENT_EMBEDDED_IBASE_END</CODE>
<LI>
<CODE>IMPLEMENT_EMBEDDED_IBASE_GETREFCOUNT</CODE> =><BR><CODE>SCF_IMPLEMENT_EMBEDDED_IBASE_GETREFCOUNT</CODE>
<LI>
<CODE>IMPLEMENT_EMBEDDED_IBASE_INCREF</CODE> => <CODE>SCF_IMPLEMENT_EMBEDDED_IBASE_INCREF</CODE>
<LI>
<CODE>IMPLEMENT_EMBEDDED_IBASE_QUERY_END</CODE> =><BR><CODE>SCF_IMPLEMENT_EMBEDDED_IBASE_QUERY_END</CODE>
<LI>
<CODE>IMPLEMENT_EMBEDDED_IBASE_QUERY</CODE> => <CODE>SCF_IMPLEMENT_EMBEDDED_IBASE_QUERY</CODE>
<LI>
<CODE>IMPLEMENT_EMBEDDED_IBASE</CODE> => <CODE>SCF_IMPLEMENT_EMBEDDED_IBASE</CODE>
<LI>
<CODE>IMPLEMENT_FACTORY</CODE> => <CODE>SCF_IMPLEMENT_FACTORY</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_DECREF</CODE> => <CODE>SCF_IMPLEMENT_IBASE_DECREF</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_END</CODE> => <CODE>SCF_IMPLEMENT_IBASE_END</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_EXT_DECREF</CODE> => <CODE>SCF_IMPLEMENT_IBASE_EXT_DECREF</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_EXT_END</CODE> => <CODE>SCF_IMPLEMENT_IBASE_EXT_END</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_EXT_GETREFCOUNT</CODE> => <CODE>SCF_IMPLEMENT_IBASE_EXT_GETREFCOUNT</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_EXT_INCREF</CODE> => <CODE>SCF_IMPLEMENT_IBASE_EXT_INCREF</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_EXT_QUERY_END</CODE> => <CODE>SCF_IMPLEMENT_IBASE_EXT_QUERY_END</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_EXT_QUERY</CODE> => <CODE>SCF_IMPLEMENT_IBASE_EXT_QUERY</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_EXT</CODE> => <CODE>SCF_IMPLEMENT_IBASE_EXT</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_GETREFCOUNT</CODE> => <CODE>SCF_IMPLEMENT_IBASE_GETREFCOUNT</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_INCREF</CODE> => <CODE>SCF_IMPLEMENT_IBASE_INCREF</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_QUERY_END</CODE> => <CODE>SCF_IMPLEMENT_IBASE_QUERY_END</CODE>
<LI>
<CODE>IMPLEMENT_IBASE_QUERY</CODE> => <CODE>SCF_IMPLEMENT_IBASE_QUERY</CODE>
<LI>
<CODE>IMPLEMENT_IBASE</CODE> => <CODE>SCF_IMPLEMENT_IBASE</CODE>
<LI>
<CODE>INC_REF</CODE> => <CODE>SCF_INC_REF</CODE>
<LI>
<CODE>QUERY_INTERFACE_FAST</CODE> => <CODE>SCF_QUERY_INTERFACE_FAST</CODE>
<LI>
<CODE>QUERY_INTERFACE_SAFE</CODE> => <CODE>SCF_QUERY_INTERFACE_SAFE</CODE>
<LI>
<CODE>QUERY_INTERFACE</CODE> => <CODE>SCF_QUERY_INTERFACE</CODE>
<LI>
<CODE>REGISTER_STATIC_CLASS_DEP</CODE> => <CODE>SCF_REGISTER_STATIC_CLASS_DEP</CODE>
<LI>
<CODE>REGISTER_STATIC_CLASS</CODE> => <CODE>SCF_REGISTER_STATIC_CLASS</CODE>
<LI>
<CODE>REGISTER_STATIC_LIBRARY</CODE> => <CODE>SCF_REGISTER_STATIC_LIBRARY</CODE>
</UL>
<P>

Plugin management macro names are now prefixed with `<SAMP>CS_</SAMP>' in order to
avoid polluting the global namespace.
</P><P>

<UL>
<LI>
<CODE>QUERY_PLUGIN_CLASS</CODE> => <CODE>CS_QUERY_PLUGIN_CLASS</CODE>
<LI>
<CODE>LOAD_PLUGIN</CODE> => <CODE>CS_LOAD_PLUGIN</CODE>
<LI>
<CODE>_LOAD_PLUGIN</CODE> => <CODE>CS_LOAD_PLUGIN_ALWAYS</CODE>
</UL>
<P>

Macros for classifying events are now prefixed with `<SAMP>CS_</SAMP>' in order to
avoid polluting the global namespace.
</P><P>

<UL>
<LI>
<CODE>IS_KEYBOARD_EVENT</CODE> => <CODE>CS_IS_KEYBOARD_EVENT</CODE>
<LI>
<CODE>IS_MOUSE_EVENT</CODE> => <CODE>CS_IS_MOUSE_EVENT</CODE>
<LI>
<CODE>IS_JOYSTICK_EVENT</CODE> => <CODE>CS_IS_JOYSTICK_EVENT</CODE>
<LI>
<CODE>IS_NETWORK_EVENT</CODE> => <CODE>CS_IS_NETWORK_EVENT</CODE>
</UL>
<P>

Platform-specific configuration macros are now prefixed with `<SAMP>CS_</SAMP>' in
order to avoid polluting the global namespace.
</P><P>

<UL>
<LI>
<CODE>SOFTWARE_2D_DRIVER</CODE> => <CODE>CS_SOFTWARE_2D_DRIVER</CODE>
<LI>
<CODE>OPENGL_2D_DRIVER</CODE> => <CODE>CS_OPENGL_2D_DRIVER</CODE>
<LI>
<CODE>GLIDE_2D_DRIVER</CODE> => <CODE>CS_GLIDE_2D_DRIVER</CODE>
<LI>
<CODE>SOUND_DRIVER</CODE> => <CODE>CS_SOUND_DRIVER</CODE>
</UL>
<P>

All `<SAMP>csVector</SAMP>'-related macros are now prefixed with `<SAMP>CS_</SAMP>' in order to
avoid polluting the global namespace.  Furthermore,
<CODE>DECLARE_TYPED_SCF_VECTOR()</CODE> has been renamed to
<CODE>CS_DECLARE_TYPED_IBASE_VECTOR()</CODE> in order to more clearly indicate that
this array type works with reference-counted `<SAMP>iBase</SAMP>' objects.
</P><P>

<UL>
<LI>
<CODE>BEGIN_TYPED_VECTOR()</CODE> => <CODE>CS_BEGIN_TYPED_VECTOR()</CODE>
<LI>
<CODE>FINISH_TYPED_VECTOR()</CODE> => <CODE>CS_FINISH_TYPED_VECTOR()</CODE>
<LI>
<CODE>DECLARE_TYPED_VECTOR()</CODE> => <CODE>CS_DECLARE_TYPED_VECTOR()</CODE>
<LI>
<CODE>DECLARE_TYPED_VECTOR_HELPER()</CODE> => <CODE>CS_CS_DECLARE_TYPED_VECTOR_HELPER()</CODE>
<LI>
<CODE>DECLARE_TYPED_VECTOR_NODELETE()</CODE> => <CODE>CS_CS_DECLARE_TYPED_VECTOR_NODELETE()</CODE>
<LI>
<CODE>DECLARE_TYPED_SCF_VECTOR()</CODE> => <CODE>CS_DECLARE_TYPED_IBASE_VECTOR()</CODE>
</UL>
<P>

All `<SAMP>SYSDEF_BLAH</SAMP>' request macros are now prefixed with `<SAMP>CS_</SAMP>' in order
to avoid polluting the global namespace.  Furthermore, each macro name now
contains the word "provide" since these macros are used by client code to
request that `<TT>cssysdef.h</TT>' <EM>provides</EM> certain facilities.
</P><P>

<UL>
<LI>
<CODE>SYSDEF_ACCESS</CODE> => <CODE>CS_SYSDEF_PROVIDE_ACCESS</CODE>
<LI>
<CODE>SYSDEF_ALLOCA</CODE> => <CODE>CS_SYSDEF_PROVIDE_ALLOCA</CODE>
<LI>
<CODE>SYSDEF_CASE</CODE> => <CODE>CS_SYSDEF_PROVIDE_CASE</CODE>
<LI>
<CODE>SYSDEF_DIR</CODE> => <CODE>CS_SYSDEF_PROVIDE_DIR</CODE>
<LI>
<CODE>SYSDEF_GETCWD</CODE> => <CODE>CS_SYSDEF_PROVIDE_GETCWD</CODE>
<LI>
<CODE>SYSDEF_GETOPT</CODE> => <CODE>CS_SYSDEF_PROVIDE_GETOPT</CODE>
<LI>
<CODE>SYSDEF_MKDIR</CODE> => <CODE>CS_SYSDEF_PROVIDE_MKDIR</CODE>
<LI>
<CODE>SYSDEF_PATH</CODE> => <CODE>CS_SYSDEF_PROVIDE_PATH</CODE>
<LI>
<CODE>SYSDEF_SELECT</CODE> => <CODE>CS_SYSDEF_PROVIDE_SELECT</CODE>
<LI>
<CODE>SYSDEF_SOCKETS</CODE> => <CODE>CS_SYSDEF_PROVIDE_SOCKETS</CODE>
<LI>
<CODE>SYSDEF_TEMP</CODE> => <CODE>CS_SYSDEF_PROVIDE_TEMP</CODE>
<LI>
<CODE>SYSDEF_UNLINK</CODE> => <CODE>CS_SYSDEF_PROVIDE_UNLINK</CODE>
</UL>
<P>

Methods in many classes and SCF interfaces have been renamed in order to
improve naming consistency throughout the project.
The following method names changes follow the pattern where
<CODE>GetNumSomething()</CODE> or <CODE>GetNumberSomething()</CODE> became
<CODE>GetSomethingCount()</CODE>.
</P><P>

<UL>
<LI>
<CODE>GetMiniBspNumVerts()</CODE> => <CODE>GetMiniBspVertexCount()</CODE>
<LI>
<CODE>GetNumActions()</CODE> => <CODE>GetActionCount()</CODE>
<LI>
<CODE>GetNumberAging()</CODE> => <CODE>GetAgingCount()</CODE>
<LI>
<CODE>GetNumberEmitters()</CODE> => <CODE>GetEmitterCount()</CODE>
<LI>
<CODE>GetNumberMetaBalls()</CODE> => <CODE>GetMetaBallCount()</CODE>
<LI>
<CODE>GetNumberParticles()</CODE> => <CODE>GetParticleCount()</CODE>
<LI>
<CODE>GetNumCameraPositions()</CODE> => <CODE>GetCameraPositionCount()</CODE>
<LI>
<CODE>GetNumChars()</CODE> => <CODE>GetCharCount()</CODE>
<LI>
<CODE>GetNumCollections()</CODE> => <CODE>GetCollectionCount()</CODE>
<LI>
<CODE>GetNumCollisionPairs()</CODE> => <CODE>GetCollisionPairCount()</CODE>
<LI>
<CODE>GetNumCurves()</CODE> => <CODE>GetCurveCount()</CODE>
<LI>
<CODE>GetNumCurveVertices()</CODE> => <CODE>GetCurveVertexCount()</CODE>
<LI>
<CODE>GetNumDimensions()</CODE> => <CODE>GetDimensionCount()</CODE>
<LI>
<CODE>GetNumEdges()</CODE> => <CODE>GetEdgeCount()</CODE>
<LI>
<CODE>GetNumElements()</CODE> => <CODE>GetElementCount()</CODE>
<LI>
<CODE>GetNumFonts()</CODE> => <CODE>GetFontCount()</CODE>
<LI>
<CODE>GetNumFormats()</CODE> => <CODE>GetFormatCount()</CODE>
<LI>
<CODE>GetNumFrames()</CODE> => <CODE>GetFrameCount()</CODE>
<LI>
<CODE>GetNumMaterials()</CODE> => <CODE>GetMaterialCount()</CODE>
<LI>
<CODE>GetNumMeshFactories()</CODE> => <CODE>GetMeshFactoryCount()</CODE>
<LI>
<CODE>GetNumMeshObjects()</CODE> => <CODE>GetMeshObjectCount()</CODE>
<LI>
<CODE>GetNumNormals()</CODE> => <CODE>GetNormalCount()</CODE>
<LI>
<CODE>GetNumObjects()</CODE> => <CODE>GetObjectCount()</CODE>
<LI>
<CODE>GetNumPalEntries()</CODE> => <CODE>GetPalEntryCount()</CODE>
<LI>
<CODE>GetNumPlanes()</CODE> => <CODE>GetPlaneCount()</CODE>
<LI>
<CODE>GetNumPlugIns()</CODE> => <CODE>GetPlugInCount()</CODE>
<LI>
<CODE>GetNumPoints()</CODE> => <CODE>GetPointCount()</CODE>
<LI>
<CODE>GetNumPolygons()</CODE> => <CODE>GetPolygonCount()</CODE>
<LI>
<CODE>GetNumPolyTxtPlanes()</CODE> => <CODE>GetPolyTxtPlaneCount()</CODE>
<LI>
<CODE>GetNumRepeats()</CODE> => <CODE>GetRepeatCount()</CODE>
<LI>
<CODE>GetNumShadows()</CODE> => <CODE>GetShadowCount()</CODE>
<LI>
<CODE>GetNumSpokes()</CODE> => <CODE>GetSpokeCount()</CODE>
<LI>
<CODE>GetNumTexels()</CODE> => <CODE>GetTexelCount()</CODE>
<LI>
<CODE>GetNumTextureLayers()</CODE> => <CODE>GetTextureLayerCount()</CODE>
<LI>
<CODE>GetNumTextures()</CODE> => <CODE>GetTextureCount()</CODE>
<LI>
<CODE>GetNumTriangles()</CODE> => <CODE>GetTriangleCount()</CODE>
<LI>
<CODE>GetNumVertices()</CODE> => <CODE>GetVertexCount()</CODE>
<LI>
<CODE>GetNumVertsToLight()</CODE> => <CODE>GetVertexToLightCount()</CODE>
<LI>
<CODE>GetStaticNumSamples()</CODE> => <CODE>GetStaticSampleCount()</CODE>
<LI>
<CODE>NumVertices()</CODE> => <CODE>GetVertexCount()</CODE>
<LI>
<CODE>ReportNumberTriangles()</CODE> => <CODE>ReportTriangleCount()</CODE>
<LI>
<CODE>SetNumber()</CODE> => <CODE>SetCount()</CODE>
<LI>
<CODE>SetNumberMetaBalls()</CODE> => <CODE>SetMetaBallCount()</CODE>
<LI>
<CODE>SetNumberParticles()</CODE> => <CODE>SetParticleCount()</CODE>
<LI>
<CODE>SetNumEdges()</CODE> => <CODE>SetEdgeCount()</CODE>
<LI>
<CODE>SetNumPolygons()</CODE> => <CODE>SetPolygonCount()</CODE>
<LI>
<CODE>SetNumSpokes()</CODE> => <CODE>SetSpokeCount()</CODE>
<LI>
<CODE>SetNumVertices()</CODE> => <CODE>SetVertexCount()</CODE>
<LI>
<CODE>Update_Num()</CODE> => <CODE>UpdateCount()</CODE>
</UL>
<P>

The prefix `<SAMP>cs</SAMP>' was added to the following list of functions, and their
names were also normalized.
</P><P>

<UL>
<LI>
<CODE>ByteSwap16bit()</CODE> => <CODE>csByteSwap16bit()</CODE>
<LI>
<CODE>ByteSwap16bitBuffer()</CODE> => <CODE>csByteSwap16bitBuffer()</CODE>
<LI>
<CODE>ByteSwap32bit()</CODE> => <CODE>csByteSwap32bit()</CODE>
<LI>
<CODE>ByteSwap32bitBuffer()</CODE> => <CODE>csByteSwap32bitBuffer()</CODE>
<LI>
<CODE>Combinations()</CODE> => <CODE>csCombinations()</CODE>
<LI>
<CODE>expandname()</CODE> => <CODE>csExpandName()</CODE>
<LI>
<CODE>FindNearestPowerOf2()</CODE> => <CODE>csFindNearestPowerOf2()</CODE>
<LI>
<CODE>fnamematches()</CODE> => <CODE>csFilenameMatches()</CODE>
<LI>
<CODE>fSquare()</CODE> => <CODE>csSquareFloat()</CODE>
<LI>
<CODE>fSwap()</CODE> => <CODE>csSwapFloat()</CODE>
<LI>
<CODE>GenerateHalo()</CODE> => <CODE>csGenerateHalo()</CODE>
<LI>
<CODE>GenerateNova()</CODE> => <CODE>csGenerateNova()</CODE>
<LI>
<CODE>get_token()</CODE> => <CODE>csGetToken()</CODE>
<LI>
<CODE>get_token_float()</CODE> => <CODE>csGetTokenFloat()</CODE>
<LI>
<CODE>get_token_int()</CODE> => <CODE>csGetTokenInt()</CODE>
<LI>
<CODE>IsPowerOf2()</CODE> => <CODE>csIsPowerOf2()</CODE>
<LI>
<CODE>iSwap()</CODE> => <CODE>csSwapInt()</CODE>
<LI>
<CODE>RndNum()</CODE> => <CODE>csRndNum()</CODE>
<LI>
<CODE>ScanStr()</CODE> => <CODE>csScanStr()</CODE>
<LI>
<CODE>skip_token()</CODE> => <CODE>csSkipToken()</CODE>
<LI>
<CODE>splitpath()</CODE> => <CODE>csSplitPath()</CODE>
<LI>
<CODE>strnew()</CODE> => <CODE>csStrNew()</CODE>
</UL>
<P>

<A NAME="SEC683"></A>
<H3> <CODE>csfx</CODE> Library Renamed </H3>
<!--docid::SEC683::-->
<P>

The `<SAMP>csfx</SAMP>' library was renamed to `<SAMP>cstool</SAMP>'.
</P><P>

<A NAME="SEC684"></A>
<H3> <CODE>csobject</CODE> library removed </H3>
<!--docid::SEC684::-->
<P>

The `<TT>csobject</TT>' library has been removed. All files in that
library have moved to `<TT>csutil</TT>'.
</P><P>

<A NAME="SEC685"></A>
<H3> <CODE>csCollider</CODE> </H3>
<!--docid::SEC685::-->
<P>

The `<SAMP>csCollider</SAMP>' facility moved from `<SAMP>csengine</SAMP>' to `<SAMP>cstool</SAMP>' and
was renamed to `<SAMP>csColliderWrapper</SAMP>'.
</P><P>

<A NAME="SEC686"></A>
<H3> Key/Node Mechanism </H3>
<!--docid::SEC686::-->
<P>

The `<SAMP>csKeyValuePair</SAMP>' and `<SAMP>csMapNode</SAMP>' classes moved from
`<TT>csengine</TT>' to `<TT>cstool</TT>'.
</P><P>

<A NAME="SEC687"></A>
<H3> <CODE>csView</CODE> </H3>
<!--docid::SEC687::-->
<P>

The `<SAMP>csView</SAMP>' class moved from `<SAMP>csengine</SAMP>' to `<SAMP>cstool</SAMP>'.
</P><P>

<A NAME="SEC688"></A>
<H3> DDG Terrain Engine Removed </H3>
<!--docid::SEC688::-->
<P>

The DDG landscape engine which used to be featured in Crystal Space has
been removed and was replaced with a simpler landscape engine, but one which is
better integrated with the project. It is now also a mesh object.
</P><P>

<A NAME="SEC689"></A>
<H3> CSWS Modal Session Paradigm Shift </H3>
<!--docid::SEC689::-->
<P>

<CODE>csApp::Execute()</CODE> has been removed.  This method ran a modal session for
dialog panels, and would only return control to the caller when the dialog was
dismissed.  As a replacement for <CODE>Execute()</CODE>, <CODE>csApp::StartModal()</CODE>
and <CODE>csApp::StopModal()</CODE> have been introduced.  <CODE>StartModal()</CODE> sets
up modality for the given component and then immediatelly returns to the
caller.  From the perspective of the GUI user the component behaves in the
standard modal fashion, but from the perspective of the application programmer
this represents a paradigm shift since the application must now watch events
arriving in its <CODE>csApp::HandleEvent()</CODE> method in order to determine when
the modal session has terminated.  Notification arrives in the form of a
`<SAMP>csevCommand</SAMP>' event with command code <CODE>cscmdStopModal</CODE>.  This is sent
when then component's modal session terminates, such as when the "OK" or
"Cancel" button is pressed.
</P><P>

With <CODE>StartModal()</CODE> you can provide a <EM>userdata</EM> argument (which is an
SCF interface that you can implement on your own).  The userdata will be
available at any time while the modal session is active by calling
<CODE>csApp::GetTopModalUserdata()</CODE>.  The modal component can be retrieved with
<CODE>csApp::GetTopModalComponent()</CODE>.  The `<SAMP>Event.Command.Info</SAMP>' field will
be an integer containing the ID of the pressed button (i.e.
<CODE>cscmdOK</CODE>, <CODE>cscmdCancel</CODE>, etc.).
</P><P>

A related change was made to <CODE>csMessageBox()</CODE>.  It also now returns
immediatelly.  It nows sends a similar message to the application when the
message box is closed (via "OK" or "Cancel").  In this case, the
userdata object will implement the SCF interface <CODE>iMessageBoxData</CODE>,
so you can use <CODE>SCF_QUERY_INTERFACE()</CODE> to check for this.
</P><P>

Here is an example on how to define your own userdata object.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>struct ModalData : public iBase
{
  <small>...</small>
  SCF_DECLARE_IBASE;
  ModalData ()
  {
    SCF_CONSTRUCT_IBASE (NULL);
  }
};

SCF_IMPLEMENT_IBASE (ModalData)
SCF_IMPLEMENT_IBASE_END

bool MyApp::HandleEvent (iEvent &#38;Event)
{
  switch (Event.Type)
  {
    case csevCommand:
      switch (Event.Command.Code)
      {
	case APP_OPEN_FILE:
	{ // Allow user to select a file with csFileDialog.
          csWindow* d = csFileDialog (this, "test file dialog");
	  ModalData* data = new ModalData ();
	  <small>...</small>
	  StartModal (d, data);
	  data-&#62;DecRef ();
          return true;
	}
        case cscmdStopModal:
	{
	  csComponent* d = GetTopModalComponent ();
	  int rc = (int)Event.Command.Info;
	  if (rc == 0 || rc == cscmdCancel)
	  {
	    delete d;
	    return true;
	  }
	  iMessageBoxData* mbd =
	    SCF_QUERY_INTERFACE (d, iMessageBoxData);
	  if (mbd)
	  {
	    mbd-&#62;DecRef ();
	    delete d;
	    return true;
	  }
	  ModalData* md = (ModalData*)GetTopModalUserdata ();
	  <small>...</small> // csFileDialog was closed.
	  return true;
	}
	<small>...</small>
}
</pre></td></tr></table></P><P>

<A NAME="SEC690"></A>
<H3> 3d Sprite Factories </H3>
<!--docid::SEC690::-->
<P>

The interface has been modified to show the restrictions of 3d sprites and
to clean it up:
<UL>
<LI>
<CODE>GetNormalCount()</CODE> and <CODE>GetTexelCount()</CODE> have been removed. Sprites
do not allow to have different numbers of vertices, normals and texels. So
<CODE>GetVertexCount()</CODE> should be used instead.
<P>

<LI>
The `<SAMP>count</SAMP>' parameter has been removed from <CODE>SetVertices()</CODE>,
<CODE>SetNormals()</CODE> and <CODE>SetTexels()</CODE>. These functions only worked
properly if the current number of vertices was passed for `<SAMP>count</SAMP>', so
passing the parameter at all makes no sense.
<P>

<LI>
<CODE>GetVertex()</CODE>, <CODE>GetNormal()</CODE> and <CODE>GetTexel()</CODE> now return
`<SAMP>const</SAMP>' objects. To modify these objects, <CODE>SetVertex()</CODE>,
<CODE>SetNormal()</CODE> and <CODE>SetTexel()</CODE> have been added.
</UL>
<P>

<A NAME="SEC691"></A>
<H3> Miscellaneous Changes </H3>
<!--docid::SEC691::-->
<P>

The SCF name of the 3D engine changed from:<BR>
<CODE>crystalspace.engine.core</CODE><BR>
To:
<CODE>crystalspace.engine.3d</CODE>
</P><P>

<CODE>csEngine::NextFrame()</CODE> and <CODE>iEngine::NextFrame()</CODE> are removed.
This is now done automatically in <CODE>csEngine::Draw()</CODE>.
</P><P>

Renamed <CODE>iPortal::GetPortal()</CODE> to <CODE>GetSector()</CODE> and
<CODE>iPortal::SetPortal()</CODE> to <CODE>SetSector()</CODE>.
</P><P>

Removed <CODE>csMeshWrapper::GetChildren()</CODE>.  Instead use
<CODE>csMeshWrapper::AddChild()</CODE> and <CODE>csMeshWrapper::RemoveChild()</CODE>.
</P><P>

Renamed <CODE>iEngine::CreateMeshObject()</CODE> to
<CODE>iEngine::CreateMeshWrapper()</CODE>. In general all iEngine functions that
work mesh wrappers will be renamed like that.
</P><P>

Renamed <CODE>csFilenameMatches()</CODE> to <CODE>csGlobMatches()</CODE> (from
`<TT>csutil</TT>' library).
</P><P>

From the `<SAMP>iEngine</SAMP>' interface, these two methods were removed:
</P><P>

<UL>
<LI>
<CODE>iEngine::EnableLightingCache()</CODE>
<LI>
<CODE>iEngine::IsLightingCacheEnabled()</CODE>
</UL>
<P>

They were replaced by these methods:
</P><P>

<UL>
<LI>
<CODE>iEngine::SetLightingCacheMode()</CODE>
<LI>
<CODE>GetLightingCacheMode()</CODE>
</UL>
<P>

<CODE>FrameWidth</CODE> and <CODE>FrameHeight</CODE> are no longer available
in <CODE>SysSystemDriver</CODE> (entire system driver is gone in fact). Instead
you have to call <CODE>GetWidth()</CODE> and <CODE>GetHeight()</CODE> on the pointer
to the canvas (<CODE>iGraphics2D</CODE>).
<A NAME="API Modifications 18"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_281.html#SEC657"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_283.html#SEC692"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_279.html#SEC650"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_279.html#SEC650"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711"> &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>