Das deutsche QBasic- und FreeBASIC-Forum Foren-Übersicht Das deutsche QBasic- und FreeBASIC-Forum
Für euch erreichbar unter qb-forum.de, fb-forum.de und freebasic-forum.de!
 
FAQFAQ   SuchenSuchen   MitgliederlisteMitgliederliste   BenutzergruppenBenutzergruppen  RegistrierenRegistrieren
ProfilProfil   Einloggen, um private Nachrichten zu lesenEinloggen, um private Nachrichten zu lesen   LoginLogin
Zur Begleitseite des Forums / Chat / Impressum
Aktueller Forenpartner:

Warlord Schachbrett

 
Neues Thema eröffnen   Neue Antwort erstellen    Das deutsche QBasic- und FreeBASIC-Forum Foren-Übersicht -> Projektvorstellungen
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen  
Autor Nachricht
Roland Chastain



Anmeldungsdatum: 05.12.2011
Beiträge: 183
Wohnort: Dakar, Senegal

BeitragVerfasst am: 31.03.2018, 15:03    Titel: Warlord Schachbrett Antworten mit Zitat

Hallo!

Ich habe diese einfach Schachbrett gemacht. Die Figuren kommen aus das Warlord programm.



Sie können colors.bi finden hier.

Code:

#include "fbgfx.bi"
#include "colors.bi"

using fb

#define SCALE 48

screenres 8 * SCALE, 8 * SCALE, 32
windowtitle "Warlord Chessboard"

dim shared as integer board(7, 7)
dim shared as image ptr images(-6 to 7)
const BACKGROUND = 0
const DARKSQUARE = 7
const LIGHT = MEDIUMSLATEBLUE
const DARK = DARKSLATEBLUE
const SLASHFILL = true
dim as string datum
dim as integer x, y, i

for y = 7 to 0 step -1
  for x = 0 to 7
    read board(x, y)
  next x
next y

for i = 0 to 5
  for y = 0 to SCALE - 1
    read datum
    for x = 0 to SCALE - 1
      select case mid(datum, x + 1, 1)
        case "0"
          pset(x + i * SCALE, y),         MAGENTA
          pset(x + i * SCALE, y + SCALE), MAGENTA
        case "1"
          pset(x + i * SCALE, y),         GRAY
          pset(x + i * SCALE, y + SCALE), GRAY
        case "2"
          pset(x + i * SCALE, y),         WHITE
          pset(x + i * SCALE, y + SCALE), BLACK
      end select
    next x
  next y
next i

if SLASHFILL then
  for x = 1 to 6 * SCALE - 2
    for y = 1 to 2 * SCALE - 2
      if point(x, y) = MAGENTA then
        if (point(x,     y - 1) = GRAY) _
        or (point(x + 1, y - 1) = GRAY) _
        or (point(x + 1, y    ) = GRAY) _
        or (point(x + 1, y + 1) = GRAY) _
        or (point(x,     y + 1) = GRAY) _
        or (point(x - 1, y + 1) = GRAY) _
        or (point(x - 1, y    ) = GRAY) _
        or (point(x - 1, y - 1) = GRAY) then
          pset(x, y), LIGHT
        end if
      end if
    next y
  next x
end if

for x = 0 to SCALE - 1
  for y = 0 to SCALE - 1
    pset(x, y + 2 * SCALE), iif((x + y) mod 5 = 2, BLACK, MAGENTA)
  next y
next x

for i = -6 to 7
  images(i) = imagecreate(SCALE, SCALE)
next i

for i = 1 to 6
  get ((i - 1) * SCALE, 0)-((i - 1) * SCALE + SCALE - 1, SCALE - 1), images(i)
next i

for i = -6 to -1
  get ((-1 - i) * SCALE, SCALE)-((-1 - i) * SCALE + SCALE - 1, SCALE + SCALE - 1), images(i)
next i

if SLASHFILL then
  get (0, 2 * SCALE)-(SCALE - 1, 3 * SCALE - 1), images(DARKSQUARE)
else
  line images(DARKSQUARE), (0, 0)-(SCALE - 1, SCALE - 1), DARK, BF
end if

/'
const symbol = "prnbqk"
for i = 1 to 6
  bsave "w" & mid(symbol, i, 1) & ".bmp", images(i)
  bsave "b" & mid(symbol, i, 1) & ".bmp", images(-i)
next i
bsave "dark.bmp", images(DARKSQUARE)
'/

sleep

sub update()
  screenlock()
 
  line (0, 0)-(8 * SCALE - 1, 8 * SCALE - 1), LIGHT, bf
 
  for y as integer = 0 to 7
    for x as integer = 0 to 7
      if (x + y) mod 2 = 0 then
        put (x * SCALE, (7 - y) * SCALE), images(DARKSQUARE), trans
      end if
      if board(x, y) <> 0 then
        put (x * SCALE, (7 - y) * SCALE), images(board(x, y)), trans
      end if
    next x
  next y

  screenunlock()
end sub

sub getmove()
  dim as integer piece
  dim as integer mx, my, btn, omx, omy
  dim as integer x, y, ox, oy, dx, dy

  getmouse mx, my,, btn
  omx = mx
  omy = my

  if  mx < 8 * SCALE and my < 8 * SCALE and btn = 1 then
    x = mx \ SCALE
    y = 7 - (my \ SCALE)
   
    if SLASHFILL then
      line images(BACKGROUND), (0, 0)-(SCALE - 1, SCALE - 1), LIGHT, BF
      if (x + y) mod 2 = 0 then
        put images(BACKGROUND), (0, 0), images(DARKSQUARE), (0, 0)-(SCALE - 1, SCALE - 1), TRANS
      end if
    else
      line images(BACKGROUND), (0, 0)-(SCALE - 1, SCALE - 1), iif((x + y) mod 2 = 1, LIGHT, DARK), BF
    end if
   
    if board(x, y) <> 0 then
     
      piece = board(x, y)
      board(x, y) = 0

      x = x * SCALE
      y = (7 - y) * SCALE
     
      ox = x
      oy = y

      while btn = 1
        getmouse mx, my,, btn

        dx = mx - omx
        dy = my - omy

        if (dx <> 0) _
        or (dy <> 0) then
         
          x = x + dx
          y = y + dy
         
          if x < 0 then
            x = 0
          elseif x > 7 * SCALE then
            x = 7 * SCALE
          elseif y < 0 then
            y = 0
          elseif y > 7 * SCALE then
            y = 7 * SCALE
          end if
         
          put (ox, oy), images(0), PSET
          get (x, y)-(x + SCALE - 1, y + SCALE - 1), images(BACKGROUND)
          put (x, y), images(piece), TRANS
         
          omx = mx
          omy = my
          ox = x
          oy = y
        end if
      wend

      x = mx \ SCALE
      y = 7 - (my \ SCALE)

      board(x, y) = piece

      update()
    end if
  end if
end sub

dim key as string

update()
do
  getmove()
  key = inkey
loop until (key = chr(255) & "k") or (key = chr(27))

data -2,-3,-4,-5,-6,-4,-3,-2
data -1,-1,-1,-1,-1,-1,-1,-1
data  0, 0, 0, 0, 0, 0, 0, 0
data  0, 0, 0, 0, 0, 0, 0, 0
data  0, 0, 0, 0, 0, 0, 0, 0
data  0, 0, 0, 0, 0, 0, 0, 0
data  1, 1, 1, 1, 1, 1, 1, 1
data  2, 3, 4, 5, 6, 4, 3, 2

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000011111111000000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000001222222222210000000000000000000"
data "000000000000000012222222222221000000000000000000"
data "000000000000000122222222221222100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222221222100000000000000000"
data "000000000000000012222222222221000000000000000000"
data "000000000000000001222222222210000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000001222222222210000000000000000000"
data "000000000000000012222222222221000000000000000000"
data "000000000000000122222222221222100000000000000000"
data "000000000000001222222222222122210000000000000000"
data "000000000000012222222222222212221000000000000000"
data "000000000000122222222222222221222100000000000000"
data "000000000001222222222222222222122210000000000000"
data "000000000012222222222222222222212221000000000000"
data "000000000122222222222222222222222222100000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001221111111111111111111111112221000000000"
data "000000001222222222222222222222222222221000000000"
data "000000001222222222222222222222222222221000000000"
data "000000001222222222222222222222222222221000000000"
data "000000001111111111111111111111111111111000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000111111110011111111001111111100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222211112222221111222222100000000000"
data "000000000122222222222222222222222222100000000000"
data "000000000122222222222222222222222222100000000000"
data "000000000122222222222222222222222222100000000000"
data "000000000111121111111111111111112111100000000000"
data "000000000000122222222222222222222100000000000000"
data "000000000000122111111122222222222100000000000000"
data "000000000000122100000122222222222100000000000000"
data "000000000000122100000122222222222100000000000000"
data "000000000000122100000122222222222100000000000000"
data "000000000000122111111122222222222100000000000000"
data "000000000000122222222221111111222100000000000000"
data "000000000000122222222221000001222100000000000000"
data "000000000000122222222221000001222100000000000000"
data "000000000000122222222221000001222100000000000000"
data "000000000000122222222221111111222100000000000000"
data "000000000000122222222222222222222100000000000000"
data "000000000000121111111111111111112100000000000000"
data "000000000011222222222222222222222211000000000000"
data "000000000122222222222222222222222222100000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001111111111111111111111111111110000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000010000000000000000"
data "000000000000000000000000000000121000000000000000"
data "000000000000000000000000000001222100000000000000"
data "000000000000000000000000000012222100000000000000"
data "000000000000000000000000000122222100000000000000"
data "000000000000000000000000001222222100000000000000"
data "000000000000000000000011111222221210000000000000"
data "000000000000000000011122221222221221000000000000"
data "000000000000000000122222222222222221000000000000"
data "000000000000000001221112222222222222100000000000"
data "000000000000000012211122222222222222100000000000"
data "000000000000001122222222222222222212210000000000"
data "000000000000112222222222222222222221221000000000"
data "000000000001222222222222222222222222122100000000"
data "000000001112222222222222222222222212212100000000"
data "000000012222222222222222221222222221221100000000"
data "000000012222222222222222221222222222122100000000"
data "000000012222222222222222212222222212212100000000"
data "000000011222211111111111122222222221221100000000"
data "000000000111100000012221222222222222122100000000"
data "000000000000000000012221222222222212212100000000"
data "000000000000000000012221222222222221221100000000"
data "000000000000000000012221222222222222122100000000"
data "000000000000000000012221222222222222212100000000"
data "000000000000000000012221222222222222221000000000"
data "000000000000000000122212222222222222210000000000"
data "000000000000000011222122222222222222210000000000"
data "000000000000001122222222222222222222210000000000"
data "000000000000112222222222222222222222221000000000"
data "000000000011221111111111111111111111122110000000"
data "000000000122222222222222222222222222222210000000"
data "000000001222222222222222222222222222222210000000"
data "000000001222222222222222222222222222222210000000"
data "000000001111111111111111111111111111111110000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000011111000000000000000000000"
data "000000000000000000000122222100000000000000000000"
data "000000000000000000001222222210000000000000000000"
data "000000000000000000012222222221000000000000000000"
data "000000000000000000122222222222100000000000000000"
data "000000000000000001222222222222210000000000000000"
data "000000000000000012222221112222221000000000000000"
data "000000000000000122222221012222222100000000000000"
data "000000000000001222222221012222222210000000000000"
data "000000000000012222222221012222222221000000000000"
data "000000000000122222222221012222222222100000000000"
data "000000000000122222111111011111122222100000000000"
data "000000000000122222100000000000122222100000000000"
data "000000000000122222111111011111122222100000000000"
data "000000000000122222222221012222222222100000000000"
data "000000000000122222222221012222222222100000000000"
data "000000000000012222222221012222222221000000000000"
data "000000000000001222222221012222222210000000000000"
data "000000000000000122222221112222222100000000000000"
data "000000000000000012222222222222221000000000000000"
data "000000000000000001222222222222210000000000000000"
data "000000000000000000122222222222100000000000000000"
data "000000000000000000012111111121000000000000000000"
data "000000000000000000012222222221000000000000000000"
data "000000000000000000012111111121000000000000000000"
data "000000000100000000122222222222100000000100000000"
data "000000001210000001222222222222210000001210000000"
data "000000001221111112222111111122221111112210000000"
data "000000001222222222221000000012222222222210000000"
data "000000000122222222210000000001222222222100000000"
data "000000000011111111100000000000111111111000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000110000000000000000000000"
data "000000000000000000000001221000000000000000000000"
data "000000000000000000000012222100000000000000000000"
data "000000000000000000000122112210000000000000000000"
data "000000000000000010001221001221000100000000000000"
data "000000000000000121001222112221001210000000000000"
data "000000000000001222100122222210012221000000000000"
data "000000000000012212210012222100122122100000000000"
data "000000000000122101221001221001221012210000000000"
data "000000000000012212210001221000122122100000000000"
data "000000000100001222100001221000012221000010000000"
data "000000001210000122100001221000012210000121000000"
data "000000012221000012210001221000122100001222100000"
data "000000122122100001221001221001221000012212210000"
data "000000122112210001222101221012221000122112210000"
data "000000012222100000122211221122210000012222100000"
data "000000001221000000122221221222210000001221000000"
data "000000000122100000012222222222100000012210000000"
data "000000000012211000012222222222100001122100000000"
data "000000000001222110001222222221000112221000000000"
data "000000000000122221101222222221011222210000000000"
data "000000000000012222211222222221122222100000000000"
data "000000000000001222222222222222222221000000000000"
data "000000000000000122222222112222222210000000000000"
data "000000000000000012222221001222222100000000000000"
data "000000000000000001222210000122221000000000000000"
data "000000000000000000122221001222210000000000000000"
data "000000000000000000012222112222100000000000000000"
data "000000000000000011122222222222211100000000000000"
data "000000000000000122222222222222222210000000000000"
data "000000000000000122222222222222222210000000000000"
data "000000000000000122222222222222222210000000000000"
data "000000000001111122111111111111112211111000000000"
data "000000000012222222222222222222222222222100000000"
data "000000000122222222222222222222222222222210000000"
data "000000001222222222222222222222222222222221000000"
data "000000001222222222222222222222222222222221000000"
data "000000001222222222222222222222222222222221000000"
data "000000001111111111111111111111111111111111000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000001100000000000000000000000"
data "000000000000000000000012210000000000000000000000"
data "000000000000000000000122221000000000000000000000"
data "000000000000000000001221122100000000000000000000"
data "000000000000000000012210012210000000000000000000"
data "000000000000000000012210012210000000000000000000"
data "000000000000111111001221122100111111000000000000"
data "000000000001222222100122221001222222100000000000"
data "000000000012211112210122221012211112210000000000"
data "000000000122122221221122221122122221221000000000"
data "000000001221222222122222222221222222122100000000"
data "000000012212222222212222222212222222212210000000"
data "000000122122211211221222222122112112221221000000"
data "000000121222210101222122221222101012222121000000"
data "000000121222221012222222222222210122222121000000"
data "000000121222210101222222222222101012222121000000"
data "000000122122211211222222222222112112221221000000"
data "000000012212222222222222122222222222212210000000"
data "000000001221222222222221012222222222122100000000"
data "000000000122122222222210001222222221221000000000"
data "000000000012212222222100000122222212210000000000"
data "000000000001221222222210001222222122100000000000"
data "000000000000122122222221012222221221000000000000"
data "000000000000012212222222122222212210000000000000"
data "000000000000001221222222222222122100000000000000"
data "000000000000000122122222222221221000000000000000"
data "000000000000000012212222222212210000000000000000"
data "000000000000000111222222222222111000000000000000"
data "000000000000001222222222222222222100000000000000"
data "000000000000012222222222222222222210000000000000"
data "000000000000012222222222222222222210000000000000"
data "000000000000012222222222222222222210000000000000"
data "000000000001112211111111111111112211100000000000"
data "000000000012222222222222222222222222210000000000"
data "000000000122222222222222222222222222221000000000"
data "000000001222222222222222222222222222222100000000"
data "000000001222222222222222222222222222222100000000"
data "000000001222222222222222222222222222222100000000"
data "000000001111111111111111111111111111111100000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
Roland Chastain



Anmeldungsdatum: 05.12.2011
Beiträge: 183
Wohnort: Dakar, Senegal

BeitragVerfasst am: 03.04.2018, 19:43    Titel: Antworten mit Zitat

Hier ist eine komplett neu geschriebene Version des Codes. Es gibt jetzt einen benutzerdefinierten Cursor.

Code:

' chessboard.bas

#include "fbgfx.bi"

#include "colors.bi"
#include "pieces.bi"
#include "cursor.bi"

const BRDX = 0
const BRDY = 0
const SQRW = 48
const BRDW = 8 * SQRW
const BUFW = 10 * SQRW
const LSC = colors.MEDIUMSLATEBLUE
const DSC = colors.SLATEBLUE
const A = 1
const H = 8
const EMPTY = 0
const PAWN = 1
const KING = 6
const BLACK = -1
const BACKGROUND = 0
const DARKSQUARE = 7
const GRAB = 1
const GRABBING = 2
const CURW = 32
const SLASHFILL = true
const UPSIDEDOWN = false

PiecePlacement:

data -2,-3,-4,-5,-6,-4,-3,-2
data -1,-1,-1,-1,-1,-1,-1,-1
data  0, 0, 0, 0, 0, 0, 0, 0
data  0, 0, 0, 0, 0, 0, 0, 0
data  0, 0, 0, 0, 0, 0, 0, 0
data  0, 0, 0, 0, 0, 0, 0, 0
data  1, 1, 1, 1, 1, 1, 1, 1
data  2, 3, 4, 5, 6, 4, 3, 2

