int draw_examine(int display_x, int display_y, World * w, int x, int y, Object * exclude) { Object *obj = obj_at(w, x, y, exclude); if (obj == 0) return 0; set_str((CHAR_INFO *) screen_buffer, obj->type, display_x, display_y, 0, obj->shape.fg_color); return 1; }
// Print this EntryActivation and all other EntryActivation's that follow it. void EntryActivation::print_list_on(Stream* st, int indent, int index) { #if USE_DEBUG_PRINTING int last_indent = st->indentation(); st->set_indentation(indent); st->indent(); st->print("[%d] ", index); Method m = method(); m.print_value_on(st); st->cr(); for (int i = 0; i < length(); i++) { st->indent(); st->print(" "); switch(tag_at(i)) { case float_tag: st->print("(float) %f", jvm_f2d(float_at(i))); break; case double_tag: st->print("(double) %d", double_at(i)); i++; break; case long_tag: st->print("(long) "); st->print(OsMisc_jlong_format_specifier(), long_at(i)); i++; break; case obj_tag: { st->print("(obj) "); Oop obj = obj_at(i); obj.print_value_on(st); } break; case int_tag: st->print("(int) %d", int_at(i)); break; default: SHOULD_NOT_REACH_HERE(); } st->cr(); } EntryActivation mynext = next(); if (mynext.not_null()) { mynext.print_list_on(st, indent, index+1); } st->set_indentation(last_indent); #endif }
int ravi_list_code(lua_State *L) { int pc; Proto *p; p = getproto(obj_at(L, 1)); lua_newtable(L); setnameval(L, "maxstack", p->maxstacksize); setnameval(L, "numparams", p->numparams); for (pc = 0; pc<p->sizecode; pc++) { char buff[100]; lua_pushinteger(L, pc + 1); lua_pushstring(L, buildop2(p, pc, buff, sizeof buff)); lua_settable(L, -3); } return 1; }
Char loc_symbol(Short x, Short y) // Equivalent of "news0" { obj_t *otmp; trap_t *ttmp; UChar cell_type; Char c; Boolean blind = Blind; if (OUT_OF_BOUNDS(x,y)) return ' '; cell_type = get_cell_type(floor_info[x][y]); if (!get_cell_seen(floor_info[x][y])) c = ' '; else if (cell_type == POOL) c = POOL_SYM; else if (!blind && (otmp = obj_at(x,y))) c = otmp->olet; else if (!blind && gold_at(x,y)) c = GOLD_SYM; else if (x == xupstair && y == yupstair) c = UPSTAIR_SYM; else if (x == xdnstair && y == ydnstair) c = DOWNSTAIR_SYM; else if ((ttmp = trap_at(x,y)) && get_trap_seen(ttmp->trap_info)) c = TRAP_SYM; else switch(cell_type) { case HWALL: c = HWALL_SYM; break; case VWALL: c = VWALL_SYM; break; case CORR: c = CORR_SYM; break; case SCORR: case SDOOR: c = floor_symbol[x][y]; /* %% wrong after killing mimic ! */ break; case LDOOR: case DOOR: c = DOOR_SYM; break; case ROOM: // the 'blind' here seems strange to me: if (get_cell_lit(floor_info[x][y]) || cansee(x,y) || blind) c = ROOM_SYM; else c = ' '; break; default: c = ERRCHAR; } return c; }
ReturnOop local_variable_table() { return obj_at(VAR_TABLE_INDEX); }
ReturnOop line_number_table() { return obj_at(LINE_TABLE_INDEX); }