1 (* |
1 (* |
2 * Hedgewars, a worms-like game |
2 * Hedgewars, a worms-like game |
3 * Copyright (c) 2004-2007 Andrey Korotaev <unC0Rr@gmail.com> |
3 * Copyright (c) 2004-2007 Andrey Korotaev <unC0Rr@gmail.com> |
4 * |
4 * |
5 * This program is free software; you can redistribute it and/or modify |
5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License as published by |
6 * it under the terms of the GNU General Public License as published by |
175 AddFileLog(inttostr(i) + ': ' + ParamStr(i)); |
175 AddFileLog(inttostr(i) + ': ' + ParamStr(i)); |
176 {$ENDIF} |
176 {$ENDIF} |
177 |
177 |
178 case ParamCount of |
178 case ParamCount of |
179 12: begin |
179 12: begin |
180 val(ParamStr(2), cScreenWidth, c); |
180 val(ParamStr(2), cScreenWidth); |
181 val(ParamStr(3), cScreenHeight, c); |
181 val(ParamStr(3), cScreenHeight); |
182 cBitsStr:= ParamStr(4); |
182 cBitsStr:= ParamStr(4); |
183 val(cBitsStr, cBits, c); |
183 val(cBitsStr, cBits); |
184 val(ParamStr(5), ipcPort, c); |
184 val(ParamStr(5), ipcPort); |
185 cFullScreen:= ParamStr(6) = '1'; |
185 cFullScreen:= ParamStr(6) = '1'; |
186 isSoundEnabled:= ParamStr(7) = '1'; |
186 isSoundEnabled:= ParamStr(7) = '1'; |
187 cLocaleFName:= ParamStr(8); |
187 cLocaleFName:= ParamStr(8); |
188 val(ParamStr(9), cInitVolume, c); |
188 val(ParamStr(9), cInitVolume); |
189 val(ParamStr(10), cTimerInterval, c); |
189 val(ParamStr(10), cTimerInterval); |
190 PathPrefix:= ParamStr(11); |
190 PathPrefix:= ParamStr(11); |
191 cShowFPS:= ParamStr(12) = '1'; |
191 cShowFPS:= ParamStr(12) = '1'; |
192 for p:= Succ(Low(TPathType)) to High(TPathType) do |
192 for p:= Succ(Low(TPathType)) to High(TPathType) do |
193 if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]; |
193 if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]; |
194 AddClouds |
194 AddClouds |
195 end; |
195 end; |
196 3: begin |
196 3: begin |
197 val(ParamStr(2), ipcPort, c); |
197 val(ParamStr(2), ipcPort); |
198 GameType:= gmtLandPreview; |
198 GameType:= gmtLandPreview; |
199 if ParamStr(3) <> 'landpreview' then OutError(errmsgShouldntRun, true); |
199 if ParamStr(3) <> 'landpreview' then OutError(errmsgShouldntRun, true); |
200 end |
200 end |
201 else |
201 else |
202 OutError(errmsgShouldntRun, true) |
202 OutError(errmsgShouldntRun, true) |