LINUX.ORG.RU
ФорумTalks

порт Depth charge


0

0

Портанул такую игру как Depth charge
---depthchg.c.gz.base64
H4sICKoU0UcAA2RlcHRoY2hnLmMAlVVtb+JGEP6Mf8VAlMZuCE1a9UuBO63tBfsCu2jXLhhFqszb
xTpiTry0qu7y3zu7xo4BR9UZJesdPzM7M8/szFWSzteHxRI6L/H+ufX8AYyrQrTbL5LNpWydzM6E
++RlqUUGwN+bZGHsDrPt5rBP0qWZpHsgTVCLnS1OtkyyJcqWqQVgfEN9fL5uUbIyG5IzIkDQEReB
BOnxAMZEQsNqZ7hkBWYEH8C2jFquwxDrnSE6JwjJwzPEBG2QEoISGZwBOieAMT0DRFDvgg3fv8NE
vZWxQJh7gp3iaU4ZEHAOAz5unaE6lyjP73vnsG73FOfSUeABf3zDbZf7wzZtG69GLefn6z6eaWbS
UtrVvvQkR/XVZgtmAl24b0OCXqW43N6qIw/7+XO8NW/gxlLWEf4SJ6n5vsl+04CKh1WLSbXYrhY7
1WK3WjypFkfV4mm1eLVax59VYppGraYEMyVoV4Yez6tt7OdH/G4bpwtT3STz3sqp0zz9dl9sjyRn
HDseEX36lDZO0A+/n6MdQUng/0nB4cNRGPisDzDkQvgy4GPWBEbH8IkKSaP/t6WuIpYihMyfgB2B
JMQT/mMQPqXZrzCgy6bdxjoB+Ib/Ct/9IWXS5wx4DyQlwvGAoIdPH5VqDXbzOEXY9aLRhJ/6WsQw
x6v1ZrM115vPZt+CX0C9/GpZcAsP7cK4oUkwGxEPlUkIPIyZjALi68PU1sWbK3hEBYRSHhOCG8KA
MjrEeEIbPOwxNqUMdUOpsqXsoVZoD2hLbQQMfalD8KVKxtEo+IH+jAYw2dcL3bFkC0COqOP3IijT
BnQyGnBtZMR9hp3Nx28Ez/G5cpaFQxs5gbs77XfPFxITP+ZFYDIUPeIoUrlwfUYCKtv6Q+D5wtWe
6XjxyJYiBvqcuzAInUeoI03NLFnAdIYJZlj1AwvMPvwMpq5FlWdTYPv6a0gmKtMtLEwNt38M7vwY
XFeOizoPbXCh0wWGK3YcXUblYnxKMVtkAFfXCxURuFq9jJh8hEYhPKmsyQU2ehcbXWCn72KnhVi1
53i2w+FxhwMBI1SbCDd2vpnixrFUB7/XwdWKjqKKugaz7TL+kpt7zU97G604VnGk4jjFUYpjdHrh
ZnYda1r3TVaUqC7ygIsRdTl160BspAMLUnr+qJ7r5npZzdlDInxG9RwmARZ58/inCTg6lN3jfxIc
D2DqkKyjY5rCebxbwsMfmejNLRuw8GEIdfwpF3s8ZFjHAeDtxcuEVFNZL1jWRu4vjDylhHF0VUCf
DKkazFxgjefNpUzXXNFlV4vJCYtEUXQT3aj5nr3/e4MR1WZ5/8/ByzU6pYnMPcI5DB4fUR0RZZ+w
9bi6hUg66LWOOa7BrMT7CdtqVS7MSlksyuK1PN+VF6/Gf1MF4rPQCQAA
---
base64 -d depthchg.c.gz.base64 > depthchg.c.gz
gunzip depthchg.c.gz
gcc -o depthchg depthchg.c -lm
./depthchg

оригинальный исходник - http://www.moorecad.com/classicbasic/basic/creative/depthchg.bas
★★★★★

Вот так несколько более правильно будет :)
В оригинале "YOU HAVE BEEN TORPEDOED! ABANDON SHIP" не печатается при выигрыше (см. строку 130 - там есть THEN 300 )

