Update users of Array to new API

This commit is contained in:
Jeff Teunissen 2010-12-11 20:27:51 -05:00
parent 505076a98d
commit c58a72842f
6 changed files with 20 additions and 20 deletions

View File

@ -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];
}

View File

@ -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];
}
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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]);