Rev 314 |
Blame |
Last modification |
View Log
| RSS feed
/**************************************************
*
* class representing the Params Structure
*
* Author: Marcus -LiGi- Bueschleb
* Project-Start: 9/2007
* Mailto: ligi@smart4mobile.de
* Licence: Creative Commons / Non Commercial
* Big Up: Holger&Ingo
*************************************************/
public class MKParamsParser
{
public final static int MAX_PARAMSETS=
20;
public int[][] field
;
public String[] names=
{"Paramset 1",
"Paramset 2",
"Paramset 3",
"Paramset 4",
"Paramset 5"};
public int act_paramset=
0;
public int get_field_from_act
(int pos
)
{ return field
[act_paramset
][pos
]; }
public void set_field_from_act
(int pos,
int val
)
{ field
[act_paramset
][pos
]=val
; }
public void field_from_act_add
(int pos,
int val
)
{
field
[act_paramset
][pos
]+=val
;
}
public void field_from_act_xor
(int pos,
int val
)
{
field
[act_paramset
][pos
]^=val
;
}
public MKParamsParser
()
{
field=
new int[MAX_PARAMSETS
][58];
for (int ii=
0;ii
<MAX_PARAMSETS
;ii++
)
for (int i=
0;i
<58;i++
)
field
[ii
][i
]=-
1;
}
public void set_by_mk_data
(int paramset_num,
int[] in_arr,MKVersion version
)
{
for ( int i=
0;i
<58;i++
)
field
[paramset_num
][i
]=in_arr
[i
];
names
[paramset_num
]=
"" +
(paramset_num+
1) +
": ";
for ( int i=
46;i
<58;i++
)
{
if(in_arr
[i
]==
0)break;
names
[paramset_num
]+=
(char)in_arr
[i
];
}
}
}