亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xbmtools.asm

?? 視頻游戲開發C語言源程序
?? ASM
字號:
;-----------------------------------------------------------------------
; MODULE XBMTOOLS
;
; Bitmap conversion / manipulation tools
;
; Compile with Tasm.
; C callable.
;
;
; ****** XLIB - Mode X graphics library                ****************
; ******                                               ****************
; ****** Written By Themie Gouthas                     ****************
;
; egg@dstos3.dsto.gov.au
; teg@bart.dsto.gov.au
;-----------------------------------------------------------------------
COMMENT $

  This module implements a set of functions to manipulate both planar
  bitmaps and linear bitmaps (as used by x_compile_bitmap):

  PLANAR BITMAPS

  Planar bitmaps as used by these functions have the following structure:

  BYTE 0                 The bitmap width in bytes (4 pixel groups) range 1..255
  BYTE 1                 The bitmap height in rows range 1..255
  BYTE 2..n1             The plane 0 pixels width*height bytes
  BYTE n1..n2            The plane 1 pixels width*height bytes
  BYTE n2..n3            The plane 2 pixels width*height bytes
  BYTE n3..n4            The plane 3 pixels width*height bytes

  LINEAR BITMAPS

  Linear bitmaps have the following structure:

  BYTE 0                 The bitmap width in pixels  range 1..255
  BYTE 1                 The bitmap height in rows   range 1..255
  BYTE 2..n              The width*height bytes of the bitmap



$

LOCALS
.286

include model.inc
include xbmtools.inc

	.code



;-----------------------------------------------------------------------
; x_pbm_to_bm
;
; This function converts a bitmap in the planar format to the linear format
; as used by x_compile_bitmap.
;
; WARNING: the source and destination bitmaps must be pre - allocated
;
; NOTE: This function can only convert planar bitmaps that are suitable.
;       If the source planar bitmap's width (per plane) is >= 256/4
;       it cannot be converted. In this situation an error code
;       BM_WIDTH_ERROR. On successful conversion 0 is returned.
;
; C callable as:
;    int x_pbm_to_bm(char far * source_pbm, char far * dest_bm);
;
; Written By Themie Gouthas

proc _x_pbm_to_bm
ARG   src_pbm:dword,dest_bm:dword
	push bp                  ; Preserve caller's stack frame
	mov  bp,sp
	push ds
	push di
	push si

	les  di,[dest_bm]     ; es:di -> destination bitmap
	lds  si,[src_pbm]     ; ds:si -> source planar bitmap
	lodsb                 ; load AL with source pbm pixel width per plane
	mov  bl,al            ; save in CL
	xor  ah,ah            ; convert to word
	shl  ax,2             ; mult by 4 giving source image width
	cmp  ax,255           ; if the result > 255 then we have exceeded
	ja   @@WidthError     ; the max width of linear bm.

	stosb                 ; write do dest_bm

	lodsb                 ; tranfer source pbm height in pixels to
	stosb             ;  dest_bm

	xor  ah,ah            ; convert to word
	mul  bl               ; AX = AX * BL ie. total no. pixels per plane
	mov  dx,di            ; save DI, the pointer to the destination bm
	mov  bl,3             ; set plane loop counter (BL)

@@PlaneLoop:
	mov  cx,ax            ; set CX to total number of pixels per plane

@@PixelLoop:
	movsb                 ; transfer pixel
	add  di,3             ; increment destination to compensate for plane
	loop @@PixelLoop

	inc  dx               ; increment original di for next pixel plane
	mov  di,dx            ; and restore di from incremented original
	dec  bl               ; decrement plane counter
	jns  @@PlaneLoop      ; loop if more planes left
	xor  ax,ax
	jmp  short @@Done
@@WidthError:
	mov  ax,1

@@Done:
	pop  si
	pop  di
	pop  ds
	pop  bp                  ;restore caller's stack frame
	ret
_x_pbm_to_bm endp


;-----------------------------------------------------------------------
; x_bm_to_pbm
;
; This function converts a bitmap in the linear format as used by
; x_compile_bitmap to the planar formap.
;
; WARNING: the source and destination bitmaps must be pre - allocated
;
; NOTE: This function can only convert linear bitmaps that are suitable.
;       If the source linear bitmap's width is not a multiple of 4
;       it cannot be converted. In this situation an error code
;       BM_WIDTH_ERROR. On successful conversion 0 is returned.
;
;
; C callable as:
;    int x_bm_to_pbm(char far * source_pbm, char far * dest_bm);
;
; Written By Themie Gouthas

