mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 18:01:13 +00:00
Non-bogus syntax and warning fixes for ruamoko/cl_menu.
Sadly, there are many bogus warnings and other errors. qfcc is still very sick :(.
This commit is contained in:
parent
9ac6929cf7
commit
3a1e467ae8
21 changed files with 134 additions and 130 deletions
|
@ -6,9 +6,9 @@
|
||||||
|
|
||||||
@interface CrosshairView : View
|
@interface CrosshairView : View
|
||||||
{
|
{
|
||||||
CrosshairCvar []crosshair;
|
CrosshairCvar *crosshair;
|
||||||
}
|
}
|
||||||
-(id)initWithBounds:(Rect)aRect :(CrosshairCvar[])_crosshair;
|
-(id)initWithBounds:(Rect)aRect :(CrosshairCvar*)_crosshair;
|
||||||
-(void) next;
|
-(void) next;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
|
|
||||||
@implementation CrosshairView
|
@implementation CrosshairView
|
||||||
{
|
{
|
||||||
CrosshairCvar []crosshair;
|
CrosshairCvar *crosshair;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(id)initWithBounds:(Rect)aRect :(CrosshairCvar[])_crosshair
|
-(id)initWithBounds:(Rect)aRect :(CrosshairCvar*)_crosshair
|
||||||
{
|
{
|
||||||
self = [self initWithBounds:aRect];
|
self = [self initWithBounds:aRect];
|
||||||
crosshair = _crosshair;
|
crosshair = _crosshair;
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
@interface CvarColorView : View
|
@interface CvarColorView : View
|
||||||
{
|
{
|
||||||
CvarColor []color;
|
CvarColor *color;
|
||||||
}
|
}
|
||||||
-(id)initWithBounds:(Rect)aRect :(CvarColor [])_color;
|
-(id)initWithBounds:(Rect)aRect :(CvarColor *)_color;
|
||||||
-(void)next;
|
-(void)next;
|
||||||
-(void)prev;
|
-(void)prev;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include "CvarColor.h"
|
#include "CvarColor.h"
|
||||||
|
|
||||||
@implementation CvarColorView
|
@implementation CvarColorView
|
||||||
-(id)initWithBounds:(Rect)aRect :(CvarColor [])_color
|
-(id)initWithBounds:(Rect)aRect :(CvarColor *)_color
|
||||||
{
|
{
|
||||||
self = [self initWithBounds:aRect];
|
self = [self initWithBounds:aRect];
|
||||||
color = _color;
|
color = _color;
|
||||||
|
@ -47,5 +47,6 @@
|
||||||
[self prev];
|
[self prev];
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
|
|
||||||
@interface CvarRangeView : Group
|
@interface CvarRangeView : Group
|
||||||
{
|
{
|
||||||
Text []title;
|
Text *title;
|
||||||
Text []value;
|
Text *value;
|
||||||
Slider []slider;
|
Slider *slider;
|
||||||
CvarRange []range;
|
CvarRange *range;
|
||||||
}
|
}
|
||||||
-(void)update;
|
-(void)update;
|
||||||
-(id)initWithBounds:(Rect)aRect title:(string)_title sliderWidth:(integer)width :(CvarRange [])_range;
|
-(id)initWithBounds:(Rect)aRect title:(string)_title sliderWidth:(integer)width :(CvarRange *)_range;
|
||||||
-(void)inc;
|
-(void)inc;
|
||||||
-(void)dec;
|
-(void)dec;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
[value setText:ftos ([range value])];
|
[value setText:ftos ([range value])];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(id)initWithBounds:(Rect)aRect title:(string)_title sliderWidth:(integer)width :(CvarRange [])_range
|
-(id)initWithBounds:(Rect)aRect title:(string)_title sliderWidth:(integer)width :(CvarRange *)_range
|
||||||
{
|
{
|
||||||
local Rect rect;
|
local Rect rect;
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@
|
||||||
[self dec];
|
[self dec];
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
|
|
||||||
@interface CvarToggleView : Group
|
@interface CvarToggleView : Group
|
||||||
{
|
{
|
||||||
Text []title;
|
Text *title;
|
||||||
Text []value;
|
Text *value;
|
||||||
CvarToggle []toggle;
|
CvarToggle *toggle;
|
||||||
}
|
}
|
||||||
-(void)update;
|
-(void)update;
|
||||||
-(id)initWithBounds:(Rect)aRect title:(string)_title :(CvarToggle [])_toggle;
|
-(id)initWithBounds:(Rect)aRect title:(string)_title :(CvarToggle *)_toggle;
|
||||||
-(void)toggle;
|
-(void)toggle;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
[value setText:[toggle value] ? "On" : "Off"];
|
[value setText:[toggle value] ? "On" : "Off"];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(id)initWithBounds:(Rect)aRect title:(string)_title :(CvarToggle [])_toggle
|
-(id)initWithBounds:(Rect)aRect title:(string)_title :(CvarToggle *)_toggle
|
||||||
{
|
{
|
||||||
local Rect rect;
|
local Rect rect;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
@interface Frame : Object
|
@interface Frame : Object
|
||||||
{
|
{
|
||||||
QPic []picture;
|
QPic *picture;
|
||||||
float duration;
|
float duration;
|
||||||
}
|
}
|
||||||
- (id) initWithFile: (string) file duration: (float) time;
|
- (id) initWithFile: (string) file duration: (float) time;
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
@interface HUDGraphic : HUDObject
|
@interface HUDGraphic : HUDObject
|
||||||
{
|
{
|
||||||
QPic []picture;
|
QPic *picture;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithComponents: (integer)x :(integer)y :(string) _file;
|
- (id) initWithComponents: (integer)x :(integer)y :(string) _file;
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
@interface HUDAnimation : HUDObject
|
@interface HUDAnimation : HUDObject
|
||||||
{
|
{
|
||||||
Array []frames;
|
Array *frames;
|
||||||
integer currentFrame;
|
integer currentFrame;
|
||||||
float nextFrameTime;
|
float nextFrameTime;
|
||||||
BOOL looping;
|
BOOL looping;
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
- (id) initWithComponents: (integer) x :(integer) y;
|
- (id) initWithComponents: (integer) x :(integer) y;
|
||||||
- (void) dealloc;
|
- (void) dealloc;
|
||||||
- (Size) size;
|
- (Size) size;
|
||||||
- (void) addFrame: (Frame []) frame;
|
- (void) addFrame: (Frame *) frame;
|
||||||
- (void) changeFrame;
|
- (void) changeFrame;
|
||||||
- (void) display;
|
- (void) display;
|
||||||
- (void) start;
|
- (void) start;
|
||||||
|
|
|
@ -147,13 +147,13 @@ integer HUDHandleClass;
|
||||||
|
|
||||||
- (Size) size
|
- (Size) size
|
||||||
{
|
{
|
||||||
local Frame []frame;
|
local Frame *frame;
|
||||||
|
|
||||||
frame = [frames objectAtIndex: currentFrame];
|
frame = [frames objectAtIndex: currentFrame];
|
||||||
return [frame size];
|
return [frame size];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) addFrame: (Frame[]) frame
|
- (void) addFrame: (Frame*) frame
|
||||||
{
|
{
|
||||||
[frames addObject: frame];
|
[frames addObject: frame];
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ integer HUDHandleClass;
|
||||||
- (void) changeFrame
|
- (void) changeFrame
|
||||||
{
|
{
|
||||||
while (time >= nextFrameTime) {
|
while (time >= nextFrameTime) {
|
||||||
local Frame []f;
|
local Frame *f;
|
||||||
if (++currentFrame == [frames count]) {
|
if (++currentFrame == [frames count]) {
|
||||||
if (looping)
|
if (looping)
|
||||||
currentFrame = 0;
|
currentFrame = 0;
|
||||||
|
@ -178,7 +178,7 @@ integer HUDHandleClass;
|
||||||
|
|
||||||
- (void) display
|
- (void) display
|
||||||
{
|
{
|
||||||
local Frame []f;
|
local Frame *f;
|
||||||
|
|
||||||
if (!visible)
|
if (!visible)
|
||||||
return;
|
return;
|
||||||
|
@ -192,7 +192,7 @@ integer HUDHandleClass;
|
||||||
|
|
||||||
- (void) start
|
- (void) start
|
||||||
{
|
{
|
||||||
local Frame []f;
|
local Frame *f;
|
||||||
|
|
||||||
currentFrame = 0;
|
currentFrame = 0;
|
||||||
f = [frames objectAtIndex: 0];
|
f = [frames objectAtIndex: 0];
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
{
|
{
|
||||||
if ((self = [super init]))
|
if ((self = [super init]))
|
||||||
current = base = 0;
|
current = base = 0;
|
||||||
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)setBase:(integer)b
|
-(void)setBase:(integer)b
|
||||||
|
@ -57,7 +58,7 @@
|
||||||
|
|
||||||
- (void) draw
|
- (void) draw
|
||||||
{
|
{
|
||||||
local View []cur;
|
local View *cur;
|
||||||
|
|
||||||
[super draw];
|
[super draw];
|
||||||
cur = [views objectAtIndex:current];
|
cur = [views objectAtIndex:current];
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
|
|
||||||
@interface ProxyView : View
|
@interface ProxyView : View
|
||||||
{
|
{
|
||||||
View []title;
|
View *title;
|
||||||
View []view;
|
View *view;
|
||||||
}
|
}
|
||||||
-(id)initWithBounds:(Rect)aRect title:(View[])aTitle view:(View[])aView;
|
-(id)initWithBounds:(Rect)aRect title:(View*)aTitle view:(View*)aView;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif//__ProxyView_h
|
#endif//__ProxyView_h
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
@implementation ProxyView
|
@implementation ProxyView
|
||||||
|
|
||||||
-(id)initWithBounds:(Rect)aRect title:(View [])aTitle view:(View [])aView
|
-(id)initWithBounds:(Rect)aRect title:(View *)aTitle view:(View *)aView
|
||||||
{
|
{
|
||||||
self = [super initWithBounds:aRect];
|
self = [super initWithBounds:aRect];
|
||||||
if (!self)
|
if (!self)
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
[view draw];
|
[view draw];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setBasePosFromView: (View []) aview
|
- (void) setBasePosFromView: (View *) aview
|
||||||
{
|
{
|
||||||
[super setBasePosFromView:aview];
|
[super setBasePosFromView:aview];
|
||||||
[title setBasePosFromView:self];
|
[title setBasePosFromView:self];
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
#define __client_menu_h
|
#define __client_menu_h
|
||||||
|
|
||||||
@class InputLine;
|
@class InputLine;
|
||||||
@extern InputLine []input_active;
|
@extern InputLine *input_active;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
float () random = #7;
|
float () random = #7;
|
||||||
|
|
||||||
string [6] dot_name = {
|
string dot_name[6] = {
|
||||||
"gfx/menudot1.lmp",
|
"gfx/menudot1.lmp",
|
||||||
"gfx/menudot2.lmp",
|
"gfx/menudot2.lmp",
|
||||||
"gfx/menudot3.lmp",
|
"gfx/menudot3.lmp",
|
||||||
|
@ -68,7 +68,7 @@ void (integer x, integer y) spinner =
|
||||||
|
|
||||||
integer do_single_player;
|
integer do_single_player;
|
||||||
|
|
||||||
string [32] quitMessage = {
|
string quitMessage[32] = {
|
||||||
/* .........1.........2.... */
|
/* .........1.........2.... */
|
||||||
" Are you gonna quit ",
|
" Are you gonna quit ",
|
||||||
" this game just like ",
|
" this game just like ",
|
||||||
|
@ -115,18 +115,18 @@ integer quit_index;
|
||||||
// ********* LOAD / SAVE
|
// ********* LOAD / SAVE
|
||||||
|
|
||||||
#define MAX_SAVEGAMES 12
|
#define MAX_SAVEGAMES 12
|
||||||
string [MAX_SAVEGAMES] filenames;
|
string filenames[MAX_SAVEGAMES];
|
||||||
integer [MAX_SAVEGAMES] loadable;
|
integer loadable[MAX_SAVEGAMES];
|
||||||
integer load_cursor;
|
integer load_cursor;
|
||||||
integer save_cursor;
|
integer save_cursor;
|
||||||
|
|
||||||
string (QFile f) get_comment =
|
string (QFile f) get_comment =
|
||||||
{
|
{
|
||||||
local string line;
|
local string line;
|
||||||
local PLItem []plist;
|
local PLItem *plist;
|
||||||
|
|
||||||
plist = [PLItem fromFile:f];
|
plist = [PLItem fromFile:f];
|
||||||
line = [(PLString[]) [(PLDictionary[]) plist getObjectForKey:"comment"] string];
|
line = [(PLString*) [(PLDictionary*) plist getObjectForKey:"comment"] string];
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,10 +367,10 @@ string my_tcpip_address;
|
||||||
string lanConfig_portname;
|
string lanConfig_portname;
|
||||||
string lanConfig_joinname;
|
string lanConfig_joinname;
|
||||||
#define NUM_LANCONFIG_CMDS 3
|
#define NUM_LANCONFIG_CMDS 3
|
||||||
integer [NUM_LANCONFIG_CMDS] lanConfig_cursor_table = { 72, 92, 124 };
|
integer lanConfig_cursor_table[NUM_LANCONFIG_CMDS] = { 72, 92, 124 };
|
||||||
InputLine []lanConfig_port_il;
|
InputLine *lanConfig_port_il;
|
||||||
InputLine []lanConfig_join_il;
|
InputLine *lanConfig_join_il;
|
||||||
InputLine []input_active;
|
InputLine *input_active;
|
||||||
|
|
||||||
integer (integer x, integer y) join_draw =
|
integer (integer x, integer y) join_draw =
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
integer set_key_flag; // holds flag for the key-setting
|
integer set_key_flag; // holds flag for the key-setting
|
||||||
|
|
||||||
// three global hashes for the main binding groups
|
// three global hashes for the main binding groups
|
||||||
Array []movement_bindings;
|
Array *movement_bindings;
|
||||||
Array []misc_bindings;
|
Array *misc_bindings;
|
||||||
Array []weapon_bindings;
|
Array *weapon_bindings;
|
||||||
|
|
||||||
struct binding_s {
|
struct binding_s {
|
||||||
string text;
|
string text;
|
||||||
|
@ -71,7 +71,7 @@ typedef struct binding_s binding_t;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
binding_t [16] movement_binding_list = {
|
binding_t movement_binding_list[16] = {
|
||||||
{"Jump/Swin up", "+jump"},
|
{"Jump/Swin up", "+jump"},
|
||||||
{"Walk forward", "+forward"},
|
{"Walk forward", "+forward"},
|
||||||
{"Backpedal", "+back"},
|
{"Backpedal", "+back"},
|
||||||
|
@ -110,7 +110,7 @@ binding_t [10] weapon_binding_list = {
|
||||||
{"Thunderbolt", "impulse 8"},
|
{"Thunderbolt", "impulse 8"},
|
||||||
};
|
};
|
||||||
|
|
||||||
Binding [](binding_t binding)
|
Binding *(binding_t binding)
|
||||||
new_binding =
|
new_binding =
|
||||||
{
|
{
|
||||||
return [[Binding alloc] initWithBinding:binding];
|
return [[Binding alloc] initWithBinding:binding];
|
||||||
|
@ -168,11 +168,11 @@ get_keyname =
|
||||||
|
|
||||||
gets the keys for a keybinding-hash
|
gets the keys for a keybinding-hash
|
||||||
*/
|
*/
|
||||||
void (Array []list)
|
void
|
||||||
get_hash_keys =
|
get_hash_keys (Array *list)
|
||||||
{
|
{
|
||||||
local integer i,hlen;
|
local integer i,hlen;
|
||||||
local Binding []binding;
|
local Binding *binding;
|
||||||
local string desc1 = "", desc2 = "";
|
local string desc1 = "", desc2 = "";
|
||||||
|
|
||||||
hlen = [list count];
|
hlen = [list count];
|
||||||
|
@ -229,8 +229,8 @@ load_keybindings =
|
||||||
It takes the binding as argument.
|
It takes the binding as argument.
|
||||||
This function is called by the real callbacks.
|
This function is called by the real callbacks.
|
||||||
*/
|
*/
|
||||||
integer (Binding []binding, integer key)
|
integer
|
||||||
CB_MAIN_control_binding =
|
CB_MAIN_control_binding (Binding *binding, integer key)
|
||||||
{
|
{
|
||||||
local integer retval = 0, bindcnt = 0;
|
local integer retval = 0, bindcnt = 0;
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ CB_MAIN_control_binding =
|
||||||
integer (string text, integer key)
|
integer (string text, integer key)
|
||||||
CB_basic_control_binding =
|
CB_basic_control_binding =
|
||||||
{
|
{
|
||||||
local Binding []binding = [movement_bindings objectAtIndex: stoi (text)];
|
local Binding *binding = [movement_bindings objectAtIndex: stoi (text)];
|
||||||
local integer ret = CB_MAIN_control_binding (binding, key);
|
local integer ret = CB_MAIN_control_binding (binding, key);
|
||||||
|
|
||||||
// fetch all keynames (possible to optimize.. but not very neccessary)
|
// fetch all keynames (possible to optimize.. but not very neccessary)
|
||||||
|
@ -307,7 +307,7 @@ DRAW_basic_control_binding =
|
||||||
|
|
||||||
hl = [movement_bindings count];
|
hl = [movement_bindings count];
|
||||||
for(i = 0; i < hl; i++) {
|
for(i = 0; i < hl; i++) {
|
||||||
local Binding []binding = [movement_bindings objectAtIndex: i];
|
local Binding *binding = [movement_bindings objectAtIndex: i];
|
||||||
draw_val_item (x + 20, y + 40 + ( i * 10), bind_desc_pad,
|
draw_val_item (x + 20, y + 40 + ( i * 10), bind_desc_pad,
|
||||||
binding.text, binding.keys);
|
binding.text, binding.keys);
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ MENU_basic_control_binding =
|
||||||
integer (string text, integer key)
|
integer (string text, integer key)
|
||||||
CB_misc_control_binding =
|
CB_misc_control_binding =
|
||||||
{
|
{
|
||||||
local Binding []binding = [misc_bindings objectAtIndex: stoi (text)];
|
local Binding *binding = [misc_bindings objectAtIndex: stoi (text)];
|
||||||
local integer ret = CB_MAIN_control_binding (binding, key);
|
local integer ret = CB_MAIN_control_binding (binding, key);
|
||||||
|
|
||||||
// fetch all keynames (possible to optimize.. but not very neccessary)
|
// fetch all keynames (possible to optimize.. but not very neccessary)
|
||||||
|
@ -384,7 +384,7 @@ DRAW_misc_control_binding =
|
||||||
|
|
||||||
hl = [misc_bindings count];
|
hl = [misc_bindings count];
|
||||||
for(i=0;i < hl; i++) {
|
for(i=0;i < hl; i++) {
|
||||||
local Binding []binding = [misc_bindings objectAtIndex: i];
|
local Binding *binding = [misc_bindings objectAtIndex: i];
|
||||||
draw_val_item (x + 20, y + 40+(i*10), bind_desc_pad,
|
draw_val_item (x + 20, y + 40+(i*10), bind_desc_pad,
|
||||||
binding.text, binding.keys);
|
binding.text, binding.keys);
|
||||||
}
|
}
|
||||||
|
@ -423,7 +423,7 @@ MENU_misc_control_binding =
|
||||||
integer (string text, integer key)
|
integer (string text, integer key)
|
||||||
CB_weapon_control_binding =
|
CB_weapon_control_binding =
|
||||||
{
|
{
|
||||||
local Binding []binding = [weapon_bindings objectAtIndex: stoi (text)];
|
local Binding *binding = [weapon_bindings objectAtIndex: stoi (text)];
|
||||||
local integer ret = CB_MAIN_control_binding (binding, key);
|
local integer ret = CB_MAIN_control_binding (binding, key);
|
||||||
|
|
||||||
// fetch all keynames (possible to optimize.. but not very neccessary)
|
// fetch all keynames (possible to optimize.. but not very neccessary)
|
||||||
|
@ -460,7 +460,7 @@ DRAW_weapon_control_binding =
|
||||||
|
|
||||||
hl = [weapon_bindings count];
|
hl = [weapon_bindings count];
|
||||||
for(i = 0; i < hl; i++) {
|
for(i = 0; i < hl; i++) {
|
||||||
local Binding []binding = [weapon_bindings objectAtIndex: i];
|
local Binding *binding = [weapon_bindings objectAtIndex: i];
|
||||||
draw_val_item (x + 20, y + 40 + (i * 10), bind_desc_pad,
|
draw_val_item (x + 20, y + 40 + (i * 10), bind_desc_pad,
|
||||||
binding.text, binding.keys);
|
binding.text, binding.keys);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,32 +53,32 @@
|
||||||
#include "CvarColor.h"
|
#include "CvarColor.h"
|
||||||
#include "CvarToggle.h"
|
#include "CvarToggle.h"
|
||||||
|
|
||||||
Group []video_options;
|
Group *video_options;
|
||||||
Group []audio_options;
|
Group *audio_options;
|
||||||
|
|
||||||
Group []control_options;
|
Group *control_options;
|
||||||
CvarToggleView []grab_mouse_view;
|
CvarToggleView *grab_mouse_view;
|
||||||
CvarToggleView []invert_mouse_view;
|
CvarToggleView *invert_mouse_view;
|
||||||
CvarToggleView []autorun_view;
|
CvarToggleView *autorun_view;
|
||||||
CvarToggleView []freelook_view;
|
CvarToggleView *freelook_view;
|
||||||
CvarToggleView []lookspring_view;
|
CvarToggleView *lookspring_view;
|
||||||
CvarToggleView []lookstrafe_view;
|
CvarToggleView *lookstrafe_view;
|
||||||
CvarRangeView []mouse_amp_view;
|
CvarRangeView *mouse_amp_view;
|
||||||
|
|
||||||
Group []feature_options;
|
Group *feature_options;
|
||||||
CvarToggleView []fraglog_view;
|
CvarToggleView *fraglog_view;
|
||||||
CvarToggleView []autorecord_view;
|
CvarToggleView *autorecord_view;
|
||||||
|
|
||||||
Group []player_options;
|
Group *player_options;
|
||||||
InputLine []player_config_plname_il;
|
InputLine *player_config_plname_il;
|
||||||
InputLine []player_config_tname_il;
|
InputLine *player_config_tname_il;
|
||||||
InputLine []player_config_iactive;
|
InputLine *player_config_iactive;
|
||||||
CvarColorView []topcolor_view;
|
CvarColorView *topcolor_view;
|
||||||
CvarColorView []bottomcolor_view;
|
CvarColorView *bottomcolor_view;
|
||||||
|
|
||||||
Group []network_options;
|
Group *network_options;
|
||||||
InputLine []network_config_rate_il;
|
InputLine *network_config_rate_il;
|
||||||
InputLine []network_config_iactive;
|
InputLine *network_config_iactive;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
some definitions of border values for different things
|
some definitions of border values for different things
|
||||||
|
@ -133,8 +133,8 @@ KEY_video_options =
|
||||||
|
|
||||||
Menu function for the video options menu.
|
Menu function for the video options menu.
|
||||||
*/
|
*/
|
||||||
void (PLItem []plist)
|
void
|
||||||
MENU_video_options =
|
MENU_video_options (PLItem *plist)
|
||||||
{
|
{
|
||||||
local @param ret;
|
local @param ret;
|
||||||
Menu_Begin (54, 50, "Video");
|
Menu_Begin (54, 50, "Video");
|
||||||
|
@ -143,7 +143,7 @@ MENU_video_options =
|
||||||
Menu_KeyEvent (KEY_video_options);
|
Menu_KeyEvent (KEY_video_options);
|
||||||
|
|
||||||
if (plist) {
|
if (plist) {
|
||||||
ret = object_from_plist ([(PLDictionary[]) plist getObjectForKey:"video_options"]);
|
ret = object_from_plist ([(PLDictionary*) plist getObjectForKey:"video_options"]);
|
||||||
video_options = ret.pointer_val;
|
video_options = ret.pointer_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,8 +180,8 @@ KEY_audio_options =
|
||||||
|
|
||||||
Makes the audio menu
|
Makes the audio menu
|
||||||
*/
|
*/
|
||||||
void (PLItem []plist)
|
void
|
||||||
MENU_audio_options =
|
MENU_audio_options (PLItem *plist)
|
||||||
{
|
{
|
||||||
local @param ret;
|
local @param ret;
|
||||||
Menu_Begin (54, 60, "Audio");
|
Menu_Begin (54, 60, "Audio");
|
||||||
|
@ -190,7 +190,7 @@ MENU_audio_options =
|
||||||
Menu_KeyEvent (KEY_audio_options);
|
Menu_KeyEvent (KEY_audio_options);
|
||||||
|
|
||||||
if (plist) {
|
if (plist) {
|
||||||
ret = object_from_plist ([(PLDictionary[]) plist getObjectForKey:"audio_options"]);
|
ret = object_from_plist ([(PLDictionary*) plist getObjectForKey:"audio_options"]);
|
||||||
audio_options = ret.pointer_val;
|
audio_options = ret.pointer_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,8 +264,8 @@ KEY_control_options =
|
||||||
|
|
||||||
Menu make function for control options
|
Menu make function for control options
|
||||||
*/
|
*/
|
||||||
void (PLItem []plist)
|
void
|
||||||
MENU_control_options =
|
MENU_control_options (PLItem *plist)
|
||||||
{
|
{
|
||||||
local @param ret;
|
local @param ret;
|
||||||
Menu_Begin (54, 40, "Controls");
|
Menu_Begin (54, 40, "Controls");
|
||||||
|
@ -274,7 +274,7 @@ MENU_control_options =
|
||||||
Menu_KeyEvent (KEY_control_options);
|
Menu_KeyEvent (KEY_control_options);
|
||||||
|
|
||||||
if (plist) {
|
if (plist) {
|
||||||
ret = object_from_plist ([(PLDictionary[]) plist getObjectForKey:"control_options"]);
|
ret = object_from_plist ([(PLDictionary*) plist getObjectForKey:"control_options"]);
|
||||||
control_options = ret.pointer_val;
|
control_options = ret.pointer_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,8 +328,8 @@ DRAW_feature_options =
|
||||||
|
|
||||||
Makes the feature option menu
|
Makes the feature option menu
|
||||||
*/
|
*/
|
||||||
void (PLItem []plist)
|
void
|
||||||
MENU_feature_options =
|
MENU_feature_options (PLItem *plist)
|
||||||
{
|
{
|
||||||
local Rect rect;
|
local Rect rect;
|
||||||
local id view;
|
local id view;
|
||||||
|
@ -385,7 +385,7 @@ string teamname_cvar; // name of the cvar holding teamname (MAY ? gametype depen
|
||||||
|
|
||||||
// table for cursor-positions
|
// table for cursor-positions
|
||||||
#define NUM_PLAYERCONFIG_CMDS 4
|
#define NUM_PLAYERCONFIG_CMDS 4
|
||||||
integer [NUM_PLAYERCONFIG_CMDS] player_config_cursor_tbl = {
|
integer player_config_cursor_tbl[NUM_PLAYERCONFIG_CMDS] = {
|
||||||
PLAYER_CONF_Y_PAD + 8,
|
PLAYER_CONF_Y_PAD + 8,
|
||||||
PLAYER_CONF_Y_PAD + 20 + 8,
|
PLAYER_CONF_Y_PAD + 20 + 8,
|
||||||
PLAYER_CONF_Y_PAD + 45,
|
PLAYER_CONF_Y_PAD + 45,
|
||||||
|
@ -395,7 +395,7 @@ integer [NUM_PLAYERCONFIG_CMDS] player_config_cursor_tbl = {
|
||||||
integer player_config_cursor;
|
integer player_config_cursor;
|
||||||
|
|
||||||
// array, which holds commands for this menu
|
// array, which holds commands for this menu
|
||||||
string [NUM_PLAYERCONFIG_CMDS] player_config_vals = {
|
string player_config_vals[NUM_PLAYERCONFIG_CMDS] = {
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"topcolor",
|
"topcolor",
|
||||||
|
@ -512,8 +512,8 @@ CB_ME_player_options =
|
||||||
|
|
||||||
Makes the player option menu
|
Makes the player option menu
|
||||||
*/
|
*/
|
||||||
void (PLItem []plist)
|
void
|
||||||
MENU_player_options =
|
MENU_player_options (PLItem *plist)
|
||||||
{
|
{
|
||||||
local Rect rect;
|
local Rect rect;
|
||||||
local id view;
|
local id view;
|
||||||
|
@ -590,14 +590,14 @@ integer network_config_cursor;
|
||||||
|
|
||||||
// table for cursor-positions
|
// table for cursor-positions
|
||||||
#define NUM_NETWORKCONFIG_CMDS 1
|
#define NUM_NETWORKCONFIG_CMDS 1
|
||||||
integer [NUM_NETWORKCONFIG_CMDS] network_config_cursor_tbl = {
|
integer network_config_cursor_tbl[NUM_NETWORKCONFIG_CMDS] = {
|
||||||
PLAYER_CONF_Y_PAD + 8,
|
PLAYER_CONF_Y_PAD + 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
integer network_config_cursor;
|
integer network_config_cursor;
|
||||||
|
|
||||||
// array, which holds commands for this menu
|
// array, which holds commands for this menu
|
||||||
string [NUM_NETWORKCONFIG_CMDS] network_config_vals = {
|
string network_config_vals[NUM_NETWORKCONFIG_CMDS] = {
|
||||||
"",
|
"",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -682,8 +682,8 @@ CB_ME_network_options =
|
||||||
|
|
||||||
Makes the network option menu
|
Makes the network option menu
|
||||||
*/
|
*/
|
||||||
void (PLItem []plist)
|
void
|
||||||
MENU_network_options =
|
MENU_network_options (PLItem *plist)
|
||||||
{
|
{
|
||||||
local id view;
|
local id view;
|
||||||
|
|
||||||
|
@ -743,7 +743,7 @@ void ()
|
||||||
MENU_options =
|
MENU_options =
|
||||||
{
|
{
|
||||||
local integer spacing = 120;
|
local integer spacing = 120;
|
||||||
local PLItem []plist;
|
local PLItem *plist;
|
||||||
|
|
||||||
plist = read_plist ("menu.plist");
|
plist = read_plist ("menu.plist");
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "PropertyList.h"
|
#include "PropertyList.h"
|
||||||
|
|
||||||
@extern @param object_from_plist (PLItem []plist);
|
@extern @param object_from_plist (PLItem *plist);
|
||||||
@extern PLItem []read_plist (string fname);
|
@extern PLItem *read_plist (string fname);
|
||||||
|
|
||||||
#endif//__plistmenu_r
|
#endif//__plistmenu_r
|
||||||
|
|
|
@ -33,20 +33,20 @@
|
||||||
#include "plistmenu.h"
|
#include "plistmenu.h"
|
||||||
|
|
||||||
@static @param
|
@static @param
|
||||||
class_from_plist (PLDictionary []pldict)
|
class_from_plist (PLDictionary *pldict)
|
||||||
{
|
{
|
||||||
local @param [8]params;
|
local @param params[8];
|
||||||
local @param ret;
|
local @param ret;
|
||||||
local @va_list va_list = { 0, params };
|
local @va_list va_list = { 0, params };
|
||||||
local string classname, selname, paramstr;
|
local string classname, selname, paramstr;
|
||||||
local id class;
|
local id class;
|
||||||
local id obj;
|
local id obj;
|
||||||
local PLArray []messages, msg;
|
local PLArray *messages, *msg;
|
||||||
local integer message_count, i, j;
|
local integer message_count, i, j;
|
||||||
local SEL sel;
|
local SEL sel;
|
||||||
local PLItem []item;
|
local PLItem *item;
|
||||||
|
|
||||||
classname = [(PLString[]) [pldict getObjectForKey:"Class"] string];
|
classname = [(PLString*) [pldict getObjectForKey:"Class"] string];
|
||||||
class = obj_lookup_class (classname);
|
class = obj_lookup_class (classname);
|
||||||
if (!class) {
|
if (!class) {
|
||||||
dprint ("could not find " + classname + "\n");
|
dprint ("could not find " + classname + "\n");
|
||||||
|
@ -55,15 +55,15 @@ class_from_plist (PLDictionary []pldict)
|
||||||
}
|
}
|
||||||
obj = [class alloc];
|
obj = [class alloc];
|
||||||
|
|
||||||
messages = (PLArray[]) [pldict getObjectForKey:"Messages"];
|
messages = (PLArray*) [pldict getObjectForKey:"Messages"];
|
||||||
message_count = [messages count];
|
message_count = [messages count];
|
||||||
for (i = 0; i < message_count; i++) {
|
for (i = 0; i < message_count; i++) {
|
||||||
msg = (PLArray[]) [messages getObjectAtIndex:i];
|
msg = (PLArray*) [messages getObjectAtIndex:i];
|
||||||
selname = [(PLString[]) [msg getObjectAtIndex:0] string];
|
selname = [(PLString*) [msg getObjectAtIndex:0] string];
|
||||||
sel = sel_get_uid (selname);
|
sel = sel_get_uid (selname);
|
||||||
va_list.count = [msg count] - 1;
|
va_list.count = [msg count] - 1;
|
||||||
for (j = 0; j < va_list.count; j++) {
|
for (j = 0; j < va_list.count; j++) {
|
||||||
paramstr = [(PLString[]) [msg getObjectAtIndex:j + 1] string];
|
paramstr = [(PLString*) [msg getObjectAtIndex:j + 1] string];
|
||||||
switch (str_mid (paramstr, 0, 1)) {
|
switch (str_mid (paramstr, 0, 1)) {
|
||||||
case "\"":
|
case "\"":
|
||||||
va_list.list[j].string_val = str_mid (paramstr, 1, -1);
|
va_list.list[j].string_val = str_mid (paramstr, 1, -1);
|
||||||
|
@ -88,9 +88,9 @@ class_from_plist (PLDictionary []pldict)
|
||||||
}
|
}
|
||||||
|
|
||||||
@static @param
|
@static @param
|
||||||
array_from_plist (PLArray []plarray)
|
array_from_plist (PLArray *plarray)
|
||||||
{
|
{
|
||||||
local Array []array;
|
local Array *array;
|
||||||
local integer i, count;
|
local integer i, count;
|
||||||
local @param ret;
|
local @param ret;
|
||||||
|
|
||||||
|
@ -110,29 +110,29 @@ union ParamRect {
|
||||||
};
|
};
|
||||||
|
|
||||||
@static @param
|
@static @param
|
||||||
rect_from_plist (PLString []plstring)
|
rect_from_plist (PLString *plstring)
|
||||||
{
|
{
|
||||||
local string str = [plstring string];
|
local string str = [plstring string];
|
||||||
local string tmp;
|
local string tmp;
|
||||||
local integer xp, yp, xl, yl;
|
local integer xp, yp, xl, yl;
|
||||||
local PLItem []item;
|
local PLItem *item;
|
||||||
local union ParamRect pr;
|
local union ParamRect pr;
|
||||||
|
|
||||||
pr.r = makeRect (0, 0, 0, 0);
|
pr.r = makeRect (0, 0, 0, 0);
|
||||||
if (str_mid (str, 0, 1) == "[") {
|
if (str_mid (str, 0, 1) == "[") {
|
||||||
tmp = "(" + str_mid (str, 1, -1) + ")";
|
tmp = "(" + str_mid (str, 1, -1) + ")";
|
||||||
item = [PLItem fromString:tmp];
|
item = [PLItem fromString:tmp];
|
||||||
xp = stoi ([(PLString[]) [(PLArray[]) item getObjectAtIndex:0] string]);
|
xp = stoi ([(PLString*) [(PLArray*) item getObjectAtIndex:0] string]);
|
||||||
yp = stoi ([(PLString[]) [(PLArray[]) item getObjectAtIndex:1] string]);
|
yp = stoi ([(PLString*) [(PLArray*) item getObjectAtIndex:1] string]);
|
||||||
xl = stoi ([(PLString[]) [(PLArray[]) item getObjectAtIndex:2] string]);
|
xl = stoi ([(PLString*) [(PLArray*) item getObjectAtIndex:2] string]);
|
||||||
yl = stoi ([(PLString[]) [(PLArray[]) item getObjectAtIndex:3] string]);
|
yl = stoi ([(PLString*) [(PLArray*) item getObjectAtIndex:3] string]);
|
||||||
pr.r = makeRect (xp, yp, xl, yl);
|
pr.r = makeRect (xp, yp, xl, yl);
|
||||||
}
|
}
|
||||||
return pr.p;
|
return pr.p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@static @param
|
@static @param
|
||||||
string_from_plist (PLString []plstring)
|
string_from_plist (PLString *plstring)
|
||||||
{
|
{
|
||||||
local @param ret;
|
local @param ret;
|
||||||
local string str = [plstring string];
|
local string str = [plstring string];
|
||||||
|
@ -145,28 +145,29 @@ string_from_plist (PLString []plstring)
|
||||||
}
|
}
|
||||||
|
|
||||||
@param
|
@param
|
||||||
object_from_plist (PLItem []plist)
|
object_from_plist (PLItem *plist)
|
||||||
{
|
{
|
||||||
local @param ret;
|
local @param ret;
|
||||||
|
|
||||||
switch ([plist type]) {
|
switch ([plist type]) {
|
||||||
case QFDictionary:
|
case QFDictionary:
|
||||||
return class_from_plist ((PLDictionary []) plist);
|
return class_from_plist ((PLDictionary *) plist);
|
||||||
case QFArray:
|
case QFArray:
|
||||||
return array_from_plist ((PLArray []) plist);
|
return array_from_plist ((PLArray *) plist);
|
||||||
case QFBinary:
|
case QFBinary:
|
||||||
ret.pointer_val = nil;
|
ret.pointer_val = nil;
|
||||||
return ret;
|
return ret;
|
||||||
case QFString:
|
case QFString:
|
||||||
return string_from_plist ((PLString []) plist);
|
return string_from_plist ((PLString *) plist);
|
||||||
}
|
}
|
||||||
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
PLItem []
|
PLItem *
|
||||||
read_plist (string fname)
|
read_plist (string fname)
|
||||||
{
|
{
|
||||||
local QFile file;
|
local QFile file;
|
||||||
local PLItem []plist;
|
local PLItem *plist;
|
||||||
|
|
||||||
file = QFS_OpenFile (fname);
|
file = QFS_OpenFile (fname);
|
||||||
if (!file) {
|
if (!file) {
|
||||||
|
|
|
@ -25,8 +25,8 @@ integer (integer x, integer y) servlist_all_draw =
|
||||||
|
|
||||||
integer serv_nfull;
|
integer serv_nfull;
|
||||||
integer serv_nempty;
|
integer serv_nempty;
|
||||||
InputLine []serv_maxping;
|
InputLine *serv_maxping;
|
||||||
InputLine []serv_game;
|
InputLine *serv_game;
|
||||||
|
|
||||||
integer (integer x, integer y) servlist_filter_draw =
|
integer (integer x, integer y) servlist_filter_draw =
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue