174 for i:= 0 to ParamCount do |
174 for i:= 0 to ParamCount do |
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 11: begin |
179 12: begin |
180 val(ParamStr(1), cScreenWidth, c); |
180 val(ParamStr(2), cScreenWidth, c); |
181 val(ParamStr(2), cScreenHeight, c); |
181 val(ParamStr(3), cScreenHeight, c); |
182 cBitsStr:= ParamStr(3); |
182 cBitsStr:= ParamStr(4); |
183 val(cBitsStr, cBits, c); |
183 val(cBitsStr, cBits, c); |
184 val(ParamStr(4), ipcPort, c); |
184 val(ParamStr(5), ipcPort, c); |
185 cFullScreen:= ParamStr(5) = '1'; |
185 cFullScreen:= ParamStr(6) = '1'; |
186 isSoundEnabled:= ParamStr(6) = '1'; |
186 isSoundEnabled:= ParamStr(7) = '1'; |
187 cLocaleFName:= ParamStr(7); |
187 cLocaleFName:= ParamStr(8); |
188 val(ParamStr(8), cInitVolume, c); |
188 val(ParamStr(9), cInitVolume, c); |
189 val(ParamStr(9), cTimerInterval, c); |
189 val(ParamStr(10), cTimerInterval, c); |
190 PathPrefix:= ParamStr(10); |
190 PathPrefix:= ParamStr(11); |
191 cShowFPS:= ParamStr(11) = '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 2: begin |
196 3: begin |
197 val(ParamStr(1), ipcPort, c); |
197 val(ParamStr(2), ipcPort, c); |
198 GameType:= gmtLandPreview; |
198 GameType:= gmtLandPreview; |
199 if ParamStr(2) <> '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) |
203 end |
203 end |
204 end; |
204 end; |