16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
17 *) |
17 *) |
18 |
18 |
19 unit uLocale; |
19 unit uLocale; |
20 interface |
20 interface |
21 type TAmmoStrId = (sidGrenade, sidClusterBomb, sidBazooka, sidUFO, sidShotgun, |
21 type TAmmoStrId = (sidNothing, sidGrenade, sidClusterBomb, sidBazooka, sidUFO, sidShotgun, |
22 sidPickHammer, sidSkip, sidRope, sidMine, sidDEagle, |
22 sidPickHammer, sidSkip, sidRope, sidMine, sidDEagle, |
23 sidDynamite, sidBaseballBat, sidFirePunch, sidSeconds, |
23 sidDynamite, sidBaseballBat, sidFirePunch, sidSeconds, |
24 sidParachute, sidAirAttack, sidMineStrike, sidBlowTorch, |
24 sidParachute, sidAirAttack, sidMineStrike, sidBlowTorch, |
25 sidGirder, sidTeleport, sidSwitch, sidMortar, sidWhip, |
25 sidGirder, sidTeleport, sidSwitch, sidMortar, sidWhip, |
26 sidKamikaze, sidCake, sidSeduction, sidWatermelon, |
26 sidKamikaze, sidCake, sidSeduction, sidWatermelon, |
75 val(s[4]+s[5], b, c); |
75 val(s[4]+s[5], b, c); |
76 TryDo(c = 0, 'Load locale: numbers should be two-digit' + s, true); |
76 TryDo(c = 0, 'Load locale: numbers should be two-digit' + s, true); |
77 TryDo(s[6] = '=', 'Load locale: "=" expected', true); |
77 TryDo(s[6] = '=', 'Load locale: "=" expected', true); |
78 Delete(s, 1, 6); |
78 Delete(s, 1, 6); |
79 case a of |
79 case a of |
80 0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammo[TAmmoStrId(b)]:= s; |
80 0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammo[TAmmoStrId(b+1)]:= s; |
81 1: if (b >=0) and (b <= ord(High(TMsgStrId))) then trmsg[TMsgStrId(b)]:= s; |
81 1: if (b >=0) and (b <= ord(High(TMsgStrId))) then trmsg[TMsgStrId(b)]:= s; |
82 2: if (b >=0) and (b <= ord(High(TEventId))) then begin |
82 2: if (b >=0) and (b <= ord(High(TEventId))) then begin |
83 TryDo(trevt_n[TEventId(b)] < MAX_EVENT_STRINGS, 'Too many event strings in ' + inttostr(a) + ':' + inttostr(b), false); |
83 TryDo(trevt_n[TEventId(b)] < MAX_EVENT_STRINGS, 'Too many event strings in ' + inttostr(a) + ':' + inttostr(b), false); |
84 if first[TEventId(b)] then |
84 if first[TEventId(b)] then |
85 begin |
85 begin |