8
« on: September 01, 2002, 11:20:24 AM »
I figured I'd make two sets of views. 25-28 remained animated, and 31-34 became the static counterparts. When one is selected, it's switched to the animated view and the old one is switched back to the static view, the animated view discarded. That way, only two animated views at most had to be on the screen at once:
if (f5) {
v120 = 3;
load.pic(v120);
draw.pic(v120);
discard.pic(v120);
set.horizon(50);
status.line.off();
prevent.input();
program.control();
animate.obj(o1);
animate.obj(o2);
animate.obj(o3);
animate.obj(o4);
// start the 1st icon with its animated view, the others with the static
load.view(26);
set.view(o1,26);
load.view(31);
set.view(o2,31);
load.view(33);
set.view(o3,33);
load.view(34);
set.view(o4,34);
position(o1,46,85);
position(o2,82,85);
position(o3,46,142);
position(o4,82,142);
set.loop(o1,1);
draw(o1);
draw(o2);
draw(o3);
draw(o4);
v121=1;
show.pic();
end.of.loop(o1,f120);
set.key(0,66,c41);
set.key(0,68,c40);
display(22,1,"Press f8 to select, f10 to confirm.");
}
if (f120) {
player.control();
}
if (controller(c41)) {
if (v121 == 4) {
// load up o4's static view 34, get rid of animated view 28, and load and assign o1's animated view. The same follows for the rest.
load.view(34);
set.view(o4,34);
discard.view(28);
load.view(26);
set.view(o1,26);
set.loop(o1,1);
force.update(o1);
force.update(o4);
end.of.loop(o1,f121);
v121=1;
}
else {
if (v121 == 3) {
load.view(33);
set.view(o3,33);
discard.view(27);
load.view(28);
set.view(o4,28);
set.loop(o4,1);
force.update(o3);
force.update(o4);
end.of.loop(o4,f121);
v121=4;
}
if (v121 == 2) {
load.view(31);
set.view(o2,31);
discard.view(25);
load.view(27);
set.view(o3,27);
set.loop(o3,1);
force.update(o2);
force.update(o3);
end.of.loop(o3,f121);
v121=3;
}
if (v121 == 1) {
load.view(32);
set.view(o1,32);
discard.view(26);
load.view(25);
set.view(o2,25);
set.loop(o2,1);
force.update(o1);
force.update(o2);
end.of.loop(o2,f121);
v121=2;
}
}
}
if (controller(c40)){
if (v121 == 1) {
new.room(3);
}
if (v121 == 2) {
accept.input();
status.line.on();
set(f115);
new.room(29);
}
if (v121 == 3) {
restore.game();
}
if (v121 == 4) {
quit(0);
}
}
return();
And now, when I load it up, if I hit f8 to go to the second icon the entire screen goes one color with various random streaks of others, and it freezes.
So, any help would be appreciated. I'm mostly just befuddled as to why the original code stopped working, memory-wise, since it worked for so long before and no major changes were made. Mmf.