ScreenRes(BRDW, BRDW, 32,, fb.GFX_NULL)

dim shared as integer board(A to H, 1 to 8)
dim shared as fb.image ptr images(BLACK * KING to DARKSQUARE)
dim shared as fb.image ptr cursor(BACKGROUND to GRABBING)
dim shared as integer mx, my, mb, ox = 0, oy = 0, cur = GRAB
dim buffer as fb.image ptr = ImageCreate(BUFW, BUFW, LSC)

declare sub CreateImages()
declare sub DestroyImages()
declare sub DrawImages()
declare sub LoadBoard()
declare sub Redraw(aBuffer as fb.image ptr)
declare sub BufferToScreen(aBuffer as fb.image ptr)
declare sub RedrawBackgroundImage(aX as const integer, aY as const integer)
declare function XToBoard() as integer
declare function YToBoard() as integer
declare function XYToName(aX as const integer, aY as const integer) as string
declare sub PreventCursorExit()

CreateImages()
DrawImages()
LoadBoard()

ScreenRes(BRDW, BRDW, 32)
WindowTitle("Warlord Chessboard")
SetMouse ,, 0
Redraw(buffer)
BufferToScreen(buffer)

dim as integer dx, dy, brd, px, py
dim key as string
dim forceRedraw as boolean = false

do
  Sleep(1)
  if GetMouse(mx, my,, mb) = 0 then
    PreventCursorExit()
    if (cur = GRAB) andalso (mb = 1) andalso (board(XToBoard(), YToBoard()) <> EMPTY) then
      cur = GRABBING
      dx = SQRW * (mx \ SQRW) - mx
      dy = SQRW * (my \ SQRW) - my
      px = XToBoard()
      py = YToBoard()
      brd = board(px, py)
      RedrawBackgroundImage(px, py)
      forceRedraw = true
    elseif (cur = GRABBING) andalso (mb = 0) then
      cur = GRAB
      board(px, py) = EMPTY
      px = XToBoard()
      py = YToBoard()
      board(px, py) = brd
      Redraw(buffer)
      BufferToScreen(buffer)
    end if
    if cbool((mx <> ox) or (my <> oy)) or forceRedraw then
      if cbool(cur = GRABBING) and not forceRedraw then
        Put buffer, (ox + dx + SQRW, oy + dy + SQRW), images(BACKGROUND), PSET
        Get buffer, (mx + dx + SQRW, my + dy + SQRW)-(mx + dx + 2 * SQRW - 1, my + dy + 2 * SQRW - 1), images(BACKGROUND)
        Put buffer, (mx + dx + SQRW, my + dy + SQRW), images(brd), TRANS
      else
        forceRedraw = false
        if (ox <> 0) and (oy <> 0) then
          Put buffer, (ox + SQRW - 16, oy + SQRW - 16), cursor(BACKGROUND), PSET
        end if
      end if
      Get buffer, (mx + SQRW - 16, my + SQRW - 16)-(mx + SQRW + 15, my + SQRW + 15), cursor(BACKGROUND)
      Put buffer, (mx + SQRW - 16, my + SQRW - 16), cursor(cur), TRANS
      BufferToScreen(buffer)
      ox = mx
      oy = my
    end if
  end if
  key = InKey
loop until (key = Chr(255) & "k") or (key = Chr(27))

SetMouse ,, 1

DestroyImages()

sub CreateImages()
  for i as integer = BLACK * KING to DARKSQUARE
    images(i) = ImageCreate(SQRW, SQRW)
  next i
  for i as integer = BACKGROUND to GRABBING
    cursor(i) = ImageCreate(CURW, CURW)
  next i
end sub

sub DestroyImages()
  for i as integer = BLACK * KING to DARKSQUARE
    ImageDestroy(images(i))
  next i

  for i as integer = BACKGROUND to GRABBING
    ImageDestroy(cursor(i))
  next i
end sub

sub DrawImages()
  const SYMBOLS = "prnbqk"
 
  dim datum as string
  dim as uinteger c1, c2
 
  Restore WarlordChessPieces
  for i as integer = PAWN to KING
    for y as integer = 0 to SQRW - 1
      Read(datum)
      for x as integer = 0 to SQRW - 1
        select case as const datum[x]
          case asc("0")
            c1 = colors.MAGENTA
            c2 = colors.MAGENTA
          case asc("1")
            c1 = colors.GRAY
            c2 = colors.GRAY
          case asc("2")
            c1 = colors.IVORY
            c2 = colors.BLACK
        end select
        PSet images( i), (x, y), c1
        PSet images(-i), (x, y), c2
      next x
    next y
  next i

  if SLASHFILL then
    for i as integer = BLACK * KING to KING
      if i = BACKGROUND then
        continue for
      end if
      for x as integer = 1 to SQRW - 2
        for y as integer = 1 to SQRW - 2
          if Point(x, y, images(i)) = colors.MAGENTA then
            if (Point(x,     y - 1, images(i)) = colors.GRAY) _
            or (Point(x + 1, y - 1, images(i)) = colors.GRAY) _
            or (Point(x + 1, y,     images(i)) = colors.GRAY) _
            or (Point(x + 1, y + 1, images(i)) = colors.GRAY) _
            or (Point(x,     y + 1, images(i)) = colors.GRAY) _
            or (Point(x - 1, y + 1, images(i)) = colors.GRAY) _
            or (Point(x - 1, y,     images(i)) = colors.GRAY) _
            or (Point(x - 1, y - 1, images(i)) = colors.GRAY) then
              PSet images(i), (x, y), LSC
            end if
          end if
        next y
      next x
    next i
    for x as integer = 0 to SQRW - 1
      for y as integer = 0 to SQRW - 1
        PSet images(DARKSQUARE), (x, y), iif((x + y) mod 5 = 2, colors.BLACK, colors.MAGENTA)
      next y
    next x
  else
    Line images(DARKSQUARE), (0, 0)-(SQRW - 1, SQRW - 1), DSC, BF
  end if

  Restore HandCursor:
  for i as integer = GRAB to GRABBING
    for y as integer = 0 to CURW - 1
      Read datum
      for x as integer = 0 to CURW - 1
        select case as const datum[x]
          case asc("0")
            PSet cursor(i), (x, y), colors.MAGENTA
          case asc("1")
            PSet cursor(i), (x, y), colors.BLACK
          case asc("2")
            PSet cursor(i), (x, y), &hFFEFFF
        end select
      next x
    next y
  next i

  if false then
    for i as integer = PAWN to KING
      BSave "w" & mid(SYMBOLS, i, 1) & ".bmp", images(i)
      BSave "b" & mid(SYMBOLS, i, 1) & ".bmp", images(-i)
    next i
    BSave "darksquare.bmp", images(DARKSQUARE)
    BSave "grab.bmp", cursor(GRAB)
    BSave "grabbing.bmp", cursor(GRABBING)
  end if
