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


C++ peq函数代码示例

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


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

示例1: d_getSampleRate

void ZamEQ2Plugin::d_run(const float** inputs, float** outputs, uint32_t frames)
{
	float srate = d_getSampleRate();

	lowshelf(0, 0, srate, freql, gainl);
        peq(1, 0, srate, freq1, gain1, q1);
        peq(2, 0, srate, freq2, gain2, q2);
        highshelf(3, 0, srate, freqh, gainh);

        for (uint32_t i = 0; i < frames; i++) {
                double tmp,tmpl, tmph;
                double in = inputs[0][i];
                in = sanitize_denormal(in);

                //lowshelf
                tmpl = (gainl == 0.f) ? in : run_filter(0, 0, in);

                //highshelf
                tmph = (gainh == 0.f) ? tmpl : run_filter(3, 0, tmpl);

                //parametric1
                tmp = (gain1 == 0.f) ? tmph : run_filter(1, 0, tmph);

		//parametric2
		tmpl = (gain2 == 0.f) ? tmp : run_filter(2, 0, tmp);

                outputs[0][i] = inputs[0][i];
                outputs[0][i] = (float) tmpl;
		outputs[0][i] *= from_dB(master);
	}
}
开发者ID:felipebetancur,项目名称:zam-plugins,代码行数:31,代码来源:ZamEQ2Plugin.cpp

示例2: should_spikes_raise_for_pos

bool
should_spikes_raise_for_pos (struct pos *p, struct pos *pk)
{
  struct pos pb1, pb2, np;

  return peq (pk, p)
    || (peq (pk, prel (p, &pb1, -1, 0))
        && is_strictly_traversable (prel (p, &np, -1, +0)))
    || (peq (pk, prel (p, &pb2, -2, 0))
        && is_strictly_traversable (prel (p, &np, -1, +0))
        && is_strictly_traversable (prel (p, &np, -2, +0)));
}
开发者ID:allisson128,项目名称:mininim,代码行数:12,代码来源:spikes-floor.c

示例3: draw_floor_corner_02

void
draw_floor_corner_02 (ALLEGRO_BITMAP *bitmap, struct pos *p,
                      enum em em, enum vm vm)
{
  ALLEGRO_BITMAP *floor_corner_02 = NULL;

  switch (em) {
  case DUNGEON:
    switch (vm) {
    case CGA: floor_corner_02 = dc_floor_corner_02; break;
    case EGA: floor_corner_02 = de_floor_corner_02; break;
    case VGA: floor_corner_02 = dv_floor_corner_02; break;
    }
    break;
  case PALACE:
    switch (vm) {
    case CGA: floor_corner_02 = pc_floor_corner_02; break;
    case EGA: floor_corner_02 = pe_floor_corner_02; break;
    case VGA: floor_corner_02 = pv_floor_corner_02; break;
    }
    break;
  }

  if (vm == VGA) floor_corner_02 = apply_hue_palette (floor_corner_02);
  if (hgc) floor_corner_02 = apply_palette (floor_corner_02, hgc_palette);
  if (peq (p, &mouse_pos))
    floor_corner_02 = apply_palette (floor_corner_02, selection_palette);

  struct coord c; floor_corner_02_coord (p, &c);
  if (con (p)->fg == CLOSER_FLOOR) c.y += 1;
  draw_bitmapc (floor_corner_02, bitmap, &c, 0);
}
开发者ID:NoSuchProcess,项目名称:mininim,代码行数:32,代码来源:floor.c

示例4: draw_skeleton_floor_right

void
draw_skeleton_floor_right (ALLEGRO_BITMAP *bitmap, struct pos *p,
                           enum em em, enum vm vm)
{
  ALLEGRO_BITMAP *skeleton_floor_right = NULL;

