这篇教程C++ sqinfo_has函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中sqinfo_has函数的典型用法代码示例。如果您正苦于以下问题:C++ sqinfo_has函数的具体用法?C++ sqinfo_has怎么用?C++ sqinfo_has使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了sqinfo_has函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: square_isno_esp/** * True if cave square can't be detected by player ESP */bool square_isno_esp(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_NO_ESP);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例2: square_isproject/** * True if cave square is marked for projection processing */bool square_isproject(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_PROJECT);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例3: square_ismon_restrict/** * True if cave square has monster restrictions (generation) */bool square_ismon_restrict(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_MON_RESTRICT);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例4: square_isno_teleport/** * True if cave square can't be teleported from by the player */bool square_isno_teleport(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_NO_TELEPORT);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例5: square_iswall_outer/** * True if cave square is an outer wall (generation) */bool square_iswall_outer(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_WALL_OUTER);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例6: square_iswall_solid/** * True if cave square is a solid wall (generation) */bool square_iswall_solid(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_WALL_SOLID);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例7: square_isdedge/** * True if the square is on the trap detection edge */bool square_isdedge(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_DEDGE);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例8: square_isinvis/** * True if the square has an unknown trap */bool square_isinvis(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_INVIS);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例9: square_isfeel/** * True if cave square is a feeling trigger square */bool square_isfeel(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_FEEL);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例10: square_wasseen/** * True if the cave square was seen before the current update */bool square_wasseen(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_WASSEEN);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:7,
示例11: square_isvault/** * True if the square is part of a vault. * * This doesn't say what kind of square it is, just that it is part of a vault. */bool square_isvault(struct chunk *c, int y, int x) { assert(square_in_bounds(c, y, x)); return sqinfo_has(c->squares[y][x].info, SQUARE_VAULT);}
开发者ID:NickMcConnell,项目名称:FirstAgeAngband,代码行数:9,
示例12: move_player/** * Move player in the given direction, with the given "pickup" flag. * * This routine should only be called when energy has been expended. * * Note that this routine handles monsters in the destination grid, * and also handles attempting to move into walls/doors/etc. */void move_player(int dir){ int py = p_ptr->py; int px = p_ptr->px; byte str_escape, dex_escape; /* Permit the player to move? */ bool can_move = FALSE; /* Player is jumping off a cliff */ bool falling = FALSE; /* Player hits a trap (always unless flying) */ bool trapped = TRUE; int temp; int y, x; feature_type *f_ptr; /* Find the result of moving */ y = py + ddy[dir]; x = px + ddx[dir]; f_ptr = &f_info[cave_feat[y][x]]; /* Hack -- attack monsters */ if (cave_m_idx[y][x] > 0) { /* Attack */ if (py_attack(y, x, TRUE)) return; } /* It takes some dexterity, or failing that strength, to get out of pits */ if (cave_feat[py][px] == FEAT_PIT) { str_escape = adj_dex_dis[p_ptr->state.stat_ind[A_STR]]; dex_escape = adj_dex_dis[p_ptr->state.stat_ind[A_DEX]]; /* First attempt to leap out of the pit, */ if ((dex_escape + 1) * 2 < randint1(16)) { /* then attempt to climb out of the pit. */ if (str_escape + 3 < randint1(16)) { /* Failure costs a turn. */ msg("You remain stuck in the pit."); return; } else msg("You clamber out of the pit."); } else msg("You leap out of the pit."); } /* Option to disarm a visible trap. -TNB- */ /* Hack - Rogues can walk over their own trap - BR */ if (OPT(easy_alter) && cave_visible_trap(y, x) && cave_player_trap(y, x)) { bool more = FALSE; /* Auto-repeat if not already repeating */ if (cmd_get_nrepeats() == 0) cmd_set_repeat(99); more = do_cmd_disarm_aux(y, x); /* Cancel repeat unless we may continue */ if (!more) disturb(0, 0); return; } /* Some terrain is impassable for the player, such as stone walls. */ else if (!tf_has(f_ptr->flags, TF_PASSABLE)) { /* Disturb the player */ disturb(0, 0); /* Notice unknown obstacles */ if (!sqinfo_has(cave_info[y][x], SQUARE_MARK)) { /* Closed door */ if (tf_has(f_ptr->flags, TF_DOOR_CLOSED)) { msgt(MSG_HITWALL, "You feel a door blocking your way."); sqinfo_on(cave_info[y][x], SQUARE_MARK); light_spot(y, x); } /* Wall (or secret door) */ else { msgt(MSG_HITWALL, "You feel a wall blocking your way."); sqinfo_on(cave_info[y][x], SQUARE_MARK); light_spot(y, x); } }//.........这里部分代码省略.........
开发者ID:NickMcConnell,项目名称:FAangband,代码行数:101,
示例13: move_player//.........这里部分代码省略......... { can_move = FALSE; msg("You are rooted to the ground and can't move."); /* Prevent repeated attempts */ disturb(0, 0); return; } /* Option to disarm a visible trap. -TNB- */ /* Hack - Rogues can walk over their own trap - BR */ else if (cave_visible_trap(y, x) && cave_player_trap(y, x) && OPT(easy_alter)) { bool more = FALSE; /* Auto-repeat if not already repeating */ if (cmd_get_nrepeats() == 0) cmd_set_repeat(99); more = do_cmd_disarm_aux(y, x); /* Cancel repeat unless we may continue */ if (!more) disturb(0, 0); return; } /* Some terrain is impassable for the player, such as stone walls. */ else if (!tf_has(f_ptr->flags, TF_PASSABLE)) { /* Disturb the player */ disturb(0, 0); /* Notice unknown obstacles */ if (!sqinfo_has(cave_info[y][x], SQUARE_MARK)) { /* Closed door */ if (tf_has(f_ptr->flags, TF_DOOR_CLOSED)) { msgt(MSG_HITWALL, "You feel a door blocking your way."); sqinfo_on(cave_info[y][x], SQUARE_MARK); light_spot(y, x); } /* Wall (or secret door) */ else { msgt(MSG_HITWALL, "You feel a wall blocking your way."); sqinfo_on(cave_info[y][x], SQUARE_MARK); light_spot(y, x); } } /* Mention known obstacles */ else { /* Closed door */ if (tf_has(f_ptr->flags, TF_DOOR_CLOSED)) { /* Option to automatically open doors. -TNB- */ if (OPT(easy_alter)) { bool more = FALSE; /* Auto-repeat if not already repeating */ if (cmd_get_nrepeats() == 0) cmd_set_repeat(99); /* Open the door */ more = do_cmd_open_aux(y, x); /* Cancel repeat unless we may continue */ if (!more)
开发者ID:Rydelfox,项目名称:Ponyband,代码行数:67,
注:本文中的sqinfo_has函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ sql函数代码示例 C++ sq_throwerror函数代码示例 |