equal
deleted
inserted
replaced
2383 |
2383 |
2384 aVertex: GLint; |
2384 aVertex: GLint; |
2385 aTexCoord: GLint; |
2385 aTexCoord: GLint; |
2386 aColor: GLint; |
2386 aColor: GLint; |
2387 |
2387 |
2388 var trammo: array[TAmmoStrId] of PChar; // name of the weapon |
2388 var trammo: array[TAmmoStrId] of ansistring; // name of the weapon |
2389 trammoc: array[TAmmoStrId] of PChar; // caption of the weapon |
2389 trammoc: array[TAmmoStrId] of ansistring; // caption of the weapon |
2390 trammod: array[TAmmoStrId] of PChar; // description of the weapon |
2390 trammod: array[TAmmoStrId] of ansistring; // description of the weapon |
2391 trmsg: array[TMsgStrId] of PChar; // message of the event |
2391 trmsg: array[TMsgStrId] of ansistring; // message of the event |
2392 trgoal: array[TGoalStrId] of PChar; // message of the goal |
2392 trgoal: array[TGoalStrId] of ansistring; // message of the goal |
2393 cTestLua : Boolean; |
2393 cTestLua : Boolean; |
2394 |
2394 |
2395 procedure preInitModule; |
2395 procedure preInitModule; |
2396 procedure initModule; |
2396 procedure initModule; |
2397 procedure freeModule; |
2397 procedure freeModule; |
2398 |
2398 |
2399 implementation |
2399 implementation |
2400 uses strutils, sysutils; |
2400 uses strutils; |
2401 |
2401 |
2402 procedure preInitModule; |
2402 procedure preInitModule; |
2403 begin |
2403 begin |
2404 // initialisation flags - they are going to be overwritten by program args |
2404 // initialisation flags - they are going to be overwritten by program args |
2405 |
2405 |
2440 cAudioCodec := ''; |
2440 cAudioCodec := ''; |
2441 {$ENDIF} |
2441 {$ENDIF} |
2442 end; |
2442 end; |
2443 |
2443 |
2444 procedure initModule; |
2444 procedure initModule; |
2445 var asid: TAmmoStrId; |
|
2446 msid: TMsgStrId; |
|
2447 gsid: TGoalStrId; |
|
2448 begin |
2445 begin |
2449 for asid:= Low(TAmmoStrId) to High(TAmmoStrId) do |
|
2450 begin |
|
2451 trammo[asid]:= nil; |
|
2452 trammoc[asid]:= nil; |
|
2453 trammod[asid]:= nil; |
|
2454 end; |
|
2455 for msid:= Low(TMsgStrId) to High(TMsgStrId) do |
|
2456 trmsg[msid]:= nil; |
|
2457 for gsid:= Low(TGoalStrId) to High(TGoalStrId) do |
|
2458 trgoal[gsid]:= nil; |
|
2459 |
|
2460 // TODO: fixme |
2446 // TODO: fixme |
2461 {$IFDEF PAS2C} |
2447 {$IFDEF PAS2C} |
2462 cLocale:= 'en'; |
2448 cLocale:= 'en'; |
2463 {$ELSE} |
2449 {$ELSE} |
2464 // TODO: we could just have one cLocale variables and drop strutils |
2450 // TODO: we could just have one cLocale variables and drop strutils |
2642 UIDisplay:= uiAll; |
2628 UIDisplay:= uiAll; |
2643 LocalMessage:= 0; |
2629 LocalMessage:= 0; |
2644 end; |
2630 end; |
2645 |
2631 |
2646 procedure freeModule; |
2632 procedure freeModule; |
2647 var asid: TAmmoStrId; |
|
2648 msid: TMsgStrId; |
|
2649 gsid: TGoalStrId; |
|
2650 begin |
2633 begin |
2651 for asid:= Low(TAmmoStrId) to High(TAmmoStrId) do |
|
2652 begin |
|
2653 if trammo[asid] <> nil then StrDispose(trammo[asid]); |
|
2654 if trammoc[asid] <> nil then StrDispose(trammoc[asid]); |
|
2655 if trammod[asid] <> nil then StrDispose(trammod[asid]); |
|
2656 end; |
|
2657 for msid:= Low(TMsgStrId) to High(TMsgStrId) do |
|
2658 if trmsg[msid] <> nil then StrDispose(trmsg[msid]); |
|
2659 for gsid:= Low(TGoalStrId) to High(TGoalStrId) do |
|
2660 if trgoal[gsid] <> nil then StrDispose(trgoal[gsid]); |
|
2661 end; |
2634 end; |
2662 |
2635 |
2663 end. |
2636 end. |