Login

Subversion Repositories NedoOS

Rev

Rev 1916 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

        align 256
distbuf;=#BA00 ;#300 ;ID,texx,dist
        ds 0x300

      IF atm
       MACRO setpgfast pg
        LD A,pg
        setpgafast
       ENDM
       MACRO setpgafast
        ;LD (curpg),A
        ;LD BC,#FFF7
        ;OUT (C),A
        SETPGC000
       ENDM
      ELSE ;~atm
       MACRO setpg pg
        LD A,pg
        setpgA
       ENDM
       MACRO setpgA
        CALL SETPGA
       ENDM
       MACRO setpgfast pg
        LD A,pg
        setpgafast
       ENDM
       MACRO setpgafast
        LD (curpg),A
        LD BC,#7FFD
        OUT (C),A
       ENDM
      ENDIF ;~atm
     


wascorrlogd
        INCBIN "corlogd_"
        ORG $-256
       DUP 256
        DB {$+(scrtopx*8)}&0xff
       EDUP
       IF lores
        ORG $-256
_=$
       DUP 128
        DB {_}&0xff
_=_+2
       EDUP
        DS 128
       ENDIF
wasda
        INCBIN "da"
        ORG $-256
       DUP 256
        DB 0xff&({$}+128)
       EDUP
        ORG $-256
       DUP 256
        DB 0xff&({$+(scrtopx*8)})
       EDUP
       IF lores
        ORG $-256
_=$
       DUP 128
        DB {_}&0xff
_=_+2
       EDUP
        DS 128
       ENDIF

TEXCODEGO
       IF atm == 0
        LD HL,0;-2
        ADD HL,SP
        LD (clscrbufsp),HL
        LD (eorfillsp),HL
       endif

       IF atm
        call setpgmap4000
       ENDIF
        LD BC,#FBDF
        IN A,(C)
        LD (mouseoldx),A       
        CALL RECMAP

        LD HL,tcos
REtcos0
       DUP 2;4
        SRA (HL)
       EDUP
        INC L
        jr NZ,REtcos0

        INCLUDE "zxloop.asm"
        INCLUDE "WSCAN10.asm"
        INCLUDE "WREND.asm"
        INCLUDE "WCTRL.asm"

;переменные рендера (обновляются в начале рендера)
curXx
curx    DB #80
curX    DB #0
curYy
cury    DB #80
curY    DB #0
curxy   DW 0
curyx   DW 0
curYX   DW 0
curangle
        DW tsin
demobegin
       IF demoplay
        INCBIN "demorec9"
       ELSE
        DB %00111111 ;all keys released
       ENDIF

        ;DISPLAY "PROG END=",$

        align 256 ;DS .(-$)
tables
wastables
shift=tables-$
tlogd2sca=$+shift
       IF scale64
       IF scale64 == 3
        INCBIN "logd2sc3"
       ELSE
        INCBIN "logd2sc2"
       ENDIF
       ELSE
        INCBIN "logd2sc_"
       ENDIF
tsqr2=$+shift
        INCBIN "sqr2int"
tlogd=$+shift
        INCBIN "logd"
tcorrlogd=$+shift
       DUP 256
        DB {wascorrlogd+$-tcorrlogd}&0xff
       EDUP
tcos=$+shift
        INCBIN "cos"
tlogcos=$+shift
        INCBIN "pluslcos"
tda=$+shift
       DUP 256
        DB {wasda+$-tda}&0xff
       EDUP
tctg=$+shift
        INCBIN "plusctg"
tsin=$+shift
        INCBIN "sin"
tscaljps=$+shift
        ds 256;INCBIN "scaljps"
tID=$+shift
        MACRO WALL pgnum,num2
        DB pgnum,num2;-pgnum,num2
        ENDM
       DUP 64+16 ;skip and 0..15 ;в примере используются стены 16..35
        WALL 0,#02
       EDUP
        MACRO PGWALL pgnum
        WALL pgnum,#02
        WALL pgnum,#42
        WALL pgnum,#82
        WALL pgnum,#C2
        ENDM
        PGWALL 0
        PGWALL 1
        PGWALL 2
        PGWALL 3
        PGWALL 4
       DUP 64-20-16 ;?..63
        WALL 0,#02
       EDUP
cursprites=$+shift
        DS 256
ltables=$-wastables

        include "recmap.asm"