From ec9980912cecfec9f20e6b41fb86c6af6af51b0f Mon Sep 17 00:00:00 2001 From: sparky4 Date: Mon, 19 May 2014 07:53:46 -0500 Subject: [PATCH] modified: 16/Project 16.bfproject modified: 16/dos_gfx.cpp --- 16/Project 16.bfproject | 32 ++++++++++---------- 16/dos_gfx.cpp | 65 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 80 insertions(+), 17 deletions(-) diff --git a/16/Project 16.bfproject b/16/Project 16.bfproject index 33f3135b..e408d429 100644 --- a/16/Project 16.bfproject +++ b/16/Project 16.bfproject @@ -1,8 +1,8 @@ c2e.convert_special: 0 e2c.convert_num: 0 -openfiles: /dos/z/16/16/dos_gfx.cpp:10793:10158:1: -openfiles: /dos/z/16/16/dos_gfx.h:537:0:0: -openfiles: /dos/z/16/16/dos_kb.c:953:406:0: +openfiles: /dos/z/16/16/dos_gfx.cpp:10521:10066:1: +openfiles: /dos/z/16/16/dos_gfx.h:764:0:0: +openfiles: /dos/z/16/16/dos_kb.c:892:395:0: openfiles: /dos/z/16/16/dos_kb.h:60:0:0: openfiles: /dos/z/16/16/lib/lib_com.cpp:0:0:0: openfiles: /dos/z/16/16/lib/lib_com.h:2523:1479:0: @@ -11,7 +11,7 @@ openfiles: /dos/z/16/16/project16.txt:1675:0:0: openfiles: /dos/z/16/16/16.txt:0:0:0: openfiles: /dos/z/16/16/lib/x/MXSM.ASM:12781:12781:0: openfiles: /dos/z/16/16/lib/x/MODEX.H:1768:1601:0: -openfiles: /dos/z/16/16/lib/x/MXPN.ASM:1205:434:0: +openfiles: /dos/z/16/16/lib/x/MXPN.ASM:652:649:0: snr_recursion_level: 0 convertcolumn_horizontally: 0 adv_open_matchname: 0 @@ -26,7 +26,7 @@ c2e.convert_iso: 0 opendir: file:///dos/z/16/16/lib/x wrap_text_default: 0 bookmarks_filename_mode: 1 -ssearch_text: rand +ssearch_text: mxWaitDisplay snr_casesens: 0 view_blocks: 1 name: project 16 @@ -84,21 +84,21 @@ snr_escape_chars: 0 htmlbar_view: 0 spell_lang: en ssearch_dotmatchall: 0 -searchlist: 386 -searchlist: CRTC_INDEX -searchlist: setVisiblePage -searchlist: VisiblePage -searchlist: lib/x/MXPN.ASM -searchlist: 3c0 -searchlist: ABS -searchlist: 3DAH -searchlist: _DX -searchlist: unsigned -searchlist: word searchlist: unsigned searchlist: word searchlist: play searchlist: rand +searchlist: x6 +searchlist: x86 +searchlist: 86 +searchlist: asm +searchlist: size +searchlist: SIZE +searchlist: 80 +searchlist: size +searchlist: widthBytes +searchlist: size +searchlist: mxWaitDisplay autocomplete: 1 outputb_show_all_output: 0 bookmarks_show_mode: 0 diff --git a/16/dos_gfx.cpp b/16/dos_gfx.cpp index 2f2607ba..cd45ae84 100644 --- a/16/dos_gfx.cpp +++ b/16/dos_gfx.cpp @@ -338,7 +338,70 @@ void MoveTo (word X, word Y) { mov al, 0x0D mov dx, 0x3D4 out dx, ax - } + } + +;----------------------------------------------------------- +; +; MXPN.ASM - Panning function +; Copyright (c) 1993,1994 by Alessandro Scotti +; +;----------------------------------------------------------- +;WARN PRO +INCLUDE MODEX.DEF + +PUBLIC mxPan + +EXTRN mxWaitDisplay : FAR +EXTRN mxStartAddress : FAR + +MX_TEXT SEGMENT USE16 PARA PUBLIC 'CODE' + ASSUME cs:MX_TEXT, ds:NOTHING, es:NOTHING + +EXTRN mx_BytesPerLine : WORD + +;----------------------------------------------------------- +; +; Moves the screen. +; +; Input: +; X, Y = new X, Y coordinates of view screen +; Output: +; none +; +mxPan PROC FAR + ARG Y:WORD, \ + X:WORD = ARG_SIZE + ASSUME ds:NOTHING + .enter 0 + + mov ax, [Y] + mul [mx_BytesPerLine] + mov dx, [X] + shr dx, 1 + shr dx, 1 + add ax, dx + push ax ; Push the start address + call mxWaitDisplay + call mxStartAddress + + mov dx, 03DAh ; Set the pixel pan register + in al, dx + mov dx, 03C0h + mov al, 33h + out dx, al + mov al, BYTE PTR [X] + and al, 3 + shl al, 1 + out dx, al + + xor ax, ax + .leave ARG_SIZE +mxPan ENDP + +MX_TEXT ENDS +END + + } //Procedure Play; -- 2.39.5