equal
deleted
inserted
replaced
34 unit uLocale; |
34 unit uLocale; |
35 interface |
35 interface |
36 type TAmmoStrId = (sidGrenade, sidClusterBomb, sidBazooka, sidUFO, sidShotgun, |
36 type TAmmoStrId = (sidGrenade, sidClusterBomb, sidBazooka, sidUFO, sidShotgun, |
37 sidPickHammer, sidSkip, sidRope, sidMine, sidDEagle, |
37 sidPickHammer, sidSkip, sidRope, sidMine, sidDEagle, |
38 sidDynamite, sidBaseballBat); |
38 sidDynamite, sidBaseballBat); |
|
39 TMsgStrId = (sidStartFight, sidSeconds); |
39 var trammo: array[TAmmoStrId] of shortstring; |
40 var trammo: array[TAmmoStrId] of shortstring; |
|
41 trmsg: array[TMsgStrId] of shortstring; |
40 |
42 |
41 procedure LoadLocale(FileName: string); |
43 procedure LoadLocale(FileName: string); |
42 |
44 |
43 implementation |
45 implementation |
44 uses uMisc; |
46 uses uMisc; |
65 TryDo(c = 0, 'Load locale: numbers should be two-digit', true); |
67 TryDo(c = 0, 'Load locale: numbers should be two-digit', true); |
66 TryDo(s[6] = '=', 'Load locale: "=" expected', true); |
68 TryDo(s[6] = '=', 'Load locale: "=" expected', true); |
67 Delete(s, 1, 6); |
69 Delete(s, 1, 6); |
68 case a of |
70 case a of |
69 0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammo[TAmmoStrId(b)]:= s; |
71 0: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammo[TAmmoStrId(b)]:= s; |
|
72 1: if (b >=0) and (b <= ord(High(TMsgStrId))) then trmsg[TMsgStrId(b)]:= s; |
70 end; |
73 end; |
71 end; |
74 end; |
72 closefile(f) |
75 closefile(f) |
73 {$I+} |
76 {$I+} |
74 end; |
77 end; |