⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cwlib.inc

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 INC
📖 第 1 页 / 共 5 页
字号:
;yoff	- Y offset within bitmap.
;wide	- width to blit.
;depth	- depth to blit.
;chroma	- chroma value to use when OR'ing.
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;Note: If bit 0 of flags is set all other flag bits are ignored.
;
;-------------------------------------------------------------------------
	extdef VideoBlitBitmap:near


;-------------------------------------------------------------------------------
;Name: MouseInitialise
;-------------------------------------------------------------------------------
;
;Initialise mouse stuff.
;
;On Entry:
;
;nothing.
;
;On Exit:
;
;EAX	- mouse status.
;
;ALL other registers preserved.
;
;-------------------------------------------------------------------------------
	extdef MouseInitialise:near


;-------------------------------------------------------------------------------
;Name: MouseRemove
;-------------------------------------------------------------------------------
;
;Release mouse stuff.
;
;On Entry:
;
;Nothing.
;
;On Exit:
;
;Nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------------
	extdef MouseRemove:near


;-------------------------------------------------------------------------------
;Name: MouseOn
;-------------------------------------------------------------------------------
;
;Turn the mouse pointer ON. Will increment the mouse flag byte. The mouse
;pointer is only displayed when this flag is > 0.
;
;On Entry:
;
;nothing.
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------------
	extdef MouseOn:near


;-------------------------------------------------------------------------------
;Name: MouseOff
;-------------------------------------------------------------------------------
;
;Turn the mouse pointer OFF. Will decrement the mouse flag byte. The mouse
;pointer is only displayed when this flag is > 0.
;
;On Entry:
;
;nothing.
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------------
	extdef MouseOff:near


;-------------------------------------------------------------------------
;Name: MouseSetType
;-------------------------------------------------------------------------
;
;Set the type of graphic used for the mouse pointer. Only 2 are currently
;supported but others can be added to the table.
;
;On Entry:
;
;AL	- Pointer number.
;
;On Exit:
;
;AL	- Old pointer number.
;
;ALL other registers preserved.
;
;-------------------------------------------------------------------------
	extdef MouseSetType:near


;-------------------------------------------------------------------------
;Name: MouseGet
;-------------------------------------------------------------------------
;
;Get the current position & button state for the mouse.
;
;On Entry:
;
;nothing.
;
;On Exit:
;
;EBX	- button state.
;ECX	- X coord.
;EDX	- Y coord.
;
;ALL other registers preserved.
;
;-------------------------------------------------------------------------
	extdef MouseGet:near


;-------------------------------------------------------------------------
;Name: MouseExclude
;-------------------------------------------------------------------------
;
;Set/Remove mouse exclusion zone.
;
;On Entry:
;
;AX	- Mode.
;	0 - Set exclusion zone.
;	1 - Remove exclusion zone.
;
;If mode 0,
;
;EBX	- X coord.
;ECX	- Y coord.
;EDX	- Width.
;EBP	- depth.
;
;If mode 1,
;
;EBX	- Exclusion handle.
;
;On Exit:
;
;If mode 0,
;
;EBX	- Exclusion handle.
;
;ALL other registers preserved.
;
;-------------------------------------------------------------------------
	extdef MouseExclude:near


;-------------------------------------------------------------------------
;Name: WinInitialise
;-------------------------------------------------------------------------
;
;Initialise Window's stuff so base handler gets a lookin.
;
;-------------------------------------------------------------------------
	extdef WinInitialise:near


;-------------------------------------------------------------------------
;Name: WinOpenWindow
;-------------------------------------------------------------------------
;
;Initialise a window structure and add it to the list of windows in service.
;
;On Entry:
;
;C style stack parameters as follows:
;
;flags	- undefined at the moment, set to zero.
;priority	- priority to assign.
;xcoord	- x co-ord for window.
;ycoord	- y co-ord for window.
;wide	- width of window in pixels.
;depth	- depth of window in pixels.
;handler	- address of handler (0 for none).
;
;On Exit:
;
;EAX	- pointer to window structure (handle).
;
;ALL other registers presereved.
;
;-------------------------------------------------------------------------
	extdef WinOpenWindow:near


;-------------------------------------------------------------------------
;Name: CalculateSplits
;-------------------------------------------------------------------------
;
;Calculate splits for all windows.
;
;On Entry:
;
;nothing.
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------
	extdef CalculateSplits:near


;-------------------------------------------------------------------------------
;Name: WinMessageWindow
;-------------------------------------------------------------------------------
;
;Send a message to a window.
;
;On Entry:
;
;EAX	- message
;ESI	- window
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------------
	extdef WinMessageWindow:near


;------------------------------------------------------------------------------
;Name: WindowRegionClip
;------------------------------------------------------------------------------
;
;Clip a set of coords to current overiding region if enabled.
;
;On Entry:
;
;ECX	- X coord.
;EDX	- Y coord.
;ESI	- width.
;EDI	- depth.
;
;On Exit:
;
;Carry set if region completely obscured else,
;
;ECX	- clipped X coord.
;EDX	- clipped Y coord.
;ESI	- clipped width.
;EDI	- clipped depth.
;
;ALL other registers preserved.
;
;------------------------------------------------------------------------------
	extdef WindowRegionClip:near


