i got some error on this code from allegro please

hello i am unstuck at this question because i dont know how to call it..and random animation is something confusing here
here's my question
and here's my coding.
i am unstuck on how to do random animate.
from animation.cpp i got transx,transy,transxy,transpxny.
but now i dunno how to use the ScreenSaver(Screen& Shape* shps[]) which it wants to pass shapes into which is in this case i made a house..and what to do inside the void ScreenSaver(Screen& Shape* shps[])?the escape function i declared inside the void screensaver earlier alreadi.

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
#include <allegro.h>
#include "House.h"
#include "ExampleColors.h"
#include "HelperFunctions.h"

//----Set Screen Resolution
ust XRES = 1024; 
ust YRES = 600;
//----Set house center-------
Point* houseCenter = new Point(900,450);

//---Make 2 homes-------------
House* h = new House(houseCenter, new Point(150,150), WHITE, BLUE, 30,30,15,15);
//--------------------------
void ScreenSaver(Screen& Shape* shps[]);
int main(){
Screen scr(*BLACK, XRES,YRES); //Initialize screen
//Color* backCol = scr.getBg(); //create a variable to store background color
allegro_init();//Allegro initialization
install_keyboard();//Set up for keyboard input

//Set the graphics mode to a 320x240-pixel window.
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320,240,0,0);
h->draw(scr);
ScreenSaver(scr& House*h[]);
///TransX( scr, h, h, -100,3,1);//moving house in x direction for -100 value
//TransXY( scr, h, h, -100,3,1)///moving house in x and y direction
//TransY( scr, h, h, -100,3,1)//moving house in y direction
//TransPXNY( scr, h, h, -100,3,1)//move house in +x and-y direction
//scr.refresh();
//scr.wait(6000); //wait for 6 seconds
//can also use system("pause") here instead;
return 0;

} 
void ScreenSaver(Screen& House*h[])
{

int i;
while(!key[KEY_ESC]){//loop until user presses Esc key

clear_keybuf();
rest(10);
for(i=0;i<i-1;i++)
{
i++;
TransX( scr, h, h, i,3,1);
}

return (0);
}
END_OF_MAIN();
[/code]

#include <allegro.h>
#include "House.h"
#include "ExampleColors.h"
#include "HelperFunctions.h"

//----Set Screen Resolution
ust XRES = 1024; 
ust YRES = 600;
//----Set house center-------
Point* houseCenter = new Point(900,450);

//---Make 2 homes-------------
House* h = new House(houseCenter, new Point(150,150), WHITE, BLUE, 30,30,15,15);
//--------------------------
void ScreenSaver(Screen& Shape* shps[]);
int main(){
Screen scr(*BLACK, XRES,YRES); //Initialize screen
//Color* backCol = scr.getBg(); //create a variable to store background color
allegro_init();//Allegro initialization
install_keyboard();//Set up for keyboard input

//Set the graphics mode to a 320x240-pixel window.
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320,240,0,0);
h->draw(scr);
ScreenSaver(scr& House*h[]);
///TransX( scr, h, h, -100,3,1);//moving house in x direction for -100 value
//TransXY( scr, h, h, -100,3,1)///moving house in x and y direction
//TransY( scr, h, h, -100,3,1)//moving house in y direction
//TransPXNY( scr, h, h, -100,3,1)//move house in +x and-y direction
//scr.refresh();
//scr.wait(6000); //wait for 6 seconds
//can also use system("pause") here instead;
return 0;

} 
void ScreenSaver(Screen& House*h[])
{

int i;
while(!key[KEY_ESC]){//loop until user presses Esc key

clear_keybuf();
rest(10);
for(i=0;i<i-1;i++)
{
i++;
TransX( scr, h, h, i,3,1);
}

return (0);
}
END_OF_MAIN();
[/code]
#include <allegro.h>
#include "House.h"
#include "ExampleColors.h"
#include "HelperFunctions.h"

//----Set Screen Resolution
ust XRES = 1024; 
ust YRES = 600;
//----Set house center-------
Point* houseCenter = new Point(900,450);

//---Make 2 homes-------------
House* h = new House(houseCenter, new Point(150,150), WHITE, BLUE, 30,30,15,15);
//--------------------------
void ScreenSaver(Screen& Shape* shps[]);
int main(){
Screen scr(*BLACK, XRES,YRES); //Initialize screen
//Color* backCol = scr.getBg(); //create a variable to store background color
allegro_init();//Allegro initialization
install_keyboard();//Set up for keyboard input

//Set the graphics mode to a 320x240-pixel window.
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320,240,0,0);
h->draw(scr);
ScreenSaver(scr& House*h[]);
///TransX( scr, h, h, -100,3,1);//moving house in x direction for -100 value
//TransXY( scr, h, h, -100,3,1)///moving house in x and y direction
//TransY( scr, h, h, -100,3,1)//moving house in y direction
//TransPXNY( scr, h, h, -100,3,1)//move house in +x and-y direction
//scr.refresh();
//scr.wait(6000); //wait for 6 seconds
//can also use system("pause") here instead;
return 0;

} 
void ScreenSaver(Screen& House*h[])
{

int i;
while(!key[KEY_ESC]){//loop until user presses Esc key

clear_keybuf();
rest(10);
for(i=0;i<i-1;i++)
{
i++;
TransX( scr, h, h, i,3,1);
}

return (0);
}


the thing is how to use the void screensaver thing?
Topic archived. No new replies allowed.