From c58a72842f6e3aaab4508797474624e5db602854 Mon Sep 17 00:00:00 2001 From: Jeff Teunissen Date: Sat, 11 Dec 2010 20:27:51 -0500 Subject: [PATCH] Update users of Array to new API --- ruamoko/cl_menu/HUD.r | 8 ++++---- ruamoko/cl_menu/MenuGroup.r | 8 ++++---- ruamoko/cl_menu/client_menu.qc | 2 +- ruamoko/cl_menu/controls_o.qc | 14 +++++++------- ruamoko/gui/Group.r | 4 ++-- ruamoko/scheme/CompiledCode.r | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ruamoko/cl_menu/HUD.r b/ruamoko/cl_menu/HUD.r index f2e47791f..bfaa957bf 100644 --- a/ruamoko/cl_menu/HUD.r +++ b/ruamoko/cl_menu/HUD.r @@ -149,7 +149,7 @@ integer HUDHandleClass; { local Frame frame; - frame = [frames getItemAt :currentFrame]; + frame = [frames objectAtIndex: currentFrame]; return [frame size]; } @@ -171,7 +171,7 @@ integer HUDHandleClass; return; } } - f = [frames getItemAt :currentFrame]; + f = [frames objectAtIndex: currentFrame]; nextFrameTime += [f duration]; } } @@ -186,7 +186,7 @@ integer HUDHandleClass; if (nextFrameTime) [self changeFrame]; - f = [frames getItemAt :currentFrame]; + f = [frames objectAtIndex: currentFrame]; [f draw :origin.x :origin.y]; } @@ -195,7 +195,7 @@ integer HUDHandleClass; local Frame f; currentFrame = 0; - f = [frames getItemAt :0]; + f = [frames objectAtIndex: 0]; nextFrameTime = time + [f duration]; } diff --git a/ruamoko/cl_menu/MenuGroup.r b/ruamoko/cl_menu/MenuGroup.r index eb3d0fe49..da7b9eb7a 100644 --- a/ruamoko/cl_menu/MenuGroup.r +++ b/ruamoko/cl_menu/MenuGroup.r @@ -34,10 +34,10 @@ [self prev]; return 1; default: - return [[views getItemAt:current] - keyEvent:key - unicode:unicode - down:down]; + return [[views objectAtIndex: current] + keyEvent: key + unicode: unicode + down: down]; } } diff --git a/ruamoko/cl_menu/client_menu.qc b/ruamoko/cl_menu/client_menu.qc index 7951efc50..8d9bb0eea 100644 --- a/ruamoko/cl_menu/client_menu.qc +++ b/ruamoko/cl_menu/client_menu.qc @@ -125,7 +125,7 @@ string (QFile f) get_comment = local string line; local PLItem plist; - plist = [PLItem fromFile:f]; + plist = [PLItem newFromFile:f]; line = [(PLString) [plist getObjectForKey:"comment"] string]; return line; } diff --git a/ruamoko/cl_menu/controls_o.qc b/ruamoko/cl_menu/controls_o.qc index 0a946dc32..cf861de62 100644 --- a/ruamoko/cl_menu/controls_o.qc +++ b/ruamoko/cl_menu/controls_o.qc @@ -177,7 +177,7 @@ get_hash_keys = hlen = [list count]; for(i = 0; i < hlen; i++) { - binding = [list getItemAt: i]; + binding = [list objectAtIndex: i]; desc1 = get_keyname (binding.command, 1); // first key bound to desc2 = get_keyname (binding.command, 2); // second key bound to @@ -270,7 +270,7 @@ CB_MAIN_control_binding = integer (string text, integer key) CB_basic_control_binding = { - local Binding binding = [movement_bindings getItemAt: stoi (text)]; + local Binding binding = [movement_bindings objectAtIndex: stoi (text)]; local integer ret = CB_MAIN_control_binding (binding, key); // fetch all keynames (possible to optimize.. but not very neccessary) @@ -307,7 +307,7 @@ DRAW_basic_control_binding = hl = [movement_bindings count]; for(i = 0; i < hl; i++) { - local Binding binding = [movement_bindings getItemAt: i]; + local Binding binding = [movement_bindings objectAtIndex: i]; draw_val_item (x + 20, y + 40 + ( i * 10), bind_desc_pad, binding.text, binding.keys); } @@ -347,7 +347,7 @@ MENU_basic_control_binding = integer (string text, integer key) CB_misc_control_binding = { - local Binding binding = [misc_bindings getItemAt: stoi (text)]; + local Binding binding = [misc_bindings objectAtIndex: stoi (text)]; local integer ret = CB_MAIN_control_binding (binding, key); // fetch all keynames (possible to optimize.. but not very neccessary) @@ -384,7 +384,7 @@ DRAW_misc_control_binding = hl = [misc_bindings count]; for(i=0;i < hl; i++) { - local Binding binding = [misc_bindings getItemAt: i]; + local Binding binding = [misc_bindings objectAtIndex: i]; draw_val_item (x + 20, y + 40+(i*10), bind_desc_pad, binding.text, binding.keys); } @@ -423,7 +423,7 @@ MENU_misc_control_binding = integer (string text, integer key) CB_weapon_control_binding = { - local Binding binding = [weapon_bindings getItemAt: stoi (text)]; + local Binding binding = [weapon_bindings objectAtIndex: stoi (text)]; local integer ret = CB_MAIN_control_binding (binding, key); // fetch all keynames (possible to optimize.. but not very neccessary) @@ -460,7 +460,7 @@ DRAW_weapon_control_binding = hl = [weapon_bindings count]; for(i = 0; i < hl; i++) { - local Binding binding = [weapon_bindings getItemAt: i]; + local Binding binding = [weapon_bindings objectAtIndex: i]; draw_val_item (x + 20, y + 40 + (i * 10), bind_desc_pad, binding.text, binding.keys); } diff --git a/ruamoko/gui/Group.r b/ruamoko/gui/Group.r index d3cf023ad..7fbd0cddb 100644 --- a/ruamoko/gui/Group.r +++ b/ruamoko/gui/Group.r @@ -26,8 +26,8 @@ - (id) addViews: (Array)viewlist { while ([viewlist count]) { - [self addView:[viewlist getItemAt:0]]; - [viewlist removeItemAt:0]; + [self addView: [viewlist objectAtIndex: 0]]; + [viewlist removeObjectAtIndex: 0]; } return self; } diff --git a/ruamoko/scheme/CompiledCode.r b/ruamoko/scheme/CompiledCode.r index fb1d3f451..b1b89ab29 100644 --- a/ruamoko/scheme/CompiledCode.r +++ b/ruamoko/scheme/CompiledCode.r @@ -47,10 +47,10 @@ code = obj_malloc (@sizeof(instruction_t) * [instructions count]); lineinfo = obj_malloc(@sizeof(lineinfo_t) * [instructions count]); for (index = 0; index < [constants count]; index++) { - [literals set: index to: (SchemeObject) [constants getItemAt: index]]; + [literals set: index to: (SchemeObject) [constants objectAtIndex: index]]; } for (index = 0; index < [instructions count]; index++) { - inst = [instructions getItemAt: index]; + inst = [instructions objectAtIndex: index]; [inst emitStruct: code]; lineinfo[index].linenumber = [inst line]; lineinfo[index].sourcefile = symbol([inst source]);