コード例 #1
0
ファイル: id_vw.c プロジェクト: BSzili/refkeen
void VW_SetScreenMode (id0_int_t grmode)
{
	switch (grmode)
	{
	  case TEXTGR:
		BE_ST_SetScreenMode(3);
		screenseg=BE_ST_GetTextModeMemoryPtr();
		break;
	  case CGAGR:
		BE_ST_SetScreenMode(4);
		// screenseg is actually a main mem buffer
		break;
	  case EGAGR:
		BE_ST_SetScreenMode(0xd);
		// REFKEEN no need to obtain screenseg
		// - different EGA planes are accessed with new functions
		break;
#ifdef VGAGAME
	  case VGAGR:{
		  id0_char_t extern VGAPAL;	// deluxepaint vga pallet .OBJ file
		  void id0_far *vgapal = &VGAPAL;
		  SetCool256 ();		// custom 256 color mode
		  screenseg=0xa000;
		  _ES = FP_SEG(vgapal);
		  _DX = FP_OFF(vgapal);
		  _BX = 0;
		  _CX = 0x100;
		  _AX = 0x1012;
		  geninterrupt(0x10);			// set the deluxepaint pallet

		  break;
#endif
	}
	VW_SetLineWidth(SCREENWIDTH);
}

/*
=============================================================================

							SCREEN FADES

=============================================================================
*/

id0_char_t colors[7][17]=
{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
 {0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,0},
 {0,0,0,0,0,0,0,0,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0},
 {0,1,2,3,4,5,6,7,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0},
 {0,1,2,3,4,5,6,7,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0},
 {0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f}};
// REFKEEN - Patch for 2015 port
static id0_char_t fakecgacolors[17] =
{0,0x1b,0x1d,0x1f,0,0x1b,0x1d,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0};

void VW_ColorBorder (id0_int_t color)
{
	BE_ST_SetBorderColor(color);
	bordercolor = color;
}
コード例 #2
0
ファイル: loadscn.c プロジェクト: BSzili/refkeen
static void SetScreenMode (id0_int_t mode)
{
	switch (mode)
	{
	case 1:
		BE_ST_SetScreenMode(3);
		SetLineWidth(80);
		break;
	case 3:
		BE_ST_SetScreenMode(0xd);
		SetLineWidth(40);
		break;
	}
}
コード例 #3
0
ファイル: id_vw.c プロジェクト: Billy2600/refkeen
void VW_SetScreenMode (id0_int_t grmode)
{
	switch (grmode)
	{
	  case TEXTGR:
		BE_ST_SetScreenMode(3);
		screenseg=BE_ST_GetTextModeMemoryPtr();
		break;
	  case CGAGR:
		BE_ST_SetScreenMode(4);
		// screenseg is actually a main mem buffer
		break;
	  case EGAGR:
#ifdef REFKEEN_VER_CATADVENTURES
	  case EGA320GR:						// MDM start (GAMERS EDGE)
		MaxX=320;
		MaxY=200;
#endif
		BE_ST_SetScreenMode(0xd/*|128 for EGA320GR, MDM*/);
		// REFKEEN no need to obtain screenseg
		// - different EGA planes are accessed with new functions
		break;
#ifdef REFKEEN_VER_CATADVENTURES
	  case EGA640GR:
		MaxX=640;
		MaxY=200;
		BE_ST_SetScreenMode(0xe/*|128*/);
		// REFKEEN no need to obtain screenseg
		// - different EGA planes are accessed with new functions
		break;						 		// MDM end
#endif

#ifdef VGAGAME
	  case VGAGR:{
		  id0_char_t extern VGAPAL;	// deluxepaint vga pallet .OBJ file
		  void id0_far *vgapal = &VGAPAL;
		  SetCool256 ();		// custom 256 color mode
		  screenseg=0xa000;
		  _ES = FP_SEG(vgapal);
		  _DX = FP_OFF(vgapal);
		  _BX = 0;
		  _CX = 0x100;
		  _AX = 0x1012;
		  geninterrupt(0x10);			// set the deluxepaint pallet

		  break;
#endif
	}
	VW_SetLineWidth(SCREENWIDTH);
}

/*
=============================================================================

							SCREEN FADES

=============================================================================
*/

id0_char_t colors[7][17]=
{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
 {0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,0},
 {0,0,0,0,0,0,0,0,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0},
 {0,1,2,3,4,5,6,7,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0},
 {0,1,2,3,4,5,6,7,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0},
 {0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f}};


void VW_ColorBorder (id0_int_t color)
{
	BE_ST_SetBorderColor(color);
	bordercolor = color;
}