Netplay code (mostly) removed, still need some help on EXTSYMs and port-dependant stuff.

This commit is contained in:
grinvader
2005-04-09 08:40:31 +00:00
parent f488c07ed4
commit 991588a89a
21 changed files with 38 additions and 5480 deletions

View File

@@ -50,11 +50,9 @@ EXTSYM objptrn,nglogicval,bgtilesz,C4values
EXTSYM curexecstate,TempVidInfo,LatestBank,C4ObjSelec
EXTSYM BGMS1,scadsng,winenabm,winenabs,vidbright
EXTSYM genfulladdtab,genfulladdtabng
EXTSYM KeyQuickChat,CNetType,WritetochatBuffer,NetAddChar,TimerEnable,ShowTimer
EXTSYM TimerEnable,ShowTimer
EXTSYM ClearScreenSkip,debugdisble,cmovietimeint
EXTSYM ChatNick
EXTSYM StringLength
EXTSYM chatstrLt
EXTSYM GUIOn,FilteredGUI,HalfTrans
EXTSYM SmallMsgText
EXTSYM ClearScreen
@@ -63,7 +61,7 @@ EXTSYM GUICPC, newgfx16b
EXTSYM vesa2_clbitng,vesa2_clbitng2,vesa2_clbitng3
EXTSYM granadd,CSStatus,CSStatus2,CSStatus3
EXTSYM SpecialLine
EXTSYM Clear2xSaIBuffer
EXTSYM Clear2xSaIBuffer,vidbufferofsb
;EXTSYM Super2xSaI
EXTSYM HalfTransB,HalfTransC
@@ -3211,291 +3209,12 @@ NEWSYM waitvsync
SECTION .data
NEWSYM prevengval, db 10
SECTION .bss
NEWSYM chaton, resb 1
NEWSYM chatstrL, resb 140
NEWSYM chatLpos, resd 1
NEWSYM chatstrR, resb 140
NEWSYM chatstrR2, resb 140
NEWSYM chatstrR3, resb 140
NEWSYM chatstrR4, resb 140
NEWSYM chatstrR5, resb 140
NEWSYM chatRTL, resd 1
NEWSYM chatRTL2, resd 1
NEWSYM chatRTL3, resd 1
NEWSYM chatRTL4, resd 1
NEWSYM chatRTL5, resd 1
NEWSYM chatTL, resd 1
SECTION .data
NEWSYM chatreqtable
db 0 ,2 ,'1','2','3','4','5','6','7','8','9','0','-','=',8 ,0
db 'Q','W','E','R','T','Y','U','I','O','P','[',']',13 ,0 ,'A','S'
db 'D','F','G','H','J','K','L',';',27h,'`',1 ,'\','Z','X','C','V'
db 'B','N','M',',','.','/',1 ,0 ,0 ,' ',0 ,0 ,0 ,0 ,0 ,0
; Shift Key Presses
db 0 ,2 ,'!','@','#','$','%','^','&','*','(',')','_','+',8 ,0
db 'Q','W','E','R','T','Y','U','I','O','P','{','}',13 ,0 ,'A','S'
db 'D','F','G','H','J','K','L',':','"','~',1 ,'|','Z','X','C','V'
db 'B','N','M','<','>','?',1 ,0 ,0 ,' ',0 ,0 ,0 ,0 ,0 ,0
SECTION .text
; Letters transferred & string cleared when chatstrL[0]!=0 and chaton=0
; Disable all transfers when chaton=1 (except joysticks and upper keyboard
; in input devices)
NEWSYM ChatType2
jmp ChatType.skipchatdisp
NEWSYM ChatType
cmp dword[chatTL],0
jne near .chatdisplayed
cmp byte[chatstrL],0
jne near .processchat
jmp .skipchatdisp
.chatdisplayed
dec dword[chatTL]
cmp dword[chatTL],0
jne .skipchatdisp
mov dword[chatstrL],0
.skipchatdisp
mov eax,[KeyQuickChat]
cmp byte[chaton],0
jne .nosendchats
cmp byte[chatstrL],0
je .nosendchats
cmp dword[chatTL],0
jne .nosendchats
mov byte[pressed+eax],0
.nosendchats
cmp byte[pressed+eax],1
jne .noqchat
mov dword[chatTL],0
mov byte[pressed+eax],2
mov byte[chaton],1
mov dword[chatLpos],0
mov byte[chatstrL],'>'
mov byte[chatstrL+1],'_'
mov byte[chatstrL+2],0
.noqchat
jmp .skipall
.processchat
cmp byte[chaton],0
je near .skipall
mov eax,63
.notof
cmp byte[chatreqtable+eax],1
jbe near .skipthis
cmp byte[pressed+eax],1
jne near .skipthis
mov byte[pressed+eax],2
push eax
cmp byte[pressed+42],1
je .shift
cmp byte[pressed+54],1
je .shift
mov al,[chatreqtable+eax]
jmp .noshift
.shift
mov al,[chatreqtable+eax+64]
.noshift
cmp al,8
je .delete
cmp al,13
je .enter
cmp al,2
je near .cancel
cmp dword[chatLpos],32+30
jae near .skipoutput
mov ebx,[chatLpos]
mov [chatstrL+ebx+1],al
mov byte[chatstrL+ebx+2],'_'
mov byte[chatstrL+ebx+3],0
inc dword[chatLpos]
jmp .skipoutput
.delete
mov byte[pressed+0Eh],2
cmp dword[chatLpos],0
je near .skipoutput
dec dword[chatLpos]
mov ebx,[chatLpos]
mov byte[chatstrL+ebx+1],'_'
mov byte[chatstrL+ebx+2],0
jmp .skipoutput
.enter
mov byte[pressed+1Ch],2
mov byte[chaton],0
cmp dword[chatLpos],0
jne .noskipoutput
mov byte[chatstrL],0
jmp .skipoutput
.noskipoutput
mov ebx,[chatLpos]
mov byte[chatstrL+ebx+1],0
pushad
mov dl,'L'
%ifndef __MSDOS__
cmp dword[chatstrL+1],'/ME '
je .action
%endif
;.dos
mov esi,ChatNick
call WritetochatBuffer
mov esi,chatstrL
call WritetochatBuffer
jmp .noaction
.action
mov dl,'*'
call NetAddChar
mov esi,ChatNick
call WritetochatBuffer
mov dl,' '
call NetAddChar
mov esi,chatstrL+5
call WritetochatBuffer
.noaction
mov dl,13
call NetAddChar
mov dl,10
call NetAddChar
popad
jmp .skipoutput
.cancel
mov byte[chatstrL],0
mov byte[chaton],0
mov byte[pressed+1],2
.skipoutput
pop eax
.skipthis
dec eax
jns near .notof
.skipall
ret
%macro RemoteStringPrint 1
cmp byte[%1],0
je %%nostringremote
mov edi,%1
mov esi,[vidbuffer]
cmp byte[cbitmode],1
je %%do16b3
mov byte[ngfont],1
add esi,194*288+20
add esi,[.sdrawptr]
cmp byte[%1],' '
jne %%nospace
inc edi
add esi,6
%%nospace
add dword[.sdrawptr],288*6
call OutputGraphicString5x5.no16bit
jmp %%nostringremote
%%do16b3
add esi,194*288*2+20*2
add esi,[.sdrawptr]
cmp byte[%1],' '
jne %%nospaceb
inc edi
add esi,6
%%nospaceb
add dword[.sdrawptr],288*6*2
call OutputGraphicString16b5x52
%%nostringremote
%endmacro
NEWSYM copyvid
cmp byte[CNetType],20
jne .nonet
call ChatType
.nonet
mov byte[ngfont],0
cmp byte[chatstrL],0
je .nostringlocal
mov eax,chatstrL
call StringLength
sub ecx,42
cmp ecx,0
jge .notover
xor ecx,ecx
.notover
mov edi,chatstrL
add edi,ecx
mov esi,[vidbuffer]
cmp byte[cbitmode],1
je .do16b2
.no16b2
mov byte[ngfont],1
add esi,188*288+20
call OutputGraphicString5x5.no16bit
jmp .nostringlocal
.do16b2
add esi,188*288*2+20*2
call OutputGraphicString16b5x52
.nostringlocal
cmp byte[chatstrLt],0
je .nostringtemp
mov edi,chatstrLt
mov esi,[vidbuffer]
cmp byte[cbitmode],1
je .do16b2temp
.no16b2temp
mov byte[ngfont],1
add esi,182*288+20
call OutputGraphicString5x5.no16bit
jmp .nostringtemp
.do16b2temp
add esi,182*288*2+20*2
call OutputGraphicString16b5x52
.nostringtemp
mov dword[.sdrawptr],0
RemoteStringPrint chatstrR5
RemoteStringPrint chatstrR4
RemoteStringPrint chatstrR3
RemoteStringPrint chatstrR2
RemoteStringPrint chatstrR
cmp dword[chatRTL],0
je .nortl
dec dword[chatRTL]
cmp dword[chatRTL],0
jne .nortl
mov dword[chatstrR],0
.nortl
cmp dword[chatRTL2],0
je .nortl2
dec dword[chatRTL2]
cmp dword[chatRTL2],0
jne .nortl2
mov dword[chatstrR2],0
.nortl2
cmp dword[chatRTL3],0
je .nortl3
dec dword[chatRTL3]
cmp dword[chatRTL3],0
jne .nortl3
mov dword[chatstrR3],0
.nortl3
cmp dword[chatRTL4],0
je .nortl4
dec dword[chatRTL4]
cmp dword[chatRTL4],0
jne .nortl4
mov dword[chatstrR4],0
.nortl4
cmp dword[chatRTL5],0
je .nortl5
dec dword[chatRTL5]
cmp dword[chatRTL5],0
jne .nortl5
mov dword[chatstrR5],0
.nortl5
; Test if add table needs updating
cmp byte[cbitmode],0
je .notatud