Esempio n. 1
0
//------------------------------------------------------------------------------
// Function Name  : view_elevator_draw()
// Description    :
//------------------------------------------------------------------------------
void view_elevator_draw(void)
{
	rect_t rect;
	
	if (diff_elevator_info() == 0)
		return;
	
	update_elevator_info();

	rect.x = 245;
	rect.y = 89;
	rect.w = 500;
	rect.h = 32;
	ui_draw_image_part(g_elev_bg_h, &rect, &rect);

	switch (g_elev_status) {
	case MTM_DATA_EV_STATUS_STOP:
		ui_draw_text(245, 89, 500, 32, 24, WHITE, TXT_ALIGN_LEFT, "엘레베이터가 정지해 있습니다");
		break;
	case MTM_DATA_EV_STATUS_UP:
		ui_draw_text(245, 89, 500, 32, 24, WHITE, TXT_ALIGN_LEFT, "엘레베이터가 이동중 입니다");
		break;
	case MTM_DATA_EV_STATUS_DOWN:
		ui_draw_text(245, 89, 500, 32, 24, WHITE, TXT_ALIGN_LEFT, "엘레베이터가 이동중 입니다");
		break;
	case MTM_DATA_EV_STATUS_ARRIVE:
		ui_draw_text(245, 89, 500, 32, 24, WHITE, TXT_ALIGN_LEFT, "엘레베이터가 도착 하였습니다");
		break;
	}
}
Esempio n. 2
0
//------------------------------------------------------------------------------
// Function Name  : view_security_draw()
// Description    :
//------------------------------------------------------------------------------
void view_security_draw(void)
{
	if (diff_security_info() == 0)
		return;
	
	update_security_info();

	if (g_security_status) {
		ui_draw_icon_image(g_secu_icon_h, ICON_IMG_SECU_ON);
		ui_draw_icon_image(g_gas_sw_icon_h, ICON_IMG_SECU_SW_ON);
		ui_draw_text(240, 108, 500, 40, 32, WHITE, TXT_ALIGN_LEFT, "자동방범이 설정되었습니다");
		// play_wave("/app/sound/police_on.wav\0");
	} else {
		ui_draw_icon_image(g_secu_icon_h, ICON_IMG_SECU_OFF);
		ui_draw_icon_image(g_gas_sw_icon_h, ICON_IMG_SECU_SW_OFF);
		ui_draw_text(240, 108, 500, 40, 32, WHITE, TXT_ALIGN_LEFT, "자동방범이 해제되었습니다");
		// play_wave("/app/sound/police_off.wav\0");
	}
}
Esempio n. 3
0
//------------------------------------------------------------------------------
// Function Name  : view_parking_entry()
// Description    :
//------------------------------------------------------------------------------
void view_parking_entry(void)
{
	parking_info_t parking_info;
	char temp_str[64] = {0,};
	rect_t rect;
	int i;
	
	PRINT_FUNC_CO();

	hcm_req_parking_info();

	ui_draw_image(g_parking_bg_h);
	ui_draw_image(g_parking_img_h);
	ui_draw_image(g_map_img_h);
	
	if (g_parking_info.status == PARKING_STATUS_IN) {
		sprintf(temp_str, "[%s]층 [%s]에 주차 되었습니다",
			g_parking_info.floor, g_parking_info.zone);
		ui_draw_text(245, 89, 500, 32, 24, WHITE, TXT_ALIGN_LEFT, temp_str);
	} else {
		ui_draw_text(245, 89, 500, 32, 24, WHITE, TXT_ALIGN_LEFT,
			"주차위치를 확인할 수 없습니다");
	}

	rect.x = 37;
	rect.y = 251;
	rect.w = 172;
	rect.h = 200;
	ui_draw_image_part(g_parking_bg_h, &rect, &rect);

	for (i = 0; i < MAX_PARKING_LIST; i++) {
		parking_list_get_item(i, &parking_info);
		if (parking_info.status != PARKING_STATUS_IN)
			break;
		memset(temp_str, 0, sizeof(temp_str));
		sprintf(temp_str, "%s -%s", parking_info.floor, parking_info.zone);
		ui_draw_text(37, 251+(36*i), 172, 32, 24, WHITE, TXT_ALIGN_LEFT, temp_str);
	}
}
Esempio n. 4
0
//------------------------------------------------------------------------------
// Function Name  : view_security_entry()
// Description    :
//------------------------------------------------------------------------------
void view_security_entry(void)
{
	PRINT_FUNC_CO();

	hcm_req_security_info();

	update_security_info();

	ui_draw_image(g_secu_bg_h);

	if (g_security_status) {
		ui_draw_icon_image(g_secu_icon_h, ICON_IMG_SECU_ON);
		ui_draw_icon_image(g_gas_sw_icon_h, ICON_IMG_SECU_SW_ON);
		ui_draw_text(240, 108, 500, 40, 32, WHITE, TXT_ALIGN_LEFT, "자동방범이 설정되었습니다");
	} else {
		ui_draw_icon_image(g_secu_icon_h, ICON_IMG_SECU_OFF);
		ui_draw_icon_image(g_gas_sw_icon_h, ICON_IMG_SECU_SW_OFF);
		ui_draw_text(240, 108, 500, 40, 32, WHITE, TXT_ALIGN_LEFT, "자동방범이 해제되었습니다");
	}
		
	ui_draw_text(144, 329, 150, 32, 24, WHITE, TXT_ALIGN_RIGHT, "방범해제");
	ui_draw_text(625, 329, 150, 32, 24, WHITE, TXT_ALIGN_LEFT, "방범설정");
}
Esempio n. 5
0
//------------------------------------------------------------------------------
// Function Name  : view_elevator_entry()
// Description    :
//------------------------------------------------------------------------------
void view_elevator_entry(void)
{
	PRINT_FUNC_CO();

	hcm_req_elevator_call();
	
	update_elevator_info();

	ui_draw_image(g_elev_bg_h);

	ui_draw_image(g_icon_img_h);

	ui_draw_image(g_elev_img_h);

	ui_draw_image(g_floor_img_h);
	
	ui_draw_text(245, 89, 500, 32, 24, WHITE, TXT_ALIGN_LEFT, "엘레베이터 상태 확인중 입니다");
	//ui_draw_text(245, 89, 500, 32, 24, WHITE, TXT_ALIGN_LEFT, "엘레베이터를 호출하였습니다");
	
	hcm_register_workqueue(500, view_elevator_animation_arrow);
}
Esempio n. 6
0
/* Process a text order */
static void
process_text2(STREAM s, TEXT2_ORDER * os, uint32 present, BOOL delta)
{
	int i;

	if (present & 0x000001)
		in_uint8(s, os->font);

	if (present & 0x000002)
		in_uint8(s, os->flags);

	if (present & 0x000004)
		in_uint8(s, os->unknown);

	if (present & 0x000008)
		in_uint8(s, os->mixmode);

	if (present & 0x000010)
		rdp_in_colour(s, &os->fgcolour);

	if (present & 0x000020)
		rdp_in_colour(s, &os->bgcolour);

	if (present & 0x000040)
		in_uint16_le(s, os->clipleft);

	if (present & 0x000080)
		in_uint16_le(s, os->cliptop);

	if (present & 0x000100)
		in_uint16_le(s, os->clipright);

	if (present & 0x000200)
		in_uint16_le(s, os->clipbottom);

	if (present & 0x000400)
		in_uint16_le(s, os->boxleft);

	if (present & 0x000800)
		in_uint16_le(s, os->boxtop);

	if (present & 0x001000)
		in_uint16_le(s, os->boxright);

	if (present & 0x002000)
		in_uint16_le(s, os->boxbottom);

	if (present & 0x080000)
		in_uint16_le(s, os->x);

	if (present & 0x100000)
		in_uint16_le(s, os->y);

	if (present & 0x200000)
	{
		in_uint8(s, os->length);
		in_uint8a(s, os->text, os->length);
	}

	DEBUG(("TEXT2(x=%d,y=%d,cl=%d,ct=%d,cr=%d,cb=%d,bl=%d,bt=%d,bb=%d,br=%d,fg=0x%x,bg=0x%x,font=%d,fl=0x%x,mix=%d,unk=0x%x,n=%d)\n", os->x, os->y, os->clipleft, os->cliptop, os->clipright, os->clipbottom, os->boxleft, os->boxtop, os->boxright, os->boxbottom, os->fgcolour, os->bgcolour, os->font, os->flags, os->mixmode, os->unknown, os->length));

	DEBUG(("Text: "));

	for (i = 0; i < os->length; i++)
		DEBUG(("%02x ", os->text[i]));

	DEBUG(("\n"));

	ui_draw_text(os->font, os->flags, os->mixmode, os->x, os->y,
		     os->clipleft, os->cliptop,
		     os->clipright - os->clipleft,
		     os->clipbottom - os->cliptop,
		     os->boxleft, os->boxtop,
		     os->boxright - os->boxleft,
		     os->boxbottom - os->boxtop, os->bgcolour, os->fgcolour, os->text, os->length);
}
Esempio n. 7
0
uint32_t undrfire_state::screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	address_space &space = machine().dummy_space();
	uint8_t layer[5];
	uint8_t scclayer[3];
	uint16_t priority;