end sub

sub LoadBoard()
  Restore PiecePlacement:
  for y as integer = 8 to 1 step -1
    for x as integer = A to H
      Read(board(x, y))
    next x
  next y
end sub

sub Redraw(aBuffer as fb.image ptr)
  dim as integer xToBuf, yToBuf
  Line aBuffer, (0, 0)-(BUFW, BUFW), LSC, BF
  for y as integer = 1 to 8
    for x as integer = A to H
      xToBuf = x * SQRW
      yToBuf = IIf(UPSIDEDOWN, y, 9 - y) * SQRW
      if (x + y) mod 2 = 0 then
        Put aBuffer, (xToBuf, yToBuf), images(DARKSQUARE), TRANS
      end if
      if board(x, y) <> EMPTY then
        Put aBuffer, (xToBuf, yToBuf), images(board(x, y)), TRANS
      end if
    next x
  next y
  if (mx <> 0) or (my <> 0) then
    Get aBuffer, (mx + SQRW - 16, my + SQRW - 16)-(mx + SQRW + 15, my + SQRW + 15), cursor(BACKGROUND)
    Put aBuffer, (mx + SQRW - 16, my + SQRW - 16), cursor(cur), TRANS
  end if
end sub

sub BufferToScreen(aBuffer as fb.image ptr)
  Put (BRDX, BRDY), aBuffer, (SQRW, SQRW)-(9 * SQRW - 1, 9 * SQRW - 1), PSET
end sub

sub RedrawBackgroundImage(aX as const integer, aY as const integer)
  if SLASHFILL then
    Line images(BACKGROUND), (0, 0)-(SQRW - 1, SQRW - 1), LSC, BF
    if (aX + aY) mod 2 = 0 then
      Put images(BACKGROUND), (0, 0), images(DARKSQUARE), (0, 0)-(SQRW - 1, SQRW - 1), TRANS
    end if
  else
    Line images(BACKGROUND), (0, 0)-(SQRW - 1, SQRW - 1), iif((aX + aY) mod 2 = 1, LSC, DSC), BF
  end if
end sub

function XToBoard() as integer
  return mx \ SQRW + 1
end function

function YToBoard() as integer
  return IIf(UPSIDEDOWN, my \ SQRW + 1, 8 - my \ SQRW)
end function

function XYToName(aX as const integer, aY as const integer) as string
  return Chr(Asc("a") - 1 + aX, Asc("1") - 1 + aY)
end function

sub PreventCursorExit()
  const BORDER = 12
  if mx < BORDER then
    mx = BORDER
  elseif mx > BRDW - 1 - BORDER then
    mx = BRDW - 1 - BORDER
  end if
  if my < BORDER then
    my = BORDER
  elseif my > BRDW - 1 - BORDER then
    my = BRDW - 1 - BORDER
  end if
end sub


Code:

' colors.bi

namespace colors

