/*
    File:               vpw_exp.c
    Author:             michael stevens
    Experiment:         Viewing position effect (words)
                        Stevens & Grainger 2003
                        
        Experiment
        
            Instructions
            Practice trials
            More Instructions
            Experimental trials
                short break halfway the list
            Close
*/



// include functions from vpw_trial.c
#define VPW_EXP_C
#include "vpw_trial.c"


// get session information
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()
{
    // screen parameters
    ts_refreshrate(60);
    ts_scrsize(XGA);
    ts_scrmode(FULLSCREEN);
    ts_font(COURIER, 20, BOLD);
    ts_textmode(BLACK);


    // activate escape key
    ts_defkey(KEY_ESC);

    // get session info and prepare trial list
    info();
    readwords();
    randomize(subj);

    // practice
    instructions1();
    int i;
    for (i = 0; i < NTRIALSPRACT; i++)
        trial(i);


    // experimental trials
    instructions2();
    for (; i < NTRIALS; i++) {
        if (i > NTRIALSPRACT && (i - NTRIALSPRACT) % 90 == 0)
            short_break();
        trial(i);
    }

    // write & exit
    writedata();
    bye();
    return 0;
}

END_OF_MAIN();


top
Persoonlijke pagina Universiteit GentTscope
Allegro | Cygwin | Gcc
© See license.html for copyright information