--- depthchg.c  2008-03-07 14:08:06.000000000 +0300
+++ depthchg.c.patched  2008-03-07 14:09:39.000000000 +0300
@@ -58,7 +58,7 @@
      printf("PORT TO UNIX BY SAAHRIKTU\n\n\n\n");
      for (;;)
          {
-        printf("DIMENSION OF SEARCH AREA\?");
+        printf("DIMENSION OF SEARCH AREA\? ");
         scanf("%d", &G);
         N = floor(log(G) / log(2)) + 1;
         printf
@@ -82,23 +82,24 @@
             subroutine(A, B, C, X, Y, Z);
             printf("\n");
         }
-        printf("\nYOU HAVE BEEN TORPEDOED! ABANDON SHIP!\n");
-        printf("THE SUBMARINE WAS AT %d, %d, %d\n", A, B, C);
         switch (fflag)
              {
-        case 1:
-           printf("\nB O O M ! ! YOU FOUND IT IN %d TRIES!", D);
         case 0:
-           printf("\n\nANOTHER GAME (Y OR N)\?");
-            scanf("%c", &B);
-            scanf("%c", &A);
-            if (A == 'Y' || A == 'y')
+               printf("\nYOU HAVE BEEN TORPEDOED! ABANDON SHIP!\n");
+               printf("THE SUBMARINE WAS AT %d, %d, %d\n", A, B, C);
+               break;
+        case 1:
+               printf("\nB O O M ! ! YOU FOUND IT IN %d TRIES!", D);
+             }
+        printf("\n\nANOTHER GAME (Y OR N)\?");
+        scanf("%c", &B);
+        scanf("%c", &A);
+        if (A == 'Y' || A == 'y')
                bflag = 0;
-            else {
+        else {
                 printf("OK. HOPE YOU ENJOYED YOURSELF.\n");
                 bflag = 1;
             }
-            }
         if (bflag)
            break;
         }

mad_soft
()

---depthchg.mypatch.gz.base64
H4sICAMx0UcAA2RlcHRoY2hnLm15cGF0Y2gAdVPvb9owEP0c/opHpbaJElhCm5WBqmHAhbTDRklY
y8QXCNCisVCFVNO08r/PjsOPrsUW6HL23bv3fFcqlTCdPadP0dNjOSqvllOtYtvVkn1Rsq/guDXb
qVWcsr1dMO0L2y6YpnkQ9ibksuZ+qbnuu5BGA6VL16rCFP9XaDQK+Gg9WB/7h0f8P6xC6SP/fL4c
P+IatjjXNOmZSE+9YB69Xc8RFnF6eDaOjkCn0TZinYzjqZ4ufs102zDqGVf3s+TqSsY7rs+JyD3X
T1o+JaH3naLFe/1B6LEO0OO+7wUhv2cWGL3HLfUDOhzFJ8YW5TkdT3TH3X/n2frcDxFyDJj3gOYQ
ASFd37sLB6NYbZlCiTRfJdDrdUNoAvxVWmx98lvbySZAtB1C2+tRFnicgd8goMRvdUEEh9HXrDoN
62gci3un0xMLZx3lYyLNfLlaJfpy9ah3DHyCNCqGAROOEqlasSouzKpjVZxMJk3p+TJJVi/pIp7p
xELTQssSjSF6AD9U7kP6uUQaNqL+9e9FGj1Bz3goStF4PYNdO+Qziod8gC4RL9CklAnx/D5tc9ou
gjQJawuiQdfrF3ept4FhlyIYNHvE9xjFPQlAQpxOrfwn7lvIK5aaC2He1JPJLpesK+vJZDb+mSFk
VTq1nNy+0Ca42D0UxZZF3/ABa8ML4TEBiND3aFAUqG2FtyVrapt3qUYxYVww8NEhPQp9CO6DGbtH
zJTPHzKSD9k84icKK5uVOXSC62ucD8/x+gpl/zmXVLXJvpny67OlKE+SV3FFFXd2BmWLOHEKbS84
vyujy/s0407ZLR/StrTFbHy7KeetLe5voZwd1OaNIfEm6g3wn/IbNQabfKqSWfqSxNkAbAr/AAyb
zwofBQAA
---

saahriktu ★★★★★
() автор топика
Ответ на: комментарий от saahriktu

эй парни, вам sf.net или code.G.com. да и скриншотов нет. а корованы там есть?

cobold ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.