  switch (em) {
  case DUNGEON:
    switch (vm) {
    case CGA: skeleton_floor_right = dc_skeleton_floor_right; break;
    case EGA: skeleton_floor_right = de_skeleton_floor_right; break;
    case VGA: skeleton_floor_right = dv_skeleton_floor_right; break;
    }
    break;
  case PALACE:
    switch (vm) {
    case CGA: skeleton_floor_right = pc_skeleton_floor_right; break;
    case EGA: skeleton_floor_right = pe_skeleton_floor_right; break;
    case VGA: skeleton_floor_right = pv_skeleton_floor_right; break;
    }
    break;
  }

  if (vm == VGA) skeleton_floor_right = apply_hue_palette (skeleton_floor_right);
  if (hgc) skeleton_floor_right = apply_palette (skeleton_floor_right, hgc_palette);
  if (peq (p, &mouse_pos))
    skeleton_floor_right = apply_palette (skeleton_floor_right, selection_palette);

  struct coord c;
  draw_bitmapc (skeleton_floor_right, bitmap, skeleton_floor_right_coord (p, &c), 0);
}
开发者ID:NoSuchProcess,项目名称:mininim,代码行数:31,代码来源:skeleton-floor.c

示例5: draw_arch_top_top

void
draw_arch_top_top (ALLEGRO_BITMAP *bitmap, struct pos *p,
                   enum em em, enum vm vm)
{
  ALLEGRO_BITMAP *arch_top_top = NULL;

  switch (em) {
  case DUNGEON:
    switch (vm) {
    case CGA: arch_top_top = dc_arch_top_top; break;
    case EGA: arch_top_top = de_arch_top_top; break;
    case VGA: arch_top_top = dv_arch_top_top; break;
    }
    break;
  case PALACE:
    switch (vm) {
    case CGA: arch_top_top = pc_arch_top_top; break;
    case EGA: arch_top_top = pe_arch_top_top; break;
    case VGA: arch_top_top = pv_arch_top_top; break;
    }
    break;
  }

  if (vm == VGA) arch_top_top = apply_hue_palette (arch_top_top);
  if (hgc) arch_top_top = apply_palette (arch_top_top, hgc_palette);
  if (peq (p, &mouse_pos))
    arch_top_top = apply_palette (arch_top_top, selection_palette);

  struct coord c;
  draw_bitmapc (arch_top_top, bitmap, arch_top_top_coord (p, &c), 0);
}
开发者ID:NoSuchProcess,项目名称:mininim,代码行数:31,代码来源:arch.c

示例6: redraw_drawn_rectangle

void
redraw_drawn_rectangle (struct drawn_rectangle *dr, struct pos *p,
                        enum em em, enum vm vm)
{
  if (dr->w <= 0 || dr->h <= 0) return;

  push_clipping_rectangle (dr->bitmap, dr->x, dr->y, dr->w, dr->h);

  struct coord tl, br;
  new_coord (&tl, &global_level, room_view, dr->x, dr->y);
  new_coord (&br, &global_level, room_view, dr->x + dr->w - 1,
             dr->y + dr->h - 1);

  struct pos ptl, pbr;
  posf (&tl, &ptl);
  posf (&br, &pbr);

  pos2room (&ptl, room_view, &ptl);
  pos2room (&pbr, room_view, &pbr);
  struct pos p0 = ptl;
  for (p0.floor = pbr.floor; p0.floor >= ptl.floor; p0.floor--)
    for (p0.place = ptl.place; p0.place <= pbr.place; p0.place++)
      if (! peq (&p0, p)) draw_confg (dr->bitmap, &p0, em, vm);

  pop_clipping_rectangle ();
}
开发者ID:oitofelix,项目名称:mininim,代码行数:26,代码来源:room.c

示例7: draw_floor_reflex

void
draw_floor_reflex (ALLEGRO_BITMAP *bitmap, struct pos *p,
                   enum em em, enum vm vm)
{
  ALLEGRO_BITMAP *floor_right = NULL;

  switch (em) {
  case DUNGEON:
    switch (vm) {
    case CGA: floor_right = dc_floor_right; break;
    case EGA: floor_right = de_floor_right; break;
    case VGA: floor_right = dv_floor_right; break;
    }
    break;
  case PALACE:
    switch (vm) {
    case CGA: floor_right = pc_floor_right; break;
    case EGA: floor_right = pe_floor_right; break;
    case VGA: floor_right = pv_floor_right; break;
    }
    break;
  }

  if (vm == VGA) floor_right = apply_hue_palette (floor_right);
  if (hgc) floor_right = apply_palette (floor_right, hgc_palette);
  if (peq (p, &mouse_pos))
    floor_right = apply_palette (floor_right, selection_palette);

  struct pos pl; prel (p, &pl, +0, -1);
  struct coord c;
  int h = al_get_bitmap_height (floor_right);
  draw_bitmap_regionc (floor_right, bitmap, 0, 2, 17, h - 9,
                       floor_reflex_coord (&pl, &c), 0);
}
开发者ID:oitofelix,项目名称:mininim,代码行数:34,代码来源:mirror.c

示例8: draw_pillar_fg

void
draw_pillar_fg (ALLEGRO_BITMAP *bitmap, struct pos *p,
                enum em em, enum vm vm)
{
  ALLEGRO_BITMAP *pillar_fg = NULL;

  switch (em) {
  case DUNGEON:
    switch (vm) {
    case CGA: pillar_fg = dc_pillar_fg; break;
    case EGA: pillar_fg = de_pillar_fg; break;
    case VGA: pillar_fg = dv_pillar_fg; break;
    }
    break;
  case PALACE:
    switch (vm) {
    case CGA: pillar_fg = pc_pillar_fg; break;
    case EGA: pillar_fg = pe_pillar_fg; break;
    case VGA: pillar_fg = pv_pillar_fg; break;
    }
    break;
  }

  if (vm == VGA) pillar_fg = apply_hue_palette (pillar_fg);
  if (hgc) pillar_fg = apply_palette (pillar_fg, hgc_palette);
  if (peq (p, &mouse_pos))
    pillar_fg = apply_palette (pillar_fg, selection_palette);

  struct coord c;
  draw_bitmapc (pillar_fg, bitmap, pillar_coord (p, &c), 0);
}
开发者ID:NoSuchProcess,项目名称:mininim,代码行数:31,代码来源:pillar.c

示例9: draw_door_grid

void
draw_door_grid (ALLEGRO_BITMAP *bitmap, struct pos *p, int i,
                enum em em, enum vm vm)
{
  ALLEGRO_BITMAP *door_grid = NULL;

  switch (em) {
  case DUNGEON:
    switch (vm) {
    case CGA: door_grid = dc_door_grid_cache[i]; break;
    case EGA: door_grid = de_door_grid_cache[i]; break;
    case VGA: door_grid = dv_door_grid_cache[i]; break;
    }
    break;
  case PALACE:
    switch (vm) {
    case CGA: door_grid = pc_door_grid_cache[i]; break;
    case EGA: door_grid = pe_door_grid_cache[i]; break;
    case VGA: door_grid = pv_door_grid_cache[i]; break;
    }
    break;
  }

  if (vm == VGA) door_grid = apply_hue_palette (door_grid);

  if (hgc) door_grid = apply_palette (door_grid, hgc_palette);

  if (peq (p, &mouse_pos))
    door_grid = apply_palette (door_grid, selection_palette);

  struct coord c;
  draw_bitmapc (door_grid, bitmap, door_grid_coord_base (p, &c), 0);
}
开发者ID:allisson128,项目名称:mininim,代码行数:33,代码来源:door.c

示例10: draw_spikes_fg_01

void
draw_spikes_fg_01 (ALLEGRO_BITMAP *bitmap, struct pos *p,
                   enum em em, enum vm vm)
{
  ALLEGRO_BITMAP *spikes_fg_01 = NULL;
  pos2coord_f spikes_fg_01_coord = NULL;