;-------------------------------------------------------------------------------
;Name: WindowRegionUpdate
;-------------------------------------------------------------------------------
;
;Update a particular rectangle of the display.
;
;On Entry:
;
;ECX	- X coord.
;EDX	- Y coord.
;ESI	- width.
;EDI	- depth.
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------------
	extdef WindowRegionUpdate:near


;-------------------------------------------------------------------------
;Name: WinCloseWindow
;-------------------------------------------------------------------------
;
;Close a window and update the area underneath it if possible.
;
;On Entry:
;
;EAX	- Pointer to window structure (handle).
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------
	extdef WinCloseWindow:near


;-------------------------------------------------------------------------
;Name: WinSetPixel
;-------------------------------------------------------------------------
;
;Set a pixel to specified colour. Cheats by useing WinFillRectangle for now.
;
;On Entry:
;
;EAX	- Flags, bit significant if set.
;	0 - FillValue is RGB.
;EBX	- Fill value.
;ECX	- X co-ord.
;EDX	- Y co-ord.
;EBP	- Bitmap.
;
;On Exit:
;
;nothing.
;
;All registers preserved.
;
;-------------------------------------------------------------------------
	extdef WinSetPixel:near


;-------------------------------------------------------------------------
;Name: WinFillRectangle
;-------------------------------------------------------------------------
;
;Fill a rectangular region of specified window.
;
;On Entry:
;
;C style stack parameters as follows,
;
;window	- pointer to window structure (handle).
;flags	- flags, bit significant if set.
;	0 - fillvalue is RGB.
;fillvalue	- fill value to use.
;xcoord	- x co-ord to fill at.
;ycoord	- y co-ord to fill at.
;wide	- width in pixels.
;depth	- depth in pixels.
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------
	extdef WinFillRectangle:near


;-------------------------------------------------------------------------
;Name: WinDrawLine
;-------------------------------------------------------------------------
;
;Draw a line in specified colour between specified points.
;
;On Entry:
;
;C style stack parameters as follows,
;
;flags	- flags, bit significant if set.
;colour	- fill colour.
;x1	- start X co-ord.
;y1	- start Y co-ord.
;x2	- end x co-ord.
;y2	- end y co-ord.
;window	- window to draw in.
;
;On Exit:
;
;nothing.
;
;All registers preserved.
;
;Notes:
;
;If type 1 is selected it is the callers responsibility to ensure that the
;buffer pointed to by EBX is big enough.
;
;-------------------------------------------------------------------------
	extdef WinDrawLine:near


;-------------------------------------------------------------------------
;Name: WinBlitBitmap
;-------------------------------------------------------------------------
;
;Blit a bitmap into a window.
;
;On Entry:
;
;C style stack parameters as follows,
;
;window	- pointer to window structure (handle).
;flags	- control flags, bit significant if set.
;	0 - N/A
;	1 - OR the bitmap on, use chroma.
;bitmap	- pointer to bitmap.
;xcoord	- x co-ord to blit at within window.
;ycoord	- y co-ord to blit at within window.
;xoff	- x offset within bitmap to blit from.
;yoff	- y offset within bitmap to blit from.
;wide	- with in pixels.
;Depth	- depth in pixels.
;chroma	- Chroma key if needed.
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------
	extdef WinBlitBitmap:near


;-------------------------------------------------------------------------
;Name: WinPrintWindow
;-------------------------------------------------------------------------
;
;Print a string of bitmaps in a window.
;
;On Entry:
;
;C style stack parameters as follows,
;
;window	- pointer to window structure (handle).
;flags	- control flags, bit significant if set,
;	0 - N/A
;	1 - OR bitmaps on, use chroma.
;	4 - used fixed spaceing.
;pen	- pen to print in.
;font	- font table to use.
;string	- string to print.
;xcoord	- x co-ord to print at.
;ycoord	- y co-ord to print at.
;
;On Exit:
;
;nothing.
;
;ALL registers preserved.
;
;-------------------------------------------------------------------------
	extdef WinPrintWindow:near


;-------------------------------------------------------------------------
;Name: WinWhichWindow
;-------------------------------------------------------------------------
;
;See which (if any) window the co-ords fall inside and return relative values
;
;On Entry:
;
;ECX	- Xcoord
;EDX	- Ycoord
;
;On Exit:
;
;EAX	- Window structure pointer (handle), -1 for none.
;ECX	- relative X coord.
;EDX	- relative Y coord.
;
;ALL other registers preserved.
;
;-------------------------------------------------------------------------
	extdef WinWhichWindow:near


;------------------------------------------------------------------------------
;Name: CreateBitmap
;------------------------------------------------------------------------------
;
;Create a new bitmap.
;
;On Entry:
;
;EBX	- bitmap flags entry.
;ECX	- bitmap width.
;EDX	- bitmap depth.
;
;On Exit:
;
;Carry set on error and EAX=0 else,
;
;EAX	- pointer to bitmap.
;
;ALL other registers preserved.
;
;------------------------------------------------------------------------------
	extdef CreateBitmap:near


;-------------------------------------------------------------------------
;Name: BitmapSetPixel
;-------------------------------------------------------------------------
;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -