hedgewars/hwengine.pas
changeset 3045 41732f986b4f
parent 3043 3acdb4dac6eb
child 3046 d54b2c718971
equal deleted inserted replaced
3044:8466bd29280f 3045:41732f986b4f
   151 procedure OnDestroy;
   151 procedure OnDestroy;
   152 begin
   152 begin
   153     WriteLnToConsole('Freeing resources...');
   153     WriteLnToConsole('Freeing resources...');
   154     if isSoundEnabled then ReleaseSound();
   154     if isSoundEnabled then ReleaseSound();
   155     StoreRelease();
   155     StoreRelease();
       
   156     FreeGearsList();
       
   157     FreeVisualGears;
   156     FreeLand();
   158     FreeLand();
   157     ControllerClose();
   159     ControllerClose();
   158     SendKB();
   160     SendKB();
   159     CloseIPC();
   161     CloseIPC();
       
   162     freeEverything();
   160     TTF_Quit();
   163     TTF_Quit();
   161     SDL_Quit();
   164     SDL_Quit();
   162     freeEverything();
       
   163     exit();
   165     exit();
   164 end;
   166 end;
   165 
   167 
   166 ///////////////////
   168 ///////////////////
   167 procedure MainLoop; 
   169 procedure MainLoop;