  switch (em) {
  case DUNGEON:
    spikes_fg_01_coord = d_spikes_fg_01_coord;
    switch (vm) {
    case CGA: spikes_fg_01 = dc_spikes_fg_01; break;
    case EGA: spikes_fg_01 = de_spikes_fg_01; break;
    case VGA: spikes_fg_01 = dv_spikes_fg_01; break;
    }
    break;
  case PALACE:
    spikes_fg_01_coord = p_spikes_fg_01_coord;
    switch (vm) {
    case CGA: spikes_fg_01 = pc_spikes_fg_01; break;
    case EGA: spikes_fg_01 = pe_spikes_fg_01; break;
    case VGA: spikes_fg_01 = pv_spikes_fg_01; break;
    }
    break;
  }

  if (vm == VGA) spikes_fg_01 = apply_hue_palette (spikes_fg_01);
  if (hgc) spikes_fg_01 = apply_palette (spikes_fg_01, hgc_palette);
  if (peq (p, &mouse_pos))
    spikes_fg_01 = apply_palette (spikes_fg_01, selection_palette);

  struct coord c;
  draw_bitmapc (spikes_fg_01, bitmap, spikes_fg_01_coord (p, &c), 0);
}
开发者ID:allisson128,项目名称:mininim,代码行数:34,代码来源:spikes-floor.c

示例11: draw_unpressed_closer_floor_base

void
draw_unpressed_closer_floor_base (ALLEGRO_BITMAP *bitmap, struct pos *p,
                                  enum em em, enum vm vm)
{
  ALLEGRO_BITMAP *unpressed_closer_floor_base = NULL;

  switch (em) {
  case DUNGEON:
    switch (vm) {
    case CGA: unpressed_closer_floor_base = dc_unpressed_closer_floor_base; break;
    case EGA: unpressed_closer_floor_base = de_unpressed_closer_floor_base; break;
    case VGA: unpressed_closer_floor_base = dv_unpressed_closer_floor_base; break;
    }
    break;
  case PALACE:
    switch (vm) {
    case CGA: unpressed_closer_floor_base = pc_unpressed_closer_floor_base; break;
    case EGA: unpressed_closer_floor_base = pe_unpressed_closer_floor_base; break;
    case VGA: unpressed_closer_floor_base = pv_unpressed_closer_floor_base; break;
    }
    break;
  }

  if (vm == VGA) unpressed_closer_floor_base = apply_hue_palette (unpressed_closer_floor_base);
  if (hgc) unpressed_closer_floor_base = apply_palette (unpressed_closer_floor_base, hgc_palette);
  if (peq (p, &mouse_pos)) unpressed_closer_floor_base = apply_palette (unpressed_closer_floor_base, selection_palette);

  struct coord c;
  draw_bitmapc (unpressed_closer_floor_base, bitmap,
                floor_base_coord (p, &c), 0);
}
开发者ID:allisson128,项目名称:mininim,代码行数:31,代码来源:closer-floor.c

示例12: draw_broken_floor_left

void
draw_broken_floor_left (ALLEGRO_BITMAP *bitmap, struct pos *p,
                        enum em em, enum vm vm)
{
  ALLEGRO_BITMAP *broken_floor_left = NULL;

  switch (em) {
  case DUNGEON:
    switch (vm) {
    case CGA: broken_floor_left = dc_broken_floor_left; break;
    case EGA: broken_floor_left = de_broken_floor_left; break;
    case VGA: broken_floor_left = dv_broken_floor_left; break;
    }
    break;
  case PALACE:
    switch (vm) {
    case CGA: broken_floor_left = pc_broken_floor_left; break;
    case EGA: broken_floor_left = pe_broken_floor_left; break;
    case VGA: broken_floor_left = pv_broken_floor_left; break;
    }
    break;
  }