const AliceBlue = &hF0F8FF
const AlizarinCrimson = &hE32636
const Amber = &hFFBF00
const Amethyst = &h9966CC
const AntiqueWhite = &hFAEBD7
const Aquamarine = &h7FFFD4
const Asparagus = &h7BA05B
const Azure = &hF0FFFF
const Beige = &hF5F5DC
const Bisque = &hFFE4C4
const Bistre = &h3D2B1F
const BitterLemon = &hCAE00D
const Black = &h000000
const BlanchedAlmond = &hFFEBCD
const BlazeOrange = &hFF9900
const Blue = &h0000FF
const BlueViolet = &h8A2BE2
const BondiBlue = &h0095B6
const Brass = &hB5A642
const BrightGreen = &h66FF00
const BrightTurquoise = &h08E8DE
const BrightViolet = &hCD00CD
const Bronze = &hCD7F32
const Brown = &hA52A2A
const Buff = &hF0DC82
const Burgundy = &h900020
const BurlyWood = &hDEB887
const BurntOrange = &hCC5500
const BurntSienna = &hE97451
const BurntUmber = &h8A3324
const CadetBlue = &h5F9EA0
const CamouflageGreen = &h78866B
const Cardinal = &hC41E3A
const Carmine = &h960018
const Carrot = &hED9121
const Casper = &hADBED1
const Celadon = &hACE1AF
const Cerise = &hDE3163
const Cerulean = &h007BA7
const CeruleanBlue = &h2A52BE
const Chartreuse = &h7FFF00
const Chocolate = &hD2691E
const Cinnamon = &h7B3F00
const Cobalt = &h0047AB
const Copper = &hB87333
const Coral = &hFF7F50
const Corn = &hFBEC5D
const CornflowerBlue = &h6495ED
const Cornsilk = &hFFF8DC
const Cream = &hFFFDD0
const Crimson = &hDC143C
const Cyan = &h00FFFF
const DarkBlue = &h00008B
const DarkBrown = &h654321
const DarkCerulean = &h08457E
const DarkChestnut = &h986960
const DarkCoral = &hCD5B45
const DarkCyan = &h008B8B
const DarkGoldenrod = &hB8860B
const DarkGray = &h545454
const DarkGreen = &h006400
const DarkIndigo = &h310062
const DarkKhaki = &hBDB76B
const DarkMagenta = &h8B008B
const DarkOlive = &h556832
const DarkOliveGreen = &h556B2F
const DarkOrange = &hFF8C00
const DarkOrchid = &h9932CC
const DarkPastelGreen = &h03C03C
const DarkPink = &hE75480
const DarkRed = &h8B0000
const DarkSalmon = &hE9967A
const DarkScarlet = &h560319
const DarkSeaGreen = &h8FBC8F
const DarkSlateBlue = &h483D8B
const DarkSlateGray = &h2F4F4F
const DarkSpringGreen = &h177245
const DarkTan = &h918151
const DarkTangerine = &hFFA812
const DarkTeaGreen = &hBADBAD
const DarkTerraCotta = &hCC4E5C
const DarkTurquoise = &h00CED1
const DarkViolet = &h9400D3
const DeepPink = &hFF1493
const DeepSkyBlue = &h00BFFF
const Denim = &h1560BD
const DimGray = &h696969
const DodgerBlue = &h1E90FF
const Emerald = &h50C878
const Eggplant = &h990066
const FernGreen = &h4F7942
const FireBrick = &hB22222
const Flax = &hEEDC82
const FloralWhite = &hFFFAF0
const ForestGreen = &h228B22
const Fractal = &h808080
const Fuchsia = &hF400A1
const Gainsboro = &hDCDCDC
const Gamboge = &hE49B0F
const GhostWhite = &hF8F8FF
const Gold = &hFFD700
const Goldenrod = &hDAA520
const Gray = &h7E7E7E
const GrayAsparagus = &h465945
const GrayTeaGreen = &hCADABA
const Green = &h008000
const GreenYellow = &hADFF2F
const Heliotrope = &hDF73FF
const Honeydew = &hF0FFF0
const HotPink = &hFF69B4
const IndianRed = &hCD5C5C
const Indigo = &h4B0082
const InternationalKleinBlue = &h002FA7
const InternationalOrange = &hFF4F00
const Ivory = &hFFFFF0
const Jade = &h00A86B
const Khaki = &hF0E68C
const Lavender = &hE6E6FA
const LavenderBlush = &hFFF0F5
const LawnGreen = &h7CFC00
const Lemon = &hFDE910
const LemonChiffon = &hFFFACD
const LightBlue = &hADD8E6
const LightBrown = &hD2B48C
const LightCoral = &hF08080
const LightCyan = &hE0FFFF
const LightGoldenrodYellow = &hFAFAD2
const LightGray = &hA8A8A8
const LightGreen = &h90EE90
const LightMagenta = &hFF80FF
const LightPink = &hFFB6C1
const LightRed = &hFF8080
const LightSalmon = &hFFA07A
const LightSeaGreen = &h20B2AA
const LightSkyBlue = &h87CEFA
const LightSlateGray = &h778899
const LightSteelBlue = &hB0C4DE
const LightYellow = &hFFFFE0
const Lilac = &hC8A2C8
const Lime = &h00FF00
const LimeGreen = &h32CD32
const Linen = &hFAF0E6
const Magenta = &hFF00FF
const Malachite = &h0BDA51
const Maroon = &h800000
const Mauve = &hE0B0FF
const MediumAquamarine = &h66CDAA
const MediumBlue = &h0000CD
const MediumOrchid = &hBA55D3
const MediumPurple = &h9370DB
const MediumSeaGreen = &h3CB371
const MediumSlateBlue = &h7B68EE
const MediumSpringGreen = &h00FA9A
const MediumTurquoise = &h48D1CC
const MediumVioletRed = &hC71585
const MidnightBlue = &h191970
const MintCream = &hF5FFFA
const MistyRose = &hFFE4E1
const Moccasin = &hFFE4B5
const MoneyGreen = &hC0DCC0
const Monza = &hC7031E
const MossGreen = &hADDFAD
const MountbattenPink = &h997A8D
const Mustard = &hFFDB58
const NavajoWhite = &hFFDEAD
const Navy = &h000080
const Ochre = &hCC7722
const OldGold = &hCFB53B
const OldLace = &hFDF5E6
const Olive = &h808000
const OliveDrab = &h6B8E23
const Orange = &hFFA500
const OrangeRed = &hFF4500
const Orchid = &hDA70D6
const PaleBrown = &h987654
const PaleCarmine = &hAF4035
const PaleChestnut = &hDDADAF
const PaleCornflowerBlue = &hABCDEF
const PaleGoldenrod = &hEEE8AA
const PaleGreen = &h98FB98
const PaleMagenta = &hF984E5
const PaleMauve = &h996666
const PalePink = &hFADADD
const PaleSandyBrown = &hDABDAB
const PaleTurquoise = &hAFEEEE
const PaleVioletRed = &hDB7093
const PapayaWhip = &hFFEFD5
const PastelGreen = &h77DD77
const PastelPink = &hFFD1DC
const Peach = &hFFE5B4
const PeachOrange = &hFFCC99
const PeachPuff = &hFFDAB9
const PeachYellow = &hFADFAD
const Pear = &hD1E231
const Periwinkle = &hCCCCFF
const PersianBlue = &h6600FF
const Peru = &hCD853F
const PineGreen = &h01796F
const Pink = &hFFC0CB
const PinkOrange = &hFF9966
const Plum = &hDDA0DD
const PowderBlue = &hB0E0E6
const PrussianBlue = &h003153
const Puce = &hCC8899
const Pumpkin = &hFF7518
const Purple = &h800080
const RawUmber = &h734A12
const Red = &hFF0000
const Reef = &hC9FFA2
const RobinEggBlue = &h00CCCC
const RosyBrown = &hBC8F8F
const RoyalBlue = &h4169E1
const Russet = &h80461B
const Rust = &hB7410E
const SaddleBrown = &h8B4513
const Saffron = &hF4C430
const Salmon = &hFA8072
const SandyBrown = &hF4A460
const Sangria = &h92000A
const Sapphire = &h082567
const Scarlet = &hFF2400
const SchoolBusYellow = &hFFD800
const SeaGreen = &h2E8B57
const SeaShell = &hFFF5EE
const SelectiveYellow = &hFFBA00
const Sepia = &h704214
const Sienna = &hA0522D
const Silver = &hC0C0C0
const SkyBlue = &h87CEEB
const SlateBlue = &h6A5ACD
const SlateGray = &h708090
const Snow = &hFFFAFA
const SpringGreen = &h00FF7F
const SteelBlue = &h4682B4
const SwampGreen = &hACB78E
const Taupe = &hBC987E
const Tangerine = &hFFCC00
const Teal = &h008080
const TeaGreen = &hD0F0C0
const Tenne = &hCD5700
const TerraCotta = &hE2725B
const Thistle = &hD8BFD8
const Tomato = &hFF6347
const Turquoise = &h40E0D0
const Ultramarine = &h120A8F
const Vermilion = &hFF4D00
const Violet = &hEE82EE
const VioletEggplant = &h991199
const Viridian = &h40826D
const Wheat = &hF5DEB3
const White = &hFFFFFF
const WhiteSmoke = &hF5F5F5
const Wisteria = &hC9A0DC
const Yellow = &hFFFF00
const YellowGreen = &h9ACD32
const Zinnwaldite = &hEBC2AF

