📄 gfxdrawpixelinc.pas
字号:
//////////////////////////////////////////////////////////////////////
// //
// gfxDrawPixelInc.pas: Metacode to define needed variables to //
// render a single pixel //
// //
// The contents of this file are subject to the Bottled Light //
// Public License Version 1.0 (the "License"); you may not use this //
// file except in compliance with the License. You may obtain a //
// copy of the License at http://www.bottledlight.com/BLPL/ //
// //
// Software distributed under the License is distributed on an //
// "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or //
// implied. See the License for the specific language governing //
// rights and limitations under the License. //
// //
// The Original Code is the Mappy VM Core, released April 1st, 2003 //
// The Initial Developer of the Original Code is Bottled Light, //
// Inc. Portions created by Bottled Light, Inc. are Copyright //
// (C) 2001 - 2003 Bottled Light, Inc. All Rights Reserved. //
// //
// Author(s): //
// Michael Noland (joat), michael@bottledlight.com //
// //
// Changelog: //
// 1.0: First public release (April 1st, 2003) //
// //
//////////////////////////////////////////////////////////////////////
{$IFDEF BLEND}
r, g, b: byte;
coeffa: byte;
blendSrc: byte;
{$IFDEF ABLEND}
blendSrc2: byte;
r2, g2, b2: byte;
coeffb: byte;
{$ENDIF}
{$ENDIF}
mx, my, mclock: byte;
latch: uint16;
latchXparent: boolean;
{$IFDEF OBJWIN}
sprWinData: byte;
{$ENDIF}
begin
{$IFDEF SPRITE}
if entry^.a and SPRITE_A_MOSAIC <> 0 then my := registers[SPR_MOSAIC] else my := 0;
mx := my and $F;
my := my shr 4;
{$ELSE}
if CR and TEXT_BG_MOSAIC <> 0 then my := registers[BG_MOSAIC] else my := 0;
mx := my and $F;
my := my shr 4;
{$ENDIF}
mclock := 0;
latch := 0;
latchXparent := true;
Dec(y, y mod (my + 1));
{$IFDEF OBJWIN}
sprWinData := registers[SPR_WIN_IN];
{$ENDIF}
{$IFDEF BLEND}
// Plonk the 1st layer specs
blendSrc := registers[BLEND_S1];
{$IFDEF SPRITE}
if entry^.typ = 1 then blendSrc := blendSrc or mask;
{$ENDIF}
// Plonk the coefficients
{$IFNDEF ABLEND}
coeffa := registers[COEFF_Y];
if coeffa > 15 then coeffa := 16;
{$ELSE}
coeffa := registers[COEFF_A];
if coeffa > 15 then coeffa := 16;
coeffb := registers[COEFF_B];
if coeffb > 15 then coeffb := 16;
// Plonk the 2nd layer specs
blendSrc2 := registers[BLEND_S2];
{$ENDIF}
{$ENDIF}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -