2011-06-05 15:05:12 +04:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
2011-07-19 11:26:40 +01:00
|
|
|
# ScummVM - Graphic Adventure Engine
|
|
|
|
#
|
|
|
|
# ScummVM is the legal property of its developers, whose names
|
|
|
|
# are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
# file distributed with this source distribution.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
|
|
|
|
2011-06-05 15:05:12 +04:00
|
|
|
from tasm.parser import parser
|
|
|
|
from tasm.cpp import cpp
|
|
|
|
|
|
|
|
p = parser()
|
|
|
|
p.strip_path = 3
|
|
|
|
context = p.parse('dreamweb/dreamweb.asm')
|
|
|
|
p.link()
|
2011-06-16 16:31:17 +04:00
|
|
|
generator = cpp(context, "DreamGen", blacklist = [
|
2011-06-26 12:06:16 +02:00
|
|
|
# These functions are not processed
|
2011-06-11 16:08:30 +04:00
|
|
|
'randomnumber',
|
2011-11-20 21:13:46 +01:00
|
|
|
'screenupdate',
|
2011-11-20 19:53:58 +01:00
|
|
|
'startup',
|
|
|
|
'startup1',
|
2011-11-21 16:49:45 +01:00
|
|
|
'saveload',
|
2011-11-20 19:58:05 +01:00
|
|
|
'switchryanon',
|
|
|
|
'switchryanoff',
|
2011-06-11 16:08:30 +04:00
|
|
|
'quickquit',
|
|
|
|
'quickquit2',
|
|
|
|
'seecommandtail',
|
|
|
|
'multiget',
|
|
|
|
'multiput',
|
|
|
|
'multidump',
|
2011-06-26 19:32:02 +02:00
|
|
|
'frameoutnm',
|
|
|
|
'frameoutbh',
|
|
|
|
'frameoutfx',
|
2011-07-30 23:11:48 +02:00
|
|
|
'cls',
|
|
|
|
'clearwork',
|
2011-06-11 16:08:30 +04:00
|
|
|
'printundermon',
|
2011-07-17 14:38:30 +02:00
|
|
|
'kernchars',
|
|
|
|
'getnextword',
|
2011-07-17 16:06:19 +02:00
|
|
|
'getnumber',
|
2011-07-21 22:46:16 +02:00
|
|
|
'dumptextline',
|
2011-07-20 20:58:03 +02:00
|
|
|
'printboth',
|
2011-07-18 22:27:06 +02:00
|
|
|
'printchar',
|
2011-07-18 14:30:07 +02:00
|
|
|
'printdirect',
|
2011-07-19 12:37:32 +02:00
|
|
|
'printslow',
|
2011-08-29 11:55:21 +02:00
|
|
|
'printmessage',
|
2011-07-23 19:18:10 +02:00
|
|
|
'usetimedtext',
|
2011-08-11 15:24:06 +02:00
|
|
|
'dumptimedtext',
|
2011-08-11 16:59:20 +02:00
|
|
|
'setuptimedtemp',
|
2011-07-23 19:18:10 +02:00
|
|
|
'putundertimed',
|
|
|
|
'getundertimed',
|
2011-06-11 16:08:30 +04:00
|
|
|
'worktoscreen',
|
2011-06-20 20:00:09 +02:00
|
|
|
'width160',
|
2011-06-20 20:09:26 +02:00
|
|
|
'convertkey',
|
|
|
|
'readabyte',
|
2011-06-22 23:11:44 +02:00
|
|
|
'readoneblock',
|
2011-06-26 15:17:19 +02:00
|
|
|
'printsprites',
|
|
|
|
'printasprite',
|
|
|
|
'eraseoldobs',
|
2011-11-17 15:08:34 +01:00
|
|
|
'oldtonames',
|
|
|
|
'namestoold',
|
2011-11-17 15:33:25 +01:00
|
|
|
'loadpalfromiff',
|
2011-06-26 15:17:19 +02:00
|
|
|
'clearsprites',
|
|
|
|
'makesprite',
|
2011-06-26 17:03:17 +02:00
|
|
|
'showframe',
|
2011-06-28 15:48:07 +02:00
|
|
|
'initman',
|
2011-07-30 15:12:50 +02:00
|
|
|
'aboutturn',
|
2011-07-30 21:56:33 +02:00
|
|
|
'readheader',
|
2011-07-30 22:56:29 +02:00
|
|
|
'fillspace',
|
2011-07-30 19:54:53 +02:00
|
|
|
'getroomdata',
|
2011-07-30 21:46:59 +02:00
|
|
|
'startloading',
|
2011-07-30 15:25:28 +02:00
|
|
|
'showreelframe',
|
2011-08-11 22:58:06 +02:00
|
|
|
'showgamereel',
|
2011-08-11 23:10:30 +02:00
|
|
|
'getreelframeax',
|
2011-07-30 15:19:22 +02:00
|
|
|
'findsource',
|
2011-06-28 14:54:26 +02:00
|
|
|
'walking',
|
2011-08-08 22:26:31 +02:00
|
|
|
'autosetwalk',
|
2011-08-09 22:04:06 +02:00
|
|
|
'checkdest',
|
2011-06-26 15:17:19 +02:00
|
|
|
'spriteupdate',
|
2011-06-28 04:55:10 +02:00
|
|
|
'dodoor',
|
2011-07-25 10:50:00 +02:00
|
|
|
'lockeddoorway',
|
2011-06-28 05:10:35 +02:00
|
|
|
'liftsprite',
|
2011-06-25 17:28:51 +04:00
|
|
|
'frameoutv',
|
2011-07-16 11:04:49 +02:00
|
|
|
'modifychar',
|
2011-08-03 12:21:46 +02:00
|
|
|
'allocatework',
|
2011-07-20 13:15:30 +02:00
|
|
|
'lockmon',
|
|
|
|
'cancelch0',
|
2011-07-26 07:54:25 +02:00
|
|
|
'cancelch1',
|
|
|
|
'getroomspaths',
|
2011-07-27 17:53:50 +02:00
|
|
|
'makebackob',
|
2011-07-30 23:21:43 +02:00
|
|
|
'dealwithspecial',
|
2011-07-30 23:37:18 +02:00
|
|
|
'plotreel',
|
2011-07-26 07:54:25 +02:00
|
|
|
'facerightway',
|
2011-08-03 12:24:06 +02:00
|
|
|
'zoom',
|
2011-08-03 13:54:03 +02:00
|
|
|
'crosshair',
|
2011-08-03 14:16:09 +02:00
|
|
|
'showrain',
|
2011-08-03 16:14:39 +02:00
|
|
|
'domix',
|
|
|
|
'channel0tran',
|
|
|
|
'makenextblock',
|
|
|
|
'loopchannel0',
|
|
|
|
'parseblaster',
|
2011-08-03 16:19:27 +02:00
|
|
|
'deltextline',
|
2011-08-03 18:48:43 +02:00
|
|
|
'doblocks',
|
2011-08-11 23:13:17 +02:00
|
|
|
'checkifperson',
|
2011-08-22 14:46:06 +02:00
|
|
|
'checkiffree',
|
2011-08-30 03:11:32 +02:00
|
|
|
'checkifex',
|
2011-08-15 13:49:11 +02:00
|
|
|
'getreelstart',
|
2011-08-15 14:02:50 +02:00
|
|
|
'findobname',
|
2011-08-15 14:35:44 +02:00
|
|
|
'copyname',
|
2011-08-15 15:42:09 +02:00
|
|
|
'commandwithob',
|
2011-08-15 17:00:20 +02:00
|
|
|
'showpanel',
|
2011-08-15 17:11:11 +02:00
|
|
|
'updatepeople',
|
2011-08-16 01:25:59 +02:00
|
|
|
'madmantext',
|
2011-08-16 04:01:40 +02:00
|
|
|
'madmode',
|
2011-08-17 01:16:05 +02:00
|
|
|
'movemap',
|
2011-08-17 06:51:29 +02:00
|
|
|
'doorway',
|
|
|
|
'widedoor',
|
2011-08-17 07:08:38 +02:00
|
|
|
'showallobs',
|
2011-08-18 10:36:57 +02:00
|
|
|
'addalong',
|
|
|
|
'addlength',
|
|
|
|
'getdimension',
|
2011-08-17 07:08:38 +02:00
|
|
|
'getxad',
|
|
|
|
'getyad',
|
|
|
|
'getmapad',
|
2011-08-18 18:36:15 +02:00
|
|
|
'calcmapad',
|
2011-08-17 07:08:38 +02:00
|
|
|
'calcfrframe',
|
|
|
|
'finalframe',
|
2011-08-18 00:35:10 +02:00
|
|
|
'commandonly',
|
2011-08-18 21:49:15 +02:00
|
|
|
'makename',
|
2011-08-18 22:03:54 +02:00
|
|
|
'findlen',
|
2011-08-18 22:09:28 +02:00
|
|
|
'blocknametext',
|
|
|
|
'walktotext',
|
|
|
|
'personnametext',
|
2011-08-18 22:22:39 +02:00
|
|
|
'findxyfrompath',
|
2011-08-19 10:35:29 +02:00
|
|
|
'findormake',
|
2011-08-19 11:42:13 +02:00
|
|
|
'setallchanges',
|
2011-08-20 12:26:10 +02:00
|
|
|
'dochange',
|
2011-08-20 12:33:21 +02:00
|
|
|
'deletetaken',
|
2011-08-20 13:23:47 +02:00
|
|
|
'placesetobject',
|
|
|
|
'removesetobject',
|
2011-08-21 15:24:05 +02:00
|
|
|
'showallfree',
|
2011-08-29 16:31:00 +02:00
|
|
|
'showallex',
|
2011-08-22 12:44:07 +02:00
|
|
|
'adjustlen',
|
2011-08-22 15:53:54 +02:00
|
|
|
'finishedwalking',
|
2011-08-22 17:30:53 +02:00
|
|
|
'checkone',
|
2011-09-03 00:00:44 +02:00
|
|
|
'getblockofpixel',
|
2011-08-23 10:13:10 +02:00
|
|
|
'getflagunderp',
|
2011-08-23 10:40:52 +02:00
|
|
|
'walkandexamine',
|
2011-08-23 11:09:54 +02:00
|
|
|
'obname',
|
2011-08-24 12:15:17 +02:00
|
|
|
'delpointer',
|
2011-08-24 13:20:18 +02:00
|
|
|
'showblink',
|
2011-08-24 13:22:11 +02:00
|
|
|
'dumpblink',
|
2011-08-24 17:23:43 +02:00
|
|
|
'dumppointer',
|
2011-08-24 23:01:53 +02:00
|
|
|
'showpointer',
|
2011-08-25 07:02:57 +02:00
|
|
|
'animpointer',
|
2011-11-05 14:13:57 +01:00
|
|
|
'showicon',
|
2011-08-24 15:04:53 +02:00
|
|
|
'checkcoords',
|
2011-08-25 07:50:35 +02:00
|
|
|
'readmouse',
|
|
|
|
'readmouse1',
|
|
|
|
'readmouse2',
|
|
|
|
'readmouse3',
|
|
|
|
'readmouse4',
|
2011-08-25 08:03:27 +02:00
|
|
|
'waitframes',
|
2011-08-25 10:39:51 +02:00
|
|
|
'drawflags',
|
2011-11-23 12:58:03 +01:00
|
|
|
'blockget',
|
2011-08-29 12:38:22 +02:00
|
|
|
'addtopeoplelist',
|
2011-08-30 02:26:28 +02:00
|
|
|
'getexpos',
|
2011-08-30 02:45:53 +02:00
|
|
|
'paneltomap',
|
2011-08-30 12:22:09 +02:00
|
|
|
'maptopanel',
|
|
|
|
'dumpmap',
|
2011-08-30 02:53:49 +02:00
|
|
|
'obpicture',
|
2011-08-30 10:52:44 +02:00
|
|
|
'delthisone',
|
2011-08-30 10:56:49 +02:00
|
|
|
'transferinv',
|
2011-08-31 23:38:34 +02:00
|
|
|
'obicons',
|
2011-09-01 00:06:30 +02:00
|
|
|
'compare',
|
2011-09-01 19:00:13 +02:00
|
|
|
'pixelcheckset',
|
2011-09-03 11:02:03 +02:00
|
|
|
'turnpathon',
|
|
|
|
'turnpathoff',
|
2011-09-03 13:50:59 +02:00
|
|
|
'turnanypathon',
|
|
|
|
'turnanypathoff',
|
2011-09-02 03:55:52 +02:00
|
|
|
'isitdescribed',
|
|
|
|
'checkifset',
|
2011-09-02 06:38:08 +02:00
|
|
|
'checkifpathison',
|
2011-09-02 08:07:24 +02:00
|
|
|
'delsprite',
|
2011-09-02 08:12:33 +02:00
|
|
|
'dumpeverything',
|
2011-09-02 09:11:48 +02:00
|
|
|
'isitworn',
|
|
|
|
'makeworn',
|
2011-09-02 09:35:52 +02:00
|
|
|
'obtoinv',
|
2011-09-05 20:45:41 +02:00
|
|
|
'showryanpage',
|
2011-09-05 21:42:06 +02:00
|
|
|
'findallryan',
|
2011-09-06 08:54:01 +02:00
|
|
|
'fillryan',
|
2011-09-02 16:41:54 +02:00
|
|
|
'useroutine',
|
2011-09-06 22:10:02 +02:00
|
|
|
'hangon',
|
|
|
|
'hangonp',
|
2011-11-26 17:13:44 +01:00
|
|
|
'hangonw',
|
2011-09-07 03:41:05 +02:00
|
|
|
'findnextcolon',
|
2011-09-07 03:53:53 +02:00
|
|
|
'usetext',
|
2011-09-18 15:33:24 +02:00
|
|
|
'bresenhams',
|
2011-09-04 12:44:05 +02:00
|
|
|
'sortoutmap',
|
2011-09-04 13:20:02 +02:00
|
|
|
'showcity',
|
2011-09-04 07:44:14 +02:00
|
|
|
'examineobtext',
|
2011-10-09 18:09:24 +02:00
|
|
|
'wornerror',
|
2011-09-04 15:10:49 +02:00
|
|
|
'getpersframe',
|
|
|
|
'convicons',
|
2011-11-15 11:05:30 +01:00
|
|
|
'examineob',
|
|
|
|
'showwatch',
|
2011-11-20 19:04:33 +01:00
|
|
|
'dumpwatch',
|
2011-11-17 00:18:28 +01:00
|
|
|
'showtime',
|
2011-11-14 19:49:19 +01:00
|
|
|
'roomname',
|
2011-11-15 12:33:13 +01:00
|
|
|
'transfertext',
|
2011-11-15 14:12:44 +01:00
|
|
|
'splitintolines',
|
2011-11-16 12:43:19 +01:00
|
|
|
'initrain',
|
2011-11-16 12:54:26 +01:00
|
|
|
'checkbasemem',
|
2011-11-16 13:03:39 +01:00
|
|
|
'clearstartpal',
|
2011-11-16 17:56:06 +01:00
|
|
|
'clearendpal',
|
2011-11-16 13:26:15 +01:00
|
|
|
'paltostartpal',
|
|
|
|
'endpaltostart',
|
|
|
|
'startpaltoend',
|
|
|
|
'paltoendpal',
|
2011-11-16 17:30:38 +01:00
|
|
|
'fadecalculation',
|
2011-11-16 20:09:47 +01:00
|
|
|
'watchcount',
|
2011-11-16 21:00:46 +01:00
|
|
|
'zoomicon',
|
2011-11-16 21:23:51 +01:00
|
|
|
'loadroom',
|
2011-11-16 21:32:25 +01:00
|
|
|
'getundermenu',
|
|
|
|
'putundermenu',
|
2011-11-16 22:48:04 +01:00
|
|
|
'showoutermenu',
|
2011-11-16 18:48:03 +01:00
|
|
|
'textforend',
|
|
|
|
'textformonk',
|
2011-11-17 18:21:34 +01:00
|
|
|
'standardload',
|
2011-11-16 23:03:44 +01:00
|
|
|
'twodigitnum',
|
2011-11-17 17:44:19 +01:00
|
|
|
'readsetdata',
|
2011-11-18 00:01:24 +01:00
|
|
|
'loadintotemp',
|
|
|
|
'loadintotemp2',
|
|
|
|
'loadintotemp3',
|
2011-11-18 00:14:30 +01:00
|
|
|
'loadtempcharset',
|
2011-11-18 00:41:09 +01:00
|
|
|
'printcurs',
|
2011-11-18 06:17:23 +01:00
|
|
|
'delcurs',
|
2011-11-18 06:33:18 +01:00
|
|
|
'hangoncurs',
|
2011-11-18 06:43:32 +01:00
|
|
|
'fadeupyellows',
|
2011-11-18 07:01:36 +01:00
|
|
|
'fadeupmonfirst',
|
2011-11-16 22:52:34 +01:00
|
|
|
'loadroomssample',
|
2011-11-18 06:52:34 +01:00
|
|
|
'printlogo',
|
2011-11-18 07:04:45 +01:00
|
|
|
'usemon',
|
2011-11-18 12:06:16 +01:00
|
|
|
'scrollmonitor',
|
2011-11-18 17:38:19 +01:00
|
|
|
'showcurrentfile',
|
2011-11-18 07:48:07 +01:00
|
|
|
'input',
|
2011-11-18 18:17:16 +01:00
|
|
|
'monprint',
|
2011-11-20 14:53:10 +01:00
|
|
|
'monmessage',
|
2011-11-20 17:08:41 +01:00
|
|
|
'neterror',
|
2011-11-20 14:25:32 +01:00
|
|
|
'randomaccess',
|
2011-11-20 18:42:12 +01:00
|
|
|
'turnonpower',
|
2011-11-21 18:10:19 +01:00
|
|
|
'showmainops',
|
2011-11-26 18:31:54 +01:00
|
|
|
'showdiscops',
|
2011-11-20 18:33:04 +01:00
|
|
|
'powerlighton',
|
|
|
|
'powerlightoff',
|
2011-11-20 13:47:04 +01:00
|
|
|
'accesslighton',
|
|
|
|
'accesslightoff',
|
2011-11-22 11:56:54 +01:00
|
|
|
'playchannel0',
|
|
|
|
'playchannel1',
|
2011-11-21 21:32:50 +01:00
|
|
|
'createpanel',
|
|
|
|
'createpanel2',
|
2011-11-22 23:53:35 +01:00
|
|
|
'findroominloc',
|
2011-11-23 15:49:49 +01:00
|
|
|
'look',
|
2011-11-23 13:09:31 +01:00
|
|
|
'autolook',
|
2011-11-23 21:50:35 +01:00
|
|
|
'dolook',
|
2011-11-23 11:13:41 +01:00
|
|
|
'reelsonscreen',
|
2011-11-23 10:23:18 +01:00
|
|
|
'reconstruct',
|
2011-11-26 12:42:01 +01:00
|
|
|
'showbyte',
|
|
|
|
'onedigit',
|
|
|
|
'showword',
|
|
|
|
'convnum',
|
2011-11-26 16:37:11 +01:00
|
|
|
'usecharset1',
|
|
|
|
'usetempcharset',
|
2011-11-26 16:41:40 +01:00
|
|
|
'disablepath',
|
2011-11-26 16:56:11 +01:00
|
|
|
'getbackfromob',
|
2011-11-26 17:19:33 +01:00
|
|
|
'showfirstuse',
|
2011-11-26 17:29:43 +01:00
|
|
|
'showseconduse',
|
2011-11-26 17:23:40 +01:00
|
|
|
'actualload',
|
|
|
|
'actualsave',
|
2011-11-26 15:56:32 +01:00
|
|
|
'loadposition',
|
|
|
|
'saveposition',
|
2011-11-26 16:38:06 +01:00
|
|
|
'saveseg',
|
|
|
|
'openforsave',
|
|
|
|
'makeheader',
|
|
|
|
'savefilewrite',
|
2011-11-26 19:08:16 +01:00
|
|
|
'storeit',
|
2011-11-26 20:24:23 +01:00
|
|
|
'restoreall',
|
2011-11-26 20:45:23 +01:00
|
|
|
'restorereels',
|
2011-11-26 20:45:59 +01:00
|
|
|
'allocateload',
|
2011-11-28 11:28:59 +01:00
|
|
|
'viewfolder',
|
2011-11-29 18:05:03 +01:00
|
|
|
'loadfolder',
|
2011-11-28 12:10:48 +01:00
|
|
|
'showfolder',
|
2011-11-28 12:38:09 +01:00
|
|
|
'showleftpage',
|
2011-11-28 16:17:50 +01:00
|
|
|
'showrightpage',
|
2011-11-29 10:27:02 +01:00
|
|
|
'nextfolder',
|
2011-11-29 11:15:01 +01:00
|
|
|
'lastfolder',
|
2011-11-29 12:24:04 +01:00
|
|
|
'folderhints',
|
2011-11-29 15:18:17 +01:00
|
|
|
'folderexit',
|
2011-11-28 17:03:07 +01:00
|
|
|
'getlocation',
|
|
|
|
'setlocation',
|
2011-11-30 10:06:03 +01:00
|
|
|
'loadtemptext',
|
|
|
|
'loadtraveltext',
|
2011-11-30 10:53:59 +01:00
|
|
|
'steady',
|
|
|
|
'constant',
|
|
|
|
'random',
|
2011-11-30 14:30:40 +01:00
|
|
|
'drawfloor',
|
2011-11-30 15:19:41 +01:00
|
|
|
'allocatebuffers',
|
2011-11-30 23:31:13 +01:00
|
|
|
'startdmablock',
|
|
|
|
'dmaend',
|
|
|
|
'bothchannels',
|
|
|
|
'channel1only',
|
|
|
|
'channel0only',
|
|
|
|
'restoreems',
|
|
|
|
'saveems',
|
|
|
|
'out22c',
|
|
|
|
'pitinterupt',
|
|
|
|
'getridofpit'
|
|
|
|
'setuppit',
|
|
|
|
'removeemm',
|
|
|
|
'setupemm',
|
|
|
|
'trysoundalloc',
|
2011-06-26 12:06:16 +02:00
|
|
|
], skip_output = [
|
|
|
|
# These functions are processed but not output
|
2011-07-29 01:12:29 +02:00
|
|
|
'dreamweb',
|
|
|
|
'backobject',
|
|
|
|
'mainman',
|
2011-08-16 03:23:09 +02:00
|
|
|
'madman',
|
2011-06-26 12:09:56 +02:00
|
|
|
'loadgame',
|
|
|
|
'savegame',
|
2011-10-09 17:22:41 +02:00
|
|
|
'zoomonoff',
|
2011-11-14 20:25:18 +01:00
|
|
|
'inventory',
|
2011-11-14 20:18:06 +01:00
|
|
|
'mainscreen',
|
2011-11-15 17:31:19 +01:00
|
|
|
'doload',
|
2011-11-29 19:12:09 +00:00
|
|
|
], skip_dispatch_call = True, header_omit_blacklisted = True)
|
2011-06-05 15:05:12 +04:00
|
|
|
generator.generate('dreamweb') #start routine
|