end namespace


Code:

' pieces.bi

WarlordChessPieces:

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000011111111000000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000001222222222210000000000000000000"
data "000000000000000012222222222221000000000000000000"
data "000000000000000122222222221222100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222221222100000000000000000"
data "000000000000000012222222222221000000000000000000"
data "000000000000000001222222222210000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000001222222222210000000000000000000"
data "000000000000000012222222222221000000000000000000"
data "000000000000000122222222221222100000000000000000"
data "000000000000001222222222222122210000000000000000"
data "000000000000012222222222222212221000000000000000"
data "000000000000122222222222222221222100000000000000"
data "000000000001222222222222222222122210000000000000"
data "000000000012222222222222222222212221000000000000"
data "000000000122222222222222222222222222100000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001221111111111111111111111112221000000000"
data "000000001222222222222222222222222222221000000000"
data "000000001222222222222222222222222222221000000000"
data "000000001222222222222222222222222222221000000000"
data "000000001111111111111111111111111111111000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000111111110011111111001111111100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222211112222221111222222100000000000"
data "000000000122222222222222222222222222100000000000"
data "000000000122222222222222222222222222100000000000"
data "000000000122222222222222222222222222100000000000"
data "000000000111121111111111111111112111100000000000"
data "000000000000122222222222222222222100000000000000"
data "000000000000122111111122222222222100000000000000"
data "000000000000122100000122222222222100000000000000"
data "000000000000122100000122222222222100000000000000"
data "000000000000122100000122222222222100000000000000"
data "000000000000122111111122222222222100000000000000"
data "000000000000122222222221111111222100000000000000"
data "000000000000122222222221000001222100000000000000"
data "000000000000122222222221000001222100000000000000"
data "000000000000122222222221000001222100000000000000"
data "000000000000122222222221111111222100000000000000"
data "000000000000122222222222222222222100000000000000"
data "000000000000121111111111111111112100000000000000"
data "000000000011222222222222222222222211000000000000"
data "000000000122222222222222222222222222100000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001111111111111111111111111111110000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000010000000000000000"
data "000000000000000000000000000000121000000000000000"
data "000000000000000000000000000001222100000000000000"
data "000000000000000000000000000012222100000000000000"
data "000000000000000000000000000122222100000000000000"
data "000000000000000000000000001222222100000000000000"
data "000000000000000000000011111222221210000000000000"
data "000000000000000000011122221222221221000000000000"
data "000000000000000000122222222222222221000000000000"
data "000000000000000001221112222222222222100000000000"
data "000000000000000012211122222222222222100000000000"
data "000000000000001122222222222222222212210000000000"
data "000000000000112222222222222222222221221000000000"
data "000000000001222222222222222222222222122100000000"
data "000000001112222222222222222222222212212100000000"
data "000000012222222222222222221222222221221100000000"
data "000000012222222222222222221222222222122100000000"
data "000000012222222222222222212222222212212100000000"
data "000000011222211111111111122222222221221100000000"
data "000000000111100000012221222222222222122100000000"
data "000000000000000000012221222222222212212100000000"
data "000000000000000000012221222222222221221100000000"
data "000000000000000000012221222222222222122100000000"
data "000000000000000000012221222222222222212100000000"
data "000000000000000000012221222222222222221000000000"
data "000000000000000000122212222222222222210000000000"
data "000000000000000011222122222222222222210000000000"
data "000000000000001122222222222222222222210000000000"
data "000000000000112222222222222222222222221000000000"
data "000000000011221111111111111111111111122110000000"
data "000000000122222222222222222222222222222210000000"
data "000000001222222222222222222222222222222210000000"
data "000000001222222222222222222222222222222210000000"
data "000000001111111111111111111111111111111110000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000011111000000000000000000000"
data "000000000000000000000122222100000000000000000000"
data "000000000000000000001222222210000000000000000000"
data "000000000000000000012222222221000000000000000000"
data "000000000000000000122222222222100000000000000000"
data "000000000000000001222222222222210000000000000000"
data "000000000000000012222221112222221000000000000000"
data "000000000000000122222221012222222100000000000000"
data "000000000000001222222221012222222210000000000000"
data "000000000000012222222221012222222221000000000000"
data "000000000000122222222221012222222222100000000000"
data "000000000000122222111111011111122222100000000000"
data "000000000000122222100000000000122222100000000000"
data "000000000000122222111111011111122222100000000000"
data "000000000000122222222221012222222222100000000000"
data "000000000000122222222221012222222222100000000000"
data "000000000000012222222221012222222221000000000000"
data "000000000000001222222221012222222210000000000000"
data "000000000000000122222221112222222100000000000000"
data "000000000000000012222222222222221000000000000000"
data "000000000000000001222222222222210000000000000000"
data "000000000000000000122222222222100000000000000000"
data "000000000000000000012111111121000000000000000000"
data "000000000000000000012222222221000000000000000000"
data "000000000000000000012111111121000000000000000000"
data "000000000100000000122222222222100000000100000000"
data "000000001210000001222222222222210000001210000000"
data "000000001221111112222111111122221111112210000000"
data "000000001222222222221000000012222222222210000000"
data "000000000122222222210000000001222222222100000000"
data "000000000011111111100000000000111111111000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000110000000000000000000000"
data "000000000000000000000001221000000000000000000000"
data "000000000000000000000012222100000000000000000000"
data "000000000000000000000122112210000000000000000000"
data "000000000000000010001221001221000100000000000000"
data "000000000000000121001222112221001210000000000000"
data "000000000000001222100122222210012221000000000000"
data "000000000000012212210012222100122122100000000000"
data "000000000000122101221001221001221012210000000000"
data "000000000000012212210001221000122122100000000000"
data "000000000100001222100001221000012221000010000000"
data "000000001210000122100001221000012210000121000000"
data "000000012221000012210001221000122100001222100000"
data "000000122122100001221001221001221000012212210000"
data "000000122112210001222101221012221000122112210000"
data "000000012222100000122211221122210000012222100000"
data "000000001221000000122221221222210000001221000000"
data "000000000122100000012222222222100000012210000000"
data "000000000012211000012222222222100001122100000000"
data "000000000001222110001222222221000112221000000000"
data "000000000000122221101222222221011222210000000000"
data "000000000000012222211222222221122222100000000000"
data "000000000000001222222222222222222221000000000000"
data "000000000000000122222222112222222210000000000000"
data "000000000000000012222221001222222100000000000000"
data "000000000000000001222210000122221000000000000000"
data "000000000000000000122221001222210000000000000000"
data "000000000000000000012222112222100000000000000000"
data "000000000000000011122222222222211100000000000000"
data "000000000000000122222222222222222210000000000000"
data "000000000000000122222222222222222210000000000000"
data "000000000000000122222222222222222210000000000000"
data "000000000001111122111111111111112211111000000000"
data "000000000012222222222222222222222222222100000000"
data "000000000122222222222222222222222222222210000000"
data "000000001222222222222222222222222222222221000000"
data "000000001222222222222222222222222222222221000000"
data "000000001222222222222222222222222222222221000000"
data "000000001111111111111111111111111111111111000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"

