sourcehook/test/testmanual.cpp
changeset 211 af7f4f2148f5
parent 199 7a5b326bb7f8
child 294 0d87bc8606f8
     1.1 --- a/sourcehook/test/testmanual.cpp	Thu May 25 16:43:51 2006 +0000
     1.2 +++ b/sourcehook/test/testmanual.cpp	Thu Jun 08 18:34:18 2006 +0000
     1.3 @@ -76,6 +76,7 @@
     1.4  	void Handler_Func2(int x)
     1.5  	{
     1.6  		ADD_STATE(State_Func2H_Called(META_IFACEPTR(void), x));
     1.7 +		RETURN_META_MNEWPARAMS(MRES_IGNORED, TheWall_Func2, (0x87654321));
     1.8  	}
     1.9  	short Handler_Func3()
    1.10  	{
    1.11 @@ -85,7 +86,9 @@
    1.12  	short Handler_Func4(int x)
    1.13  	{
    1.14  		ADD_STATE(State_Func4H_Called(META_IFACEPTR(void), x));
    1.15 -		return 0;
    1.16 +
    1.17 +		// newparams (recall) using the manual hook declaration!
    1.18 +		RETURN_META_VALUE_MNEWPARAMS(MRES_IGNORED, 0, TheWall_Func4, (0x12345678));
    1.19  	}
    1.20  
    1.21  	struct AnotherBrick
    1.22 @@ -166,12 +169,12 @@
    1.23  		new State_Func1H_Called(p),
    1.24  		new State_Func1_Called(p),
    1.25  		new State_Func2H_Called(p, 200),
    1.26 -		new State_Func2_Called(p, 200),
    1.27 +		new State_Func2_Called(p, 0x87654321),
    1.28  		new State_Func3H_Called(p),
    1.29  		new State_Func3_Called(p),
    1.30  		new State_Return(3),
    1.31  		new State_Func4H_Called(p, 400),
    1.32 -		new State_Func4_Called(p, 400),
    1.33 +		new State_Func4_Called(p, 0x12345678),
    1.34  		new State_Return(4),
    1.35  		NULL), "Part 2");
    1.36  
    1.37 @@ -225,12 +228,12 @@
    1.38  		new State_Func1H_Called(p),
    1.39  		new State_Func1_Called(p),
    1.40  		new State_Func2H_Called(p, 200),
    1.41 -		new State_Func2_Called(p, 200),
    1.42 +		new State_Func2_Called(p, 0x87654321),
    1.43  		new State_Func3H_Called(p),
    1.44  		new State_Func3_Called(p),
    1.45  		new State_Return(3),
    1.46  		new State_Func4H_Called(p, 400),
    1.47 -		new State_Func4_Called(p, 400),
    1.48 +		new State_Func4_Called(p, 0x12345678),
    1.49  		new State_Return(4),
    1.50  		NULL), "Part 3");
    1.51  
    1.52 @@ -304,15 +307,15 @@
    1.53  		new State_Func1H_Called(p),
    1.54  		//new State_Func1_Called(p),
    1.55  		new State_Func2H_Called(p, 200),
    1.56 -		new State_Func2H_Called(p, 200),
    1.57 -		new State_Func2_Called(p, 200),
    1.58 +		new State_Func2H_Called(p, 0x87654321),
    1.59 +		new State_Func2_Called(p, 0x87654321),
    1.60  		new State_Func3H_Called(p),
    1.61  		new State_Func3H_Called(p),
    1.62  		new State_Func3_Called(p),
    1.63  		new State_Return(3),
    1.64  		new State_Func4H_Called(p, 400),
    1.65 -		new State_Func4H_Called(p, 400),
    1.66 -		new State_Func4_Called(p, 400),
    1.67 +		new State_Func4H_Called(p, 0x12345678),
    1.68 +		new State_Func4_Called(p, 0x12345678),
    1.69  		new State_Return(4),
    1.70  		NULL), "Part 4");
    1.71