Ants-类似DOS下营救蚂蚁的那个Antz
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
Ants-类似DOS下营救蚂蚁的那个Antz
源位置: http://games.linux.sk/files/ants-1.4.tar.gz
目的位置: /home/exp/ants-1.4.tar.gz
大小: 1.5 MB (1,557,648 字节)
已下载: 1.5 MB (1,557,648 字节)
谁看看,编译一个。以前刚有MONO/EGA显示模式的时候,出的游戏。改版的。
目的位置: /home/exp/ants-1.4.tar.gz
大小: 1.5 MB (1,557,648 字节)
已下载: 1.5 MB (1,557,648 字节)
谁看看,编译一个。以前刚有MONO/EGA显示模式的时候,出的游戏。改版的。
● 鸣学
- skyx
- 论坛版主
- 帖子: 9202
- 注册时间: 2006-12-23 13:46
- 来自: Azores Islands
- 联系:
- skyx
- 论坛版主
- 帖子: 9202
- 注册时间: 2006-12-23 13:46
- 来自: Azores Islands
- 联系:
- skyx
- 论坛版主
- 帖子: 9202
- 注册时间: 2006-12-23 13:46
- 来自: Azores Islands
- 联系:
- booker
- 帖子: 116
- 注册时间: 2006-04-22 10:50
- 来自: Mito
- 联系:
编译完了。除了一堆警告之外,没什么问题。可以玩。
然后修改ants-1.4/src下边的两个cpp文件。
首先,对于ants.cpp,找到开头的
改为
不然会提示找不到ants.h文件。
之后在ants.cpp和ants_le.cpp中找到
改为
原因,第一点是因为include后边尖括号的话,会在系统目录找要求的头文件,改成双引号,则优先在当前目录下找。
第二点,g++编译中,似乎不允许返回值重载。
代码: 全选
sudo apt-get install liballegro4.2 liballegro4.2-dev
首先,对于ants.cpp,找到开头的
代码: 全选
#include <ants.h>
代码: 全选
#include "ants.h"
之后在ants.cpp和ants_le.cpp中找到
代码: 全选
void main()
{
...
}
代码: 全选
int main()
{
...
return 0;
}
第二点,g++编译中,似乎不允许返回值重载。
Ubuntu only now on Dell XPS M1710
- booker
- 帖子: 116
- 注册时间: 2006-04-22 10:50
- 来自: Mito
- 联系:
- booker
- 帖子: 116
- 注册时间: 2006-04-22 10:50
- 来自: Mito
- 联系:
代码: 全选
booker@ubuntu:~/ants-1.4$ make
cd src; \
make
make[1]: Entering directory `/home/booker/ants-1.4/src'
g++ ants.cpp -o ../ants `allegro-config --libs`
ants.cpp: In function ‘void Random_Level()’:
ants.cpp:619: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:619: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:646: warning: passing ‘double’ for argument 2 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:646: warning: passing ‘double’ for argument 3 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:646: warning: passing ‘double’ for argument 4 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:646: warning: passing ‘double’ for argument 5 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:647: warning: passing ‘double’ for argument 2 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:647: warning: passing ‘double’ for argument 3 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:647: warning: passing ‘double’ for argument 4 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:647: warning: passing ‘double’ for argument 5 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:670: warning: passing ‘double’ for argument 2 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:670: warning: passing ‘double’ for argument 3 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:670: warning: passing ‘double’ for argument 4 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:670: warning: passing ‘double’ for argument 5 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:671: warning: passing ‘double’ for argument 2 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:671: warning: passing ‘double’ for argument 3 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:671: warning: passing ‘double’ for argument 4 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:671: warning: passing ‘double’ for argument 5 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:672: warning: converting to ‘int’ from ‘double’
ants.cpp:698: warning: passing ‘double’ for argument 2 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:698: warning: passing ‘double’ for argument 3 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:698: warning: passing ‘double’ for argument 4 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:698: warning: passing ‘double’ for argument 5 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:699: warning: passing ‘double’ for argument 2 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:699: warning: passing ‘double’ for argument 3 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:699: warning: passing ‘double’ for argument 4 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp:699: warning: passing ‘double’ for argument 5 to ‘void rectfill(BITMAP*, int, int, int, int, int)’
ants.cpp: In function ‘void Load_Level()’:
ants.cpp:849: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:849: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:900: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:900: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1060: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1060: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp: In function ‘void Main_Menu()’:
ants.cpp:1188: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1188: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1239: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:1239: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:1240: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:1240: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:1241: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:1241: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:1242: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:1242: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants.cpp:1254: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1254: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp: In function ‘void Draw_GUI()’:
ants.cpp:1341: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1341: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1348: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1348: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1349: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1349: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1350: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1350: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1352: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1352: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp: In function ‘void Main_Game_Loop()’:
ants.cpp:1622: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1622: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1623: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1623: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1625: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1625: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1658: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1658: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1663: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1663: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1674: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1674: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1675: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1675: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1681: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1681: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1682: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1682: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants.cpp:1686: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp:1686: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants.cpp: In function ‘int main()’:
ants.cpp:1718: warning: ‘text_mode’ is deprecated (declared at /usr/include/allegro/alcompat.h:153)
ants.cpp:1718: warning: ‘text_mode’ is deprecated (declared at /usr/include/allegro/alcompat.h:153)
g++ ants_le.cpp -o ../ants_le `allegro-config --libs`
ants_le.cpp: In function ‘int main()’:
ants_le.cpp:73: warning: ‘text_mode’ is deprecated (declared at /usr/include/allegro/alcompat.h:153)
ants_le.cpp:73: warning: ‘text_mode’ is deprecated (declared at /usr/include/allegro/alcompat.h:153)
ants_le.cpp:326: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:326: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:335: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:335: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:336: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:336: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:337: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:337: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:339: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:339: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:340: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:340: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:341: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:341: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:342: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:342: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:343: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:343: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:344: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:344: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:345: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:345: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:453: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants_le.cpp:453: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants_le.cpp:466: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:466: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:467: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:467: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:468: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:468: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:469: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:469: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:472: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:472: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:473: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:473: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:474: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:474: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:475: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:475: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:476: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:476: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:477: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:477: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:478: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:478: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:479: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:479: warning: ‘textprintf_centre’ is deprecated (declared at /usr/include/allegro/alcompat.h:176)
ants_le.cpp:645: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:645: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:646: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:646: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:647: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:647: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:701: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants_le.cpp:701: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants_le.cpp:765: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:765: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:766: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:766: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:767: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:767: warning: ‘textprintf’ is deprecated (declared at /usr/include/allegro/alcompat.h:175)
ants_le.cpp:843: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
ants_le.cpp:843: warning: ‘yield_timeslice’ is deprecated (declared at /usr/include/allegro/alcompat.h:209)
make[1]: Leaving directory `/home/booker/ants-1.4/src'
上次由 booker 在 2007-03-14 18:32,总共编辑 1 次。
Ubuntu only now on Dell XPS M1710
- booker
- 帖子: 116
- 注册时间: 2006-04-22 10:50
- 来自: Mito
- 联系:
来两张截图,用gsnapshot定时截的,不截不知道,原来分辨率只有320X240
另外把编好的二进制包括源代码等等一切全部重新打包,在附件里边,二进制可否在别的机器上直接执行就不太清楚了。大不了到时候来个
然后就./ants执行即可。
另外把编好的二进制包括源代码等等一切全部重新打包,在附件里边,二进制可否在别的机器上直接执行就不太清楚了。大不了到时候来个
代码: 全选
tar jxvf ants-1.4.tar.bz2
cd ants-1.4
make
- 附件
-
- ants-1.4.tar.bz2
- (1.47 MiB) 已下载 80 次
Ubuntu only now on Dell XPS M1710
- booker
- 帖子: 116
- 注册时间: 2006-04-22 10:50
- 来自: Mito
- 联系:
- roylez
- 帖子: 1928
- 注册时间: 2005-10-04 10:59
- 来自: 上海
如果怀念dos游戏可以用dosbox阿……
前几天用dosbox玩大航海2,鼠标始终有些让人不爽,而且还觉得大航海2开始的时候好难,没玩了。有些卡,也许是因为我用了dapper的低版本dosbox。
前几天用dosbox玩大航海2,鼠标始终有些让人不爽,而且还觉得大航海2开始的时候好难,没玩了。有些卡,也许是因为我用了dapper的低版本dosbox。
✡ 弄个dropbox空间来备份文件或者做私人代码服务器?
✡ 配置:[url]git://github.com/roylez/dotfiles.git[/url]
✡ 主页:http://roylez.heroku.com
✡ 各种稀奇玩意儿:http://dooloo.info
✡ 配置:[url]git://github.com/roylez/dotfiles.git[/url]
✡ 主页:http://roylez.heroku.com
✡ 各种稀奇玩意儿:http://dooloo.info