gomoku: Use 1-bit images instead of chars.

git-svn-id: svn://kolibrios.org@7673 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2019-06-23 00:55:52 +00:00
parent e196fc9e1b
commit fefed7d26d

View File

@ -1,6 +1,6 @@
;http://sources.ru/pascal/gamestxt/go-moku.zip ;http://sources.ru/pascal/gamestxt/go-moku.zip
N equ 19 ; Size of the board N = 19 ; Size of the board
use32 use32
org 0x0 org 0x0
@ -8,8 +8,8 @@ use32
dd 0x1 dd 0x1
dd START dd START
dd I_END dd I_END
dd (I_END+200+13*N*N) and not 3 dd E_END
dd (I_END+200+13*N*N) and not 3 dd E_END
dd 0x0,0x0 dd 0x0,0x0
include '../../../macros.inc' include '../../../macros.inc'
@ -36,8 +36,8 @@ redraw_all:
mcall 48,4 mcall 48,4
xchg eax,ecx xchg eax,ecx
add ecx,100*65536+(16*N+26) add ecx,100*65536+(16*N+26)
mcall 0,100*65536+(16*N+12),,0x34FFFFFF,,title mcall 0,<100,16*N+12>,,0x34FFFFFF,,title
mcall 38,2*65536+(16*N),20*65536+20,0x00a0a0a0;000000 mcall 38,<2,16*N>,<20,20>,0x00a0a0a0;000000
mov edi,N mov edi,N
@@: add ecx,16*65536+16 @@: add ecx,16*65536+16
mcall mcall
@ -151,26 +151,26 @@ print_board:
@@: ret @@: ret
.one: .one:
mov ecx,0xd04ba010 mov [pic_plt+4],0x4ba010
bt [flags],4
jnc @f
mov ecx,0xd0ff0000
btr [flags],4 btr [flags],4
@@: push edi jnc @f
mcall 4,,,txt_x,,0xffffff mov [pic_plt+4],0xff0000
pop edi @@: pushad
mov edx, ebx
mcall 65,pic_x,<7,7>,,1,pic_plt, 0
popad
.null: .null:
add ebx,16*65536;+16 add ebx,16*65536;+16
jmp .end jmp .end
.two: .two:
mov ecx,0xd000459a mov [pic_plt+4],0x00459a
bt [flags],4
jnc @f
mov ecx,0xd0ff0000
btr [flags],4 btr [flags],4
@@: push edi jnc @f
mcall 4,,,txt_o,,0xffffff mov [pic_plt+4],0xff0000
pop edi @@: pushad
mov edx, ebx
mcall 65,pic_o,<7,7>,,1,pic_plt, 0
popad
jmp .null jmp .null
@ -700,8 +700,23 @@ ret
txt_x db 'X',0 pic_x db 10000010b, \
txt_o db 'O',0 01000100b, \
00101000b, \
00010000b, \
00101000b, \
01000100b, \
10000010b
pic_o db 01111100b, \
10000010b, \
10000010b, \
10000010b, \
10000010b, \
10000010b, \
01111100b
pic_plt dd 0xffffff, 0x000000
if lang eq ru if lang eq ru
title db 'ƒ®¬®ªã',0 title db 'ƒ®¬®ªã',0
txt_buttons db '<27>®¢ ï €¢â®',0 txt_buttons db '<27>®¢ ï €¢â®',0
@ -731,11 +746,11 @@ flags rw 1
;3: å®¤ë ¨áç¥à¯ ­ë ;3: å®¤ë ¨áç¥à¯ ­ë
;4: ¢ print_board - ¢ë¤¥«¥­¨¥ ªà á­ë¬ 梥⮬ 5-⨠¢ àï¤ ª«¥â®ª ;4: ¢ print_board - ¢ë¤¥«¥­¨¥ ªà á­ë¬ 梥⮬ 5-⨠¢ àï¤ ª«¥â®ª
proc_info process_information ; it should be after I_END, but i'm afraid of lines 11-12. dunkaist
I_END: I_END:
align 16 align 16
Board rb N*N Board rb N*N
Value rw N*N*2 ;¯¥à¢ ï ¯®«®¢¨­  - ¤«ï ª®¬¯ , ¢â®à ï - ¤«ï ¨£à®ª  Value rw N*N*2 ;¯¥à¢ ï ¯®«®¢¨­  - ¤«ï ª®¬¯ , ¢â®à ï - ¤«ï ¨£à®ª 
Line rb 4*N*N*2 Line rb 4*N*N*2
proc_info process_information
rb 0x100 ; stack
E_END: