#define VPW_EXP_C
#include "vpw_trial.c"
int subj;
void info()
{
int x;
do {
ts_clrscr();
x = ts_printf(-ax(.9), ay(.9), "Participant (0-69): ");
ts_scanf(-ax(.9) + x, ay(.9), "%d", &subj);
} while (subj < 0 || subj > 69);
ts_clrscr();
}
void instructions1()
{
ts_clrscr();
ts_printf_centre(0, 0, "Enter the word that appeared");
ts_printf_centre(0, -ay(.25), "(enter = I don't know)");
ts_button(0, -ay(.5));
ts_clrscr();
}
void instructions2()
{
ts_clrscr();
ts_printf_centre(0, 0, "And now for real ...");
ts_button(0, -ay(.5));
ts_clrscr();
}
void short_break()
{
ts_clrscr();
ts_printf_centre(0, 0, "Break");
ts_button(0, -ay(.5));
ts_clrscr();
}
void bye()
{
ts_clrscr();
ts_printf_centre(0, 0, "That's all");
ts_button(0, -ay(.5));
ts_clrscr();
}
int main()
{
ts_refreshrate(60);
ts_scrsize(XGA);
ts_scrmode(FULLSCREEN);
ts_font(COURIER, 20, BOLD);
ts_textmode(BLACK);
ts_defkey(KEY_ESC);
info();
readwords();
randomize(subj);
instructions1();
int i;
for (i = 0; i < NTRIALSPRACT; i++)
trial(i);
instructions2();
for (; i < NTRIALS; i++) {
if (i > NTRIALSPRACT && (i - NTRIALSPRACT) % 90 == 0)
short_break();
trial(i);
}
writedata();
bye();
return 0;
}
END_OF_MAIN();