Exemplo n.º 1
0
// Initialization of the Amstrad CPC at the start of the application
void initializeCPC() {
   // Disable firmware: we dont want it to interfere with our code
   cpct_disableFirmware();

   // Set the function interruptHandler to be called on each interrupt.
   cpct_setInterruptHandler(interruptHandler);

   // Set the hardware palette (convert firmware colour values to hardware ones and set the palette)
   cpct_fw2hw(G_palette, 16);
   cpct_setPalette(G_palette, 16);    // Descomentar estas tres lineas cuando tengamos paleta
   cpct_setBorder(G_palette[0]);

   // Change to Mode 0 (160x200, 16 colours)
   cpct_setVideoMode(0);

}
Exemplo n.º 2
0
//////////////////////////////////////////////////////////////////
// initialization
//
//  initializes the whole program
//
// Returns:
//    void
//
void initialization() {
    u32 seed;    // Value to initialize the random seed

    // Music on
    activateMusic();
    cpct_setInterruptHandler(interruptHandler);

    drawText("AMSTHREES IS READY", 31, 76, 1);
    drawText("PRESS ANY KEY", 20, 90, 1);

    seed = wait4UserKeypress();
    // Random seed may never be 0, so check first and add 1 if it was 0
    if (!seed)
        seed++;
    cpct_srand(seed);

    //Deactivates Camelot Mode
    camelotMode = 0;
    // Asign the classic deck to the game
    cards = &(*cards1);

    scoreHallOfFame[0] = 10000;
    scoreHallOfFame[1] = 8000;
    scoreHallOfFame[2] = 6000;
    scoreHallOfFame[3] = 4000;
    scoreHallOfFame[4] = 2000;
    scoreHallOfFame[5] = 1000;
    scoreHallOfFame[6] = 500;
    scoreHallOfFame[7] = 300;

    strcpy(nameHallOfFame[0], "MARTIN [");
    strcpy(nameHallOfFame[1], "DIEGO \\");
    strcpy(nameHallOfFame[2], "MARIA ]");
    strcpy(nameHallOfFame[3], "DAVID ^");
    strcpy(nameHallOfFame[4], "MASTER");
    strcpy(nameHallOfFame[5], "EXPERT");
    strcpy(nameHallOfFame[6], "INTERMEDIATE");
    strcpy(nameHallOfFame[7], "BEGINNER");


    clearScreen();

    keys.up    = Key_CursorUp;
    keys.down  = Key_CursorDown;
    keys.left  = Key_CursorLeft;
    keys.right = Key_CursorRight;
    keys.fire  = Key_Space;
    keys.pause = Key_Del;
    keys.abort = Key_Esc;
    keys.music = Key_M;
    keys.camelotmode = Key_C;

    selectedOption = 0;

    highestCardAll = 0;


    cpct_etm_setTileset2x4(tileset);

    resetChangedCards();

}