data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000001100000000000000000000000"
data "000000000000000000000012210000000000000000000000"
data "000000000000000000000122221000000000000000000000"
data "000000000000000000001221122100000000000000000000"
data "000000000000000000012210012210000000000000000000"
data "000000000000000000012210012210000000000000000000"
data "000000000000111111001221122100111111000000000000"
data "000000000001222222100122221001222222100000000000"
data "000000000012211112210122221012211112210000000000"
data "000000000122122221221122221122122221221000000000"
data "000000001221222222122222222221222222122100000000"
data "000000012212222222212222222212222222212210000000"
data "000000122122211211221222222122112112221221000000"
data "000000121222210101222122221222101012222121000000"
data "000000121222221012222222222222210122222121000000"
data "000000121222210101222222222222101012222121000000"
data "000000122122211211222222222222112112221221000000"
data "000000012212222222222222122222222222212210000000"
data "000000001221222222222221012222222222122100000000"
data "000000000122122222222210001222222221221000000000"
data "000000000012212222222100000122222212210000000000"
data "000000000001221222222210001222222122100000000000"
data "000000000000122122222221012222221221000000000000"
data "000000000000012212222222122222212210000000000000"
data "000000000000001221222222222222122100000000000000"
data "000000000000000122122222222221221000000000000000"
data "000000000000000012212222222212210000000000000000"
data "000000000000000111222222222222111000000000000000"
data "000000000000001222222222222222222100000000000000"
data "000000000000012222222222222222222210000000000000"
data "000000000000012222222222222222222210000000000000"
data "000000000000012222222222222222222210000000000000"
data "000000000001112211111111111111112211100000000000"
data "000000000012222222222222222222222222210000000000"
data "000000000122222222222222222222222222221000000000"
data "000000001222222222222222222222222222222100000000"
data "000000001222222222222222222222222222222100000000"
data "000000001222222222222222222222222222222100000000"
data "000000001111111111111111111111111111111100000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"


Code:

' cursor.bi

HandCursor:

data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000110000000000000000"
data "00000000001101221110000000000000"
data "00000000012211221221000000000000"
data "00000000012211221221010000000000"
data "00000000001221221221121000000000"
data "00000000001221221221221000000000"
data "00000000110122222221221000000000"
data "00000001221122222222221000000000"
data "00000001222122222222210000000000"
data "00000000122222222222210000000000"
data "00000000012222222222210000000000"
data "00000000012222222222100000000000"
data "00000000001222222222100000000000"
data "00000000000122222221000000000000"
data "00000000000012222221000000000000"
data "00000000000012222221000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"

data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000110110110000000000000"
data "00000000001221221221100000000000"
data "00000000001222222221210000000000"
data "00000000000122222222210000000000"
data "00000000001122222222210000000000"
data "00000000012222222222210000000000"
data "00000000012222222222100000000000"
data "00000000001222222222100000000000"
data "00000000000122222221000000000000"
data "00000000000012222221000000000000"
data "00000000000012222221000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
data "00000000000000000000000000000000"
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
Roland Chastain



Anmeldungsdatum: 05.12.2011
Beiträge: 183
Wohnort: Dakar, Senegal

BeitragVerfasst am: 04.04.2018, 19:59    Titel: Antworten mit Zitat

Hier ist eine neue Version des Projekts. Kommentare und Verbesserungen sind willkommen. happy

http://www.eschecs.fr/fichiers/freebasic/warlordchessboard.zip
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
Beiträge der letzten Zeit anzeigen:   
Neues Thema eröffnen   Neue Antwort erstellen    Das deutsche QBasic- und FreeBASIC-Forum Foren-Übersicht -> Projektvorstellungen Alle Zeiten sind GMT + 1 Stunde
Seite 1 von 1

 
Gehe zu:  
Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.

 Impressum :: Datenschutz