  if (vm == VGA) broken_floor_left = apply_hue_palette (broken_floor_left);
  if (hgc) broken_floor_left = apply_palette (broken_floor_left, hgc_palette);
  if (peq (p, &mouse_pos))
    broken_floor_left = apply_palette (broken_floor_left, selection_palette);

  struct coord c;
  draw_bitmapc (broken_floor_left, bitmap, floor_left_coord (p, &c), 0);
}
开发者ID:allisson128,项目名称:mininim,代码行数:31,代码来源:broken-floor.c

示例13: draw_right_mark

void
draw_right_mark (ALLEGRO_BITMAP *bitmap, struct pos *p, int r,
                 enum vm vm)
{
  ALLEGRO_BITMAP *wall_mark_top_right = NULL,
    *wall_mark_bottom_right = NULL;

  if (vm == VGA) {
    wall_mark_top_right = apply_hue_palette (dv_wall_mark_top_right);
    wall_mark_bottom_right = apply_hue_palette (dv_wall_mark_bottom_right);
  } else {
    wall_mark_top_right = de_wall_mark_top_right;
    wall_mark_bottom_right = de_wall_mark_bottom_right;
  }

  if (peq (p, &mouse_pos)) {
    wall_mark_top_right = apply_palette (wall_mark_top_right, selection_palette);
    wall_mark_bottom_right = apply_palette (wall_mark_bottom_right, selection_palette);
  }

  ALLEGRO_BITMAP *wall_mark;
  const int floor_offset[4] = {52, 42, 31, 21};

  if (r % 2) wall_mark = wall_mark_bottom_right;
  else wall_mark = wall_mark_top_right;

  struct coord c;
  c.room = p->room;
  c.x = 32 * p->place + 8 * ((r > 1) ? 1 : 0)
    + ((r < 2) ? 24 : r1 - 3);
  c.y = 63 * p->floor + 56 - floor_offset[r];
  draw_bitmapc (wall_mark, bitmap, &c, 0);
}
开发者ID:NoSuchProcess,项目名称:mininim,代码行数:33,代码来源:wall-depedv.c

示例14: draw_door_pole_base

void
draw_door_pole_base (ALLEGRO_BITMAP *bitmap, struct pos *p,
                     enum em em, enum vm vm)
{
  struct coord c;

  ALLEGRO_BITMAP *door_pole_base = NULL;

  switch (em) {
  case DUNGEON:
    switch (vm) {
    case CGA: door_pole_base = dc_door_pole_base; break;
    case EGA: door_pole_base = de_door_pole_base; break;
    case VGA: door_pole_base = dv_door_pole_base; break;
    }
    break;
  case PALACE:
    switch (vm) {
    case CGA: door_pole_base = pc_door_pole_base; break;
    case EGA: door_pole_base = pe_door_pole_base; break;
    case VGA: door_pole_base = pv_door_pole_base; break;
    }
    break;
  }

  if (vm == VGA) door_pole_base = apply_hue_palette (door_pole_base);
  if (hgc) door_pole_base = apply_palette (door_pole_base, hgc_palette);
  if (peq (p, &mouse_pos))
    door_pole_base = apply_palette (door_pole_base, selection_palette);

  draw_bitmapc (door_pole_base, bitmap, door_pole_base_coord (p, &c), 0);
}
开发者ID:allisson128,项目名称:mininim,代码行数:32,代码来源:door.c

示例15: draw_box

void
draw_box (ALLEGRO_BITMAP* bitmap, struct pos *p, enum vm vm)
{
  struct coord c;
  if (! peq (&mouse_pos, p)) return;

  ALLEGRO_BITMAP *box = get_box_frame (anim_cycle % 3, vm);
  draw_bitmapc (box, bitmap, box_coord (p, &c), 0);
}
开发者ID:allisson128,项目名称:mininim,代码行数:9,代码来源:box.c


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