#ifdef MAME_DEBUG
	if (machine().input().code_pressed_once (KEYCODE_X))
	{
		m_dislayer[5] ^= 1;
		popmessage("scc text: %01x",m_dislayer[5]);
	}
	if (machine().input().code_pressed_once (KEYCODE_C))
	{
		m_dislayer[0] ^= 1;
		popmessage("bg0: %01x",m_dislayer[0]);
	}

	if (machine().input().code_pressed_once (KEYCODE_V))
	{
		m_dislayer[1] ^= 1;
		popmessage("bg1: %01x",m_dislayer[1]);
	}

	if (machine().input().code_pressed_once (KEYCODE_B))
	{
		m_dislayer[2] ^= 1;
		popmessage("bg2: %01x",m_dislayer[2]);
	}

	if (machine().input().code_pressed_once (KEYCODE_N))
	{
		m_dislayer[3] ^= 1;
		popmessage("bg3: %01x",m_dislayer[3]);
	}

	if (machine().input().code_pressed_once (KEYCODE_M))
	{
		m_dislayer[4] ^= 1;
		popmessage("sprites: %01x",m_dislayer[4]);
	}
#endif

	m_tc0100scn->tilemap_update();
	m_tc0480scp->tilemap_update();

	priority = m_tc0480scp->get_bg_priority();

	layer[0] = (priority & 0xf000) >> 12;   /* tells us which bg layer is bottom */
	layer[1] = (priority & 0x0f00) >>  8;
	layer[2] = (priority & 0x00f0) >>  4;
	layer[3] = (priority & 0x000f) >>  0;   /* tells us which is top */
	layer[4] = 4;   /* text layer always over bg layers */

	scclayer[0] = m_tc0100scn->bottomlayer();
	scclayer[1] = scclayer[0] ^ 1;
	scclayer[2] = 2;

	screen.priority().fill(0, cliprect);
	bitmap.fill(0, cliprect);   /* wrong color? */


