home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
gnu
/
gchsrc31.lzh
/
CURSOR.CC
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-27
|
1KB
|
50 lines
//////////////////////////////////////////////////////////////////////////////
//
// This file is part of the Atari graphical interface for GNU Chess,
// and is Copyright 1992 by Warwick W. Allison.
//
// You are free to copy and modify these sources, provided you acknowledge
// the origin by retaining this notice, and adhere to the conditions
// of the CHESS General Public License described in the main chess file
// gnuchess.cc.
//
//////////////////////////////////////////////////////////////////////////////
#include "Cursor.h"
#include "Piece.h"
#include <stdio.h>
Sprite *Cursor;
void InitCursor(Screen& S)
{
const NumRanks=6; // Pawn to King
Incarnation **I=new Incarnation*[4+NumRanks*2];
for (int i=0; i<2; i++) {
I[i]=new ColourIncarnation(16);
I[i]->GetImage(S,2*16,16*i);
}
I[0]->SetHotSpot(0,0);
I[1]->SetHotSpot(10,15);
for (i=2; i<4; i++) {
I[i]=new WideColourIncarnation(11);
I[i]->GetImage(S,2*16,32+11*(i-2));
}
I[2]->SetHotSpot(16,5);
I[3]->SetHotSpot(16,5);
int p=0;
for (int c=0; c<2; c++) {
p++; // Skip no_piece
for (int r=0; r<NumRanks; r++) {
I[i]=RankImage[p];
i++;
p++;
}
}
Cursor=new Sprite(I,4+NumRanks*2);
}