Pol
Revision:c08e511
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
testdrop1.cpp
Go to the documentation of this file.
1
7
// TODO: REWORK ME!!
8
//
9
//#include "../pol/uconst.h"
10
//#include "../clib/logfacility.h"
11
//#include "realm.h"
12
//#include "mapserver.h"
13
//
14
// namespace Pol {
15
// namespace Plib {
16
// void inc_successes();
17
// void inc_failures();
18
//
19
// extern Realm* p_test_realm;
20
//
21
// // This code should mirror code in drop_item_on_ground
22
// static void test_drop( unsigned short chrx, unsigned short chry, short chrz,
23
// unsigned short dropx, unsigned short dropy, short dropz, bool exp_result, short
24
//exp_z )
25
// {
26
// if ( p_test_realm == NULL )
27
// p_test_realm = new Realm( "britannia" );
28
//
29
// fmt::Writer tmp;
30
// tmp << "POL DropHeight(" << chrx << "," << chry << "," << chrz << ","
31
// << dropx << "," << dropy << "," << dropz << "): "
32
// << "Expect " << exp_result << "," << exp_z << ": ";
33
//
34
// short newz;
35
// Multi::UMulti* multi;
36
// bool result = p_test_realm->dropheight( dropx, dropy, dropz, chrz, &newz, &multi );
37
// tmp << "Got " << result << "," << newz << ": ";
38
// if ( exp_result != result )
39
// {
40
// tmp << "Failure!\n";
41
// INFO_PRINT << tmp.str();
42
// inc_failures();
43
// return;
44
// }
45
// if ( result )
46
// {
47
// if ( newz != exp_z )
48
// {
49
// tmp << "Failure!\n";
50
// INFO_PRINT << tmp.str();
51
// inc_failures();
52
// return;
53
// }
54
// }
55
// inc_successes();
56
// INFO_PRINT << tmp.str() << "Ok!\n";
57
// }
58
//
59
// void pol_drop_test( void )
60
// {
61
// INFO_PRINT << "POL datafile drop tests:\n";
62
// // first things first. Gotta be able to drop stuff by the brit bank.
63
// test_drop( 1432, 1696, 0, 1433, 1696, 0, true, 0 );
64
// // in the bank, on the floor
65
// test_drop( 1437, 1687, 0, 1437, 1688, 0, true, 0 );
66
//
67
// // on a desk in LB's castle
68
// test_drop( 1328, 1645, 72, 1328, 1644, 78, true, 78 );
69
//
70
// // one of these screwy undermap caves
71
// test_drop( 2564, 489, 0, 2564, 489, 0, true, 0 );
72
// test_drop( 2564, 489, 42, 2564, 489, 42, false, 0 );
73
//
74
// // a liche room
75
// test_drop( 5310, 735, 0, 5310, 735, 0, true, 0 );
76
//
77
// // a downward slope
78
// test_drop( 5304, 2488, 39, 5304, 2489, 35, true, 35 );
79
//
80
// // a ramp in an orc fort
81
// test_drop( 5210, 3616, 0, 5210, 3615, 5, true, 2 );
82
// }
83
// }
84
//}
85
//
plib
testdrop1.cpp
Generated on Wed Dec 14 2016 02:40:44 for Pol by
1.8.11