当前位置: 首页>>代码示例>>C++>>正文


C++ SCY函数代码示例

本文整理汇总了C++中SCY函数的典型用法代码示例。如果您正苦于以下问题:C++ SCY函数的具体用法?C++ SCY怎么用?C++ SCY使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SCY函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: broken_floor_b

void broken_floor_b(void)
{
	(short)current_proc->a7-=SCY(25);
	flr2((OIMGTBL*)&BELLHOLE1B);
	(short)current_proc->a7+=SCY(25);
	return;
}
开发者ID:Ced2911,项目名称:umk3,代码行数:7,代码来源:BKGDBELL.C

示例2: draw_bezier

static void
draw_bezier(DiaRenderer *self, 
            BezPoint *points,
            int numpoints,
            Color *colour)
{
  WpgRenderer *renderer = WPG_RENDERER (self);
  WPGPoint* pts;
  guint16 data[2];
  int i;

  DIAG_NOTE(g_message("draw_bezier n:%d %fx%f ...", 
            numpoints, points->p1.x, points->p1.y));

  WriteLineAttr(renderer, colour);
  WriteRecHead(renderer, WPG_POLYCURVE, (3 * numpoints - 2) * sizeof(WPGPoint) + 3 * sizeof(guint16));

  pts = g_new(WPGPoint, 3 * numpoints - 2);

  /* ??? size of equivalent data in pre5.1 files ? DWORD */
  memset (data, 0, sizeof(guint16) * 2);
  fwrite_le(data, sizeof(guint16), 2, renderer->file);
  /* num points */
  data[0] = 3 * numpoints - 2;
  fwrite_le(data, sizeof(guint16), 1, renderer->file);

  /* WPG's Poly Curve is a cubic bezier compatible with Dia's bezier.
   * http://www.fileformat.info/format/wpg/egff.htm
   * could lead to the assumption of ony quadratic bezier support,
   * but that's not the case.
   */
  pts[0].x = SCX( points[0].p1.x);
  pts[0].y = SCY(-points[0].p1.y);
  for (i = 1; i < numpoints; i++)
  {
    switch (points[i].type)
    {
    case BEZ_MOVE_TO:
    case BEZ_LINE_TO:
      /* just the point */
      pts[i*3-2].x = pts[i*3-1].x = pts[i*3].x = SCX( points[i].p1.x);
      pts[i*3-2].y = pts[i*3-1].y = pts[i*3].y = SCY(-points[i].p1.y);
      break;
    case BEZ_CURVE_TO:
      /* first control point */
      pts[i*3-2].x = SCX( points[i].p1.x);
      pts[i*3-2].y = SCY(-points[i].p1.y);
      /* second control point */
      pts[i*3-1].x = SCX( points[i].p2.x);
      pts[i*3-1].y = SCY(-points[i].p2.y);
      /* this segments end point */
      pts[i*3].x = SCX( points[i].p3.x);
      pts[i*3].y = SCY(-points[i].p3.y);
      break;
    }
  }

  fwrite_le(pts, sizeof(gint16), 2*(numpoints*3-2), renderer->file);
  g_free(pts);
}
开发者ID:mpuels,项目名称:dia,代码行数:60,代码来源:wpg.c

示例3: OpenThemeData

void CToolBarTreeView::Draw()
{
	const int& cx = m_mdc.cx;
	const int& cy = m_mdc.cy;

	if (IsAppThemed())
	{
		HTHEME hTheme = OpenThemeData(m_hWnd, L"TREEVIEW");
		ASSERT(hTheme);
		RECT rc = {0, 0, cx, cy};
		DrawThemeBackground(hTheme, m_mdc, LBCP_BORDER_NOSCROLL, LBPSN_NORMAL, &rc, NULL);
		CloseThemeData(hTheme);

		// TODO: detect size of border (check for high DPI)
		DrawRect(m_mdc, 1, 1, cx - 2, SCY(24), GetSysColor(COLOR_BTNFACE), 96);
		DrawRect(m_mdc, 1, 1 + SCY(24) - 1, cx - 2, 1, GetSysColor(COLOR_BTNFACE), 192);
	}
	else
	{
		RECT rc = {0, 0, cx, cy};
		FillSolidRect(m_mdc, &rc, GetSysColor(COLOR_WINDOW));
		FillSolidRect(m_mdc, 1, 1, cx - 2, SCY(24), GetSysColor(COLOR_BTNFACE));
		DrawEdge(m_mdc, &rc, EDGE_SUNKEN, BF_RECT);
	}
}
开发者ID:anlarke,项目名称:MovieExplorer,代码行数:25,代码来源:ToolBarTreeView.cpp

示例4: DrawRect

void CStatusBar::Draw()
{
	const int& cx = m_mdc.cx;
	const int& cy = m_mdc.cy;

	// Draw background

	if (m_bBackgrWinDefault)
	{
		DrawRect(m_mdc, 0, 0, cx, 1, GetSysColor(COLOR_3DSHADOW));
		DrawRect(m_mdc, 0, 1, cx, 1, GetSysColor(COLOR_3DHIGHLIGHT));
		DrawRect(m_mdc, 0, 2, cx, cy - 2, GetSysColor(COLOR_3DFACE));
	}
	else
	{
		DrawRectGradientV(m_mdc, 0, 0, cx, cy, m_clrBackgrT, m_clrBackgrB);
		DrawRect(m_mdc, 0, 0, cx, SCY(1), m_clrBackgrLine);
	}

	// Draw status text

	int nSavedDC = SaveDC(m_mdc);

	SetTextColor(m_mdc, m_clrText);
	SelectObject(m_mdc, m_font);
	TextOut(m_mdc, SCX(4), SCY(4), GetText());

	RestoreDC(m_mdc, nSavedDC);

	Invalidate(m_hWnd);
	PostMessage(m_hWnd, WM_PAINT);
}
开发者ID:calgaryleb,项目名称:MovieExplorer,代码行数:32,代码来源:StatusBar.cpp

示例5: VERIFY

void CReBar::OnSize(DWORD type, WORD cx, WORD cy)
{
	VERIFY(m_mdc.Create(cx, cy));

	Draw();

	if (cx == 0 || cy == 0)
	{
		MoveWindow(m_btnTools, 0, 0, 0, 0);
		MoveWindow(m_categoryBar, 0, 0, 0, 0);
		MoveWindow(m_eSearch, 0, 0, 0, 0);
	}
	else
	{
		MoveWindow(m_btnTools, cx - SCX(4) - SCX(24), (cy - SCX(24)) / 2, SCX(24), SCX(24));
		MoveWindow(m_btnSeen, cx - 2*SCX(4) - 2*SCX(24), (cy - SCX(24)) / 2, SCX(24), SCX(24));
		MoveWindow(m_btnSort, cx - 3*SCX(4) - 3*SCX(24), (cy - SCX(24)) / 2, SCX(24), SCX(24));
		MoveWindow(m_btnView, cx - 4 * SCX(4) - 4 * SCX(24), (cy - SCX(24)) / 2, SCX(24), SCX(24));
		MoveWindow(m_categoryBar, 0, 0, cx - SCX(296), cy);
		MoveWindow(m_eSearch, cx - SCX(318), SCY(7), SCX(195), SCY(19), TRUE);
		//MoveWindow(m_categoryBar, 0, 0, cx - SCX(268), cy);
		//MoveWindow(m_eSearch, cx - SCX(257), SCY(7), SCX(195), SCY(19), TRUE);
	}

	PostMessage(m_hWnd, WM_PAINT);
	PostChildren(m_hWnd, WM_PAINT);
}
开发者ID:lipse,项目名称:MovieExplorer,代码行数:27,代码来源:ReBar.cpp

示例6: draw_arc

static void
draw_arc(DiaRenderer *self, 
	 Point *center,
	 real width, real height,
	 real angle1, real angle2,
	 Color *colour)
{
    WmfRenderer *renderer = WMF_RENDERER (self);
    W32::HPEN  hPen;
    W32::POINT ptStart, ptEnd;

    DIAG_NOTE(renderer, "draw_arc %fx%f <%f,<%f @%f,%f\n", 
              width, height, angle1, angle2, center->x, center->y);

    hPen = UsePen(renderer, colour);

    /* calculate start and end points of arc */
    ptStart.x = SCX(center->x + (width / 2.0)  * cos((M_PI / 180.0) * angle1));
    ptStart.y = SCY(center->y - (height / 2.0) * sin((M_PI / 180.0) * angle1));
    ptEnd.x = SCX(center->x + (width / 2.0)  * cos((M_PI / 180.0) * angle2));
    ptEnd.y = SCY(center->y - (height / 2.0) * sin((M_PI / 180.0) * angle2));

    W32::MoveToEx(renderer->hFileDC, ptStart.x, ptStart.y, NULL);
    W32::Arc(renderer->hFileDC,
             SCX(center->x - width / 2), /* bbox corners */
             SCY(center->y - height / 2),
             SCX(center->x + width / 2), 
             SCY(center->y + height / 2),
             ptStart.x, ptStart.y, ptEnd.x, ptEnd.y); 

    DonePen(renderer, hPen);
}
开发者ID:montsuqi,项目名称:monpe,代码行数:32,代码来源:wmf.cpp

示例7: make_stars

void make_stars(void)
{
	OBJECT *obj;
	WORD ta4;

	last_star=makestar();
	last_star->oslink=NULL;

	/* amx2 */
	ta4=100;
	/* amx1 */
	do
	{
		makestar();
		(OBJECT *)(current_proc->pa8)->oslink=last_star;
		last_star=current_proc->pa8;
	} while (--ta4>0);

	/* amx5 */
	do
	{
		process_sleep(1);
		obj=last_star;
		/* amx4 */
		do
		{
			if ( obj->oypos.u.intpos>SCY(260) )
			{
				obj->oypos.u.intpos-=SCY(270);
				obj->oxpos.u.intpos=randu(SCX(400))-1;
			}
		} while ((obj=(OBJECT*)obj->oslink)!=NULL  );
	} while (1);
}
开发者ID:Ced2911,项目名称:umk3,代码行数:34,代码来源:MKMARK.C

示例8: f_jade

//******************************************************************************
//******************************************************************************
void f_jade(void) 
{
	kill_and_stop_scrolling();
	get_char_ani(ANIM_TABLE2,ANIM_F1_FRIEND);
	animate_a0_frames(4,3);
	process_sleep(0x10);
	CREATE(PID_FX,friend_ender);

	current_proc->a10=(ADDRESS)current_proc->pa9;
	current_proc->a10-=4;			// 1 LONG
	current_proc->a11=(ADDRESS)current_proc->pa9;
	
	/* pogo_bounce */
	while (1)
	{
		(ADDRESS)current_proc->pa9=current_proc->a11;
		do_next_a9_frame(current_proc->pa8);
		flight(current_proc->pa8,SCX(0x0),-SCY(0xa0000),SCY(0x9000),NEVER_ANI,-1);
		tsound(0xc);

		(ADDRESS)current_proc->pa9=current_proc->a10;
		do_next_a9_frame(current_proc->pa8);
		process_sleep(1);											
	}
}
开发者ID:Ced2911,项目名称:umk3,代码行数:27,代码来源:MKFRIEND.C

示例9: draw_bezier

static void
draw_bezier(DiaRenderer *self, 
	    BezPoint *points,
	    int numpoints,
	    Color *colour)
{
    WmfRenderer *renderer = WMF_RENDERER (self);
    W32::HPEN    hPen;
    W32::POINT * pts;
    int i;

    DIAG_NOTE(renderer, "draw_bezier n:%d %fx%f ...\n", 
              numpoints, points->p1.x, points->p1.y);

    pts = g_new(W32::POINT, (numpoints-1) * 3 + 1);

    pts[0].x = SCX(points[0].p1.x);
    pts[0].y = SCY(points[0].p1.y);

    for (i = 1; i < numpoints; i++)
    {
        switch(points[i].type)
        {
        case _BezPoint::BEZ_MOVE_TO:
            g_warning("only first BezPoint can be a BEZ_MOVE_TO");
	      break;
        case _BezPoint::BEZ_LINE_TO:
            /* everyhing the same ?*/
            pts[i*3-2].x = pts[i*3-1].x = 
            pts[i*3  ].x = SCX(points[i].p1.x);
            pts[i*3-2].y = pts[i*3-1].y = 
            pts[i*3  ].y = SCY(points[i].p1.y);
        break;
        case _BezPoint::BEZ_CURVE_TO:
            /* control points */
            pts[i*3-2].x = SCX(points[i].p1.x);
            pts[i*3-2].y = SCY(points[i].p1.y);
            pts[i*3-1].x = SCX(points[i].p2.x);
            pts[i*3-1].y = SCY(points[i].p2.y);
            /* end point */
            pts[i*3  ].x = SCX(points[i].p3.x);
            pts[i*3  ].y = SCY(points[i].p3.y);
	  break;
        default:
        break;
        }
    }

    hPen = UsePen(renderer, colour);

    W32::PolyBezier(renderer->hFileDC,
		    pts, (numpoints-1)*3+1);

    DonePen(renderer, hPen);

    g_free(pts);
}
开发者ID:montsuqi,项目名称:monpe,代码行数:57,代码来源:wmf.cpp

示例10: UNREFERENCED_PARAMETER

void CLogWnd::OnSize(DWORD type, WORD cx, WORD cy)
{
	UNREFERENCED_PARAMETER(type);

	MoveWindow(m_edit, 0, SCY(1), cx, cy - SCY(1));

	PostMessage(m_hWnd, WM_PAINT);
	PostChildren(m_hWnd, WM_PAINT);
}
开发者ID:anlarke,项目名称:MovieExplorer,代码行数:9,代码来源:LogWnd.cpp

示例11: sbox

void sbox(double xx0, double yy0, double xx1, double yy1){
	int x0=SCX(xx0), y0=SCY(yy0), x1=SCX(xx1), y1=SCY(yy1);
	int t;
	if(x1<x0){ t=x0; x0=x1; x1=t; }
	if(y1<y0){ t=y0; y0=y1; y1=t; }
	if(x0<clipminx) x0=clipminx;
	if(y0<clipminy) y0=clipminy;
	if(x1>clipmaxx) x1=clipmaxx;
	if(y1>clipmaxy) y1=clipmaxy;
	if(x1<x0 || y1<y0) return;
	m_clrwin(x0, y0, x1, y1, e1->backgr);
}
开发者ID:Harvey-OS,项目名称:harvey,代码行数:12,代码来源:sbox.c

示例12: drip_entry

void drip_entry(void)
{
	(current_proc->pa8)->oyvel.pos=-(randu(SCY(0x40000))+SCY(0x30000));

	flip_single(current_proc->pa8);
	insert_object(current_proc->pa8,&objlst);

	current_proc->a0=8;
	current_proc->pa9=a_drip;
	(long)current_proc->a10=SCY(0x6000);
	blood_fall_splat_12_die();
}
开发者ID:Ced2911,项目名称:umk3,代码行数:12,代码来源:MKBLOOD.C

示例13: GETTHEMEFONT

void CStatusBar::OnScaleChanged()
{
	GETTHEMEFONT(&m_font, _T("StatusBar"), _T("Font"));

	HFONT hPrevFont = (HFONT)SelectObject(m_mdc, m_font);
	SIZE sz;
	GetTextExtentPoint32(m_mdc, _T("Ag"), 2, &sz);
	m_nHeight = SCY(4) + sz.cy + SCY(4);
	SelectObject(m_mdc, hPrevFont);

	Draw();
}
开发者ID:calgaryleb,项目名称:MovieExplorer,代码行数:12,代码来源:StatusBar.cpp

示例14: baiter_enemy

void baiter_enemy(void)
{
	OBJECT *obj=current_proc->pa8;
	short ta4;

	/* be_e1 */
	do
	{
		obj->oxpos.u.intpos=wave_x_position+(short)obj->ochar;
		obj->oypos.u.intpos=wave_y_position+(short)obj->oid;
		obj->oxvel.u.intpos=wave_x_velocity;
		obj->oyvel.u.intpos=wave_y_velocity;
		if (are_we_shot()==SYSTEM_CARRY_SET)
			be_9d;

		if (are_we_hitting_player()!=0)
		{
			kill_player();
			be_9d;
		}

		/* be_e3 */
		process_sleep(1);
		if (randper(dive_randper)==SYSTEM_CARRY_SET)
		{
			if (follow_path(srandarc(SCX(0x20000)),SCY(0x12000)+srandarc(SCY(0x2000)),be_pr)==SYSTEM_CARRY_SET)
				be_99;
			else obj->oypos.u.intpos=-5;

			/* be_e5 */
			do
			{
				ta4=move_to_point(wave_x_position+(short)obj->ochar,wave_y_position+(short)obj->oid,2);
				if (ta4<2)
					break;

				process_sleep(1);
				if (are_we_shot()==SYSTEM_CARRY_SET)
					be_9d;

				if (are_we_hitting_player()!=0)
				{
					kill_player();
					be_9d;
				}

			}
			while(1);
		}
	}
	while(1);
}
开发者ID:Ced2911,项目名称:umk3,代码行数:52,代码来源:MKMARK.C

示例15: gso_dmawnz

OBJECT *makestar(void)
{
	OBJECT *obj;

	gso_dmawnz(obj,(ADDRESS)&star,hidden_anims,0);
	alloc_cache(&star,&hidden_anims,obj);
	obj->ozval=-100;
	obj->oxpos.u.intpos=randu(SCX(400))-1;
	obj->oypos.u.intpos=randu(SCY(254))-1;
	insert_object(obj,&objlst);
	obj->oyvel.pos=randu(SCY(0x20000))+SCY(0x20000);

	return(obj);
}
开发者ID:Ced2911,项目名称:umk3,代码行数:14,代码来源:MKMARK.C


注:本文中的SCY函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。