proc _x_bm_to_pbm
ARG src_bm:dword,dest_pbm:dword
	push bp                  ; Preserve caller's stack frame
	mov  bp,sp
	push ds
	push di
	push si

	les  di,[dest_pbm]       ; es:di -> destination planar bitmap
	lds  si,[src_bm]         ; ds:si -> source bitmap
	lodsb                    ; load AX with source bitmap width
	test al,03h              ; Check that width is a multiple of 4
	jnz  @@WidthIncompatible
	shr  al,2                ; divide by 4 giving width of plane
	stosb                    ; store destination planar bitmap width
	mov  bl,al               ;  and copy to bl
	lodsb
	stosb            ; Transfer source bitmap height to dest pbm
	xor  ah,ah               ; Conver height to word
	mul  bl                  ; calculate the total no. of pixels / plane
	mov  dx,si               ; save source offset
	mov  bl,3

@@PlaneLoop:
	mov  cx,ax            ; set CX to total number of pixels per plane

@@PixelLoop:
	movsb                 ; transfer pixel
	add  si,3             ; increment src offset to compensate for plane
	loop @@PixelLoop

	inc  dx               ; increment original si for next pixel plane
	mov  si,dx            ; and restore si from incremented original
	dec  bl               ; decrement plane counter
	jns  @@PlaneLoop      ; loop if more planes left
	xor  ax,ax
	jmp  short @@Done
@@WidthIncompatible:
	mov  ax,1

@@Done:
	pop  si
	pop  di
	pop  ds
	pop  bp                  ;restore caller's stack frame
	ret
_x_bm_to_pbm endp


	end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩综合在线| 2024国产精品视频| 亚洲乱码国产乱码精品精98午夜| 国内国产精品久久| 欧美日韩在线播放三区| 午夜精品久久久久久久99水蜜桃| 91麻豆自制传媒国产之光| 欧美激情综合网| 成人激情小说网站| 久久久久久97三级| 一本色道久久综合狠狠躁的推荐| 欧美激情一区二区三区四区| 成人美女在线观看| 亚洲色图第一区| 欧美日韩一级黄| 美女视频黄频大全不卡视频在线播放| 91麻豆精品国产91久久久资源速度| 日韩中文欧美在线| 91精品福利在线一区二区三区| 国产精品综合视频| 国产精品免费人成网站| 色偷偷一区二区三区| 亚洲午夜精品久久久久久久久| av中文字幕亚洲| 一区二区三区中文在线观看| 欧美日韩国产片| 久久 天天综合| 中文字幕成人av| 色天使久久综合网天天| 天天影视网天天综合色在线播放| 日韩女同互慰一区二区| 国产精品一品二品| 亚洲三级在线播放| 欧美一区二区三区视频免费播放| 久久99精品久久久久久久久久久久| 国产日韩亚洲欧美综合| 风间由美一区二区av101| 午夜成人免费视频| 久久久久成人黄色影片| 91视频xxxx| 免费观看在线综合| 亚洲精品久久嫩草网站秘色| 欧美一区二区视频在线观看2020| 国产真实乱对白精彩久久| 亚洲日本电影在线| 日韩一级高清毛片| 一道本成人在线| 免费成人在线视频观看| 一色桃子久久精品亚洲| 欧美老人xxxx18| 国产·精品毛片| 亚洲国产一二三| 国产精品欧美经典| 欧美一区二区三区不卡| 国产精品 欧美精品| 久久国产婷婷国产香蕉| 亚洲精品videosex极品| 久久综合999| 欧美精品在线一区二区三区| 91看片淫黄大片一级在线观看| 理论电影国产精品| 亚洲午夜视频在线| 欧美极品aⅴ影院| 成人美女视频在线看| 国产一区视频网站| 午夜精品影院在线观看| 中文字幕中文在线不卡住| 日韩一区二区三区免费看| 欧美疯狂做受xxxx富婆| 在线免费av一区| 成人免费毛片aaaaa**| 麻豆成人在线观看| 欧美va亚洲va| 欧美电影精品一区二区| 欧美日韩在线观看一区二区| 99久久99久久精品免费观看 | 综合激情成人伊人| 国产色婷婷亚洲99精品小说| 日韩一卡二卡三卡| 3atv一区二区三区| 欧美日韩亚洲国产综合| 在线观看免费一区| 91久久人澡人人添人人爽欧美| 国产精品77777| 激情综合网激情| 久久精品国产精品亚洲精品| 久久国产欧美日韩精品| 日日夜夜精品视频天天综合网| 亚洲美女区一区| 亚洲欧洲在线观看av| 国产精品不卡视频| 亚洲国产欧美一区二区三区丁香婷| 亚洲国产一区二区视频| 免费成人性网站| 国产不卡在线视频| 91视频在线观看| 欧美日韩一本到| 欧美成人乱码一区二区三区| 欧美激情资源网| 亚洲午夜免费视频| 久久精品国产99国产精品| 国产不卡免费视频| 欧美在线不卡视频| 日韩视频在线一区二区| 国产女人水真多18毛片18精品视频 | 色综合天天性综合| 欧美狂野另类xxxxoooo| 337p粉嫩大胆噜噜噜噜噜91av| 中文一区一区三区高中清不卡| 日本中文字幕不卡| 精品午夜一区二区三区在线观看| 麻豆久久久久久久| 欧美一区二视频| 欧美色综合网站| 欧美成人性福生活免费看| 中文字幕亚洲电影| 日产欧产美韩系列久久99| 丁香桃色午夜亚洲一区二区三区| 色久优优欧美色久优优| 久久在线观看免费| 亚洲一区二区五区| 成人小视频在线| 日韩一区二区视频| 艳妇臀荡乳欲伦亚洲一区| 韩国女主播一区二区三区| 欧美性极品少妇| 国产亚洲成年网址在线观看| 午夜精品影院在线观看| jizzjizzjizz欧美| 精品福利二区三区| 亚洲国产精品欧美一二99| 懂色av一区二区三区蜜臀 | www.亚洲免费av| 欧美一级一级性生活免费录像| 日韩一区二区免费在线观看| 国产精品高潮呻吟| 久久国产精品无码网站| 91免费在线视频观看| 亚洲精品一区二区三区四区高清| 国产精品影视网| 欧美精品777| 日韩理论片中文av| 国产一区久久久| 7777精品伊人久久久大香线蕉 | 久久婷婷一区二区三区| 香蕉av福利精品导航| 99精品欧美一区二区三区小说| ww久久中文字幕| 久久精品久久久精品美女| 91麻豆精品91久久久久久清纯| 亚洲女与黑人做爰| 99久久久国产精品免费蜜臀| 欧美激情一区二区三区四区| 久久99久久99精品免视看婷婷| 91精品国产综合久久精品性色| 亚洲精品视频免费看| 色综合久久久久网| 国产免费久久精品| 日韩精品资源二区在线| 久久久久综合网| 日韩精品一二区| 欧美一区在线视频| 日本va欧美va欧美va精品| 欧美日韩成人激情| 日韩高清一级片| 日韩欧美久久一区| 国模少妇一区二区三区| 欧美精品一区二区三区四区 | 日韩午夜中文字幕| 蜜臀av在线播放一区二区三区| 欧美一区二区精品| 激情成人综合网| 国产日产欧美精品一区二区三区| 国产成人精品网址| 国产精品乱人伦| 91在线视频观看| 亚洲成人免费观看| 日韩欧美一区中文| 国产乱码精品一区二区三区av| 国产亚洲一区二区三区四区| 成人自拍视频在线| 亚洲免费av观看| 欧美蜜桃一区二区三区| 热久久久久久久| 久久精品一级爱片| 色综合久久99| 日韩激情一二三区| 久久精品人人做人人综合 | 一卡二卡三卡日韩欧美| 欧美日韩精品欧美日韩精品一 | 亚洲成人资源网| 精品久久久三级丝袜| 粉嫩aⅴ一区二区三区四区五区| 亚洲欧美日韩在线不卡| 欧美一区二区三区免费视频 | 亚洲九九爱视频| 91麻豆精品久久久久蜜臀| 国产在线麻豆精品观看| 日韩一区欧美一区| 91精品免费观看|