/* The "SCC" chip seems to be a 6bpp TC0100SCN. It has a
   bottom layer usually full of bright garish colors that
   vaguely mimic the structure of the layers on top. Seems
   pointless - it's always hidden by other layers. Does it
   serve some blending pupose ? */

	m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, scclayer[0], TILEMAP_DRAW_OPAQUE, 0);
	m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, scclayer[1], 0, 0);

#ifdef MAME_DEBUG
	if (m_dislayer[layer[0]]==0)
#endif
	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[0], 0, 1);

#ifdef MAME_DEBUG
	if (m_dislayer[layer[1]]==0)
#endif
	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 2);

#ifdef MAME_DEBUG
	if (m_dislayer[layer[2]]==0)
#endif
	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[2], 0, 4);

#ifdef MAME_DEBUG
	if (m_dislayer[layer[3]]==0)
#endif
	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[3], 0, 8);

#ifdef MAME_DEBUG
	if (m_dislayer[4]==0)
#endif
	/* Sprites have variable priority (we kludge this on road levels) */
	{
		if ((m_tc0480scp->pri_reg_r(space, 0) & 0x3) == 3)  /* on road levels kludge sprites up 1 priority */
		{
			static const int primasks[4] = {0xfff0, 0xff00, 0x0, 0x0};
			draw_sprites_cbombers(screen, bitmap, cliprect, primasks, 80, -208);
		}
		else
		{
			static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0};
			draw_sprites_cbombers(screen, bitmap, cliprect, primasks, 80, -208);
		}
	}

#ifdef MAME_DEBUG
	if (m_dislayer[5]==0)
#endif
	m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, scclayer[2], 0, 0); /* TC0620SCC text layer */

	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[4], 0, 0);    /* TC0480SCP text layer */

/* Enable this to see rotation (?) control words */
#if 0
	{
		char buf[80];
		int i;

		for (i = 0; i < 8; i += 1)
		{
			sprintf (buf, "%02x: %04x", i, m_rotate_ctrl[i]);
			ui_draw_text (buf, 0, i*8);
		}
	}
#endif
	return 0;
}
Esempio n. 8
0
UINT32 undrfire_state::screen_update_undrfire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	address_space &space = machine().driver_data()->generic_space();
	UINT8 layer[5];
	UINT8 pivlayer[3];
	UINT16 priority;

#ifdef MAME_DEBUG
	if (machine().input().code_pressed_once (KEYCODE_X))
	{
		m_dislayer[5] ^= 1;
		popmessage("piv text: %01x",m_dislayer[5]);
	}
	if (machine().input().code_pressed_once (KEYCODE_C))
	{
		m_dislayer[0] ^= 1;
		popmessage("bg0: %01x",m_dislayer[0]);
	}

	if (machine().input().code_pressed_once (KEYCODE_V))
	{
		m_dislayer[1] ^= 1;
		popmessage("bg1: %01x",m_dislayer[1]);
	}

	if (machine().input().code_pressed_once (KEYCODE_B))
	{
		m_dislayer[2] ^= 1;
		popmessage("bg2: %01x",m_dislayer[2]);
	}

	if (machine().input().code_pressed_once (KEYCODE_N))
	{
		m_dislayer[3] ^= 1;
		popmessage("bg3: %01x",m_dislayer[3]);
	}

	if (machine().input().code_pressed_once (KEYCODE_M))
	{
		m_dislayer[4] ^= 1;
		popmessage("sprites: %01x",m_dislayer[4]);
	}
#endif

	m_tc0100scn->tilemap_update();
	m_tc0480scp->tilemap_update();

	priority = m_tc0480scp->get_bg_priority();

	layer[0] = (priority & 0xf000) >> 12;   /* tells us which bg layer is bottom */
	layer[1] = (priority & 0x0f00) >>  8;
	layer[2] = (priority & 0x00f0) >>  4;
	layer[3] = (priority & 0x000f) >>  0;   /* tells us which is top */
	layer[4] = 4;   /* text layer always over bg layers */

	pivlayer[0] = m_tc0100scn->bottomlayer();
	pivlayer[1] = pivlayer[0] ^ 1;
	pivlayer[2] = 2;

	screen.priority().fill(0, cliprect);
	bitmap.fill(0, cliprect);   /* wrong color? */


/* The "PIV" chip seems to be a renamed TC0100SCN. It has a
   bottom layer usually full of bright garish colors that
   vaguely mimic the structure of the layers on top. Seems
   pointless - it's always hidden by other layers. Does it
   serve some blending pupose ? */

	m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, pivlayer[0], TILEMAP_DRAW_OPAQUE, 0);
	m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, pivlayer[1], 0, 0);

#ifdef MAME_DEBUG
	if (m_dislayer[layer[0]]==0)
#endif
	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[0], 0, 1);

#ifdef MAME_DEBUG
	if (m_dislayer[layer[1]]==0)
#endif
	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 2);

#ifdef MAME_DEBUG
	if (m_dislayer[layer[2]]==0)
#endif
	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[2], 0, 4);

#ifdef MAME_DEBUG
	if (m_dislayer[layer[3]]==0)
#endif
	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[3], 0, 8);

#ifdef MAME_DEBUG
	if (m_dislayer[4]==0)
#endif
	/* Sprites have variable priority (we kludge this on road levels) */
	{
		if ((m_tc0480scp->pri_reg_r(space, 0) & 0x3) == 3)  /* on road levels kludge sprites up 1 priority */
		{
			static const int primasks[4] = {0xfff0, 0xff00, 0x0, 0x0};
			draw_sprites(screen, bitmap, cliprect, primasks, 44, -574);
		}
		else
		{
			static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0};
			draw_sprites(screen, bitmap, cliprect, primasks, 44, -574);
		}
	}

#ifdef MAME_DEBUG
	if (m_dislayer[5]==0)
#endif
	m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, pivlayer[2], 0, 0); /* piv text layer */

	m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[4], 0, 0);    /* TC0480SCP text layer */

	/* See if we should draw artificial gun targets */
	/* (not yet implemented...) */

	if (ioport("FAKE")->read() & 0x1)   /* Fake DSW */
	{
		popmessage("Gunsights on");
	}

/* Enable this to see rotation (?) control words */
#if 0
	{
		char buf[80];
		int i;

		for (i = 0; i < 8; i += 1)
		{
			sprintf (buf, "%02x: %04x", i, m_rotate_ctrl[i]);
			ui_draw_text (buf, 0, i*8);
		}
	}
#endif
	return 0;
}