350 lines
6.0 KiB
Plaintext
Raw Normal View History

2011-06-05 15:05:12 +04:00
#!/usr/bin/python
# 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
'randomnumber',
2011-11-20 21:13:46 +01:00
'screenupdate',
'startup',
'startup1',
2011-11-21 16:49:45 +01:00
'saveload',
'switchryanon',
'switchryanoff',
'quickquit',
'quickquit2',
'seecommandtail',
'multiget',
'multiput',
'multidump',
'frameoutnm',
'frameoutbh',
'frameoutfx',
2011-07-30 23:11:48 +02:00
'cls',
'clearwork',
'printundermon',
'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',
'usetimedtext',
'dumptimedtext',
'setuptimedtemp',
'putundertimed',
'getundertimed',
'worktoscreen',
'width160',
'convertkey',
'readabyte',
'readoneblock',
'printsprites',
'printasprite',
'eraseoldobs',
'oldtonames',
'namestoold',
'loadpalfromiff',
'clearsprites',
'makesprite',
2011-06-26 17:03:17 +02:00
'showframe',
2011-06-28 15:48:07 +02:00
'initman',
'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',
'showreelframe',
2011-08-11 22:58:06 +02:00
'showgamereel',
'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',
'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',
'frameoutv',
'modifychar',
2011-08-03 12:21:46 +02:00
'allocatework',
'lockmon',
'cancelch0',
'cancelch1',
'getroomspaths',
2011-07-27 17:53:50 +02:00
'makebackob',
'dealwithspecial',
2011-07-30 23:37:18 +02:00
'plotreel',
'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',
'domix',
'channel0tran',
'makenextblock',
'loopchannel0',
'parseblaster',
2011-08-03 16:19:27 +02:00
'deltextline',
2011-08-03 18:48:43 +02:00
'doblocks',
'checkifperson',
2011-08-22 14:46:06 +02:00
'checkiffree',
2011-08-30 03:11:32 +02:00
'checkifex',
'getreelstart',
2011-08-15 14:02:50 +02:00
'findobname',
2011-08-15 14:35:44 +02:00
'copyname',
'commandwithob',
2011-08-15 17:00:20 +02:00
'showpanel',
2011-08-15 17:11:11 +02:00
'updatepeople',
'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',
'showallobs',
2011-08-18 10:36:57 +02:00
'addalong',
'addlength',
'getdimension',
'getxad',
'getyad',
'getmapad',
2011-08-18 18:36:15 +02:00
'calcmapad',
'calcfrframe',
'finalframe',
2011-08-18 00:35:10 +02:00
'commandonly',
'makename',
2011-08-18 22:03:54 +02:00
'findlen',
'blocknametext',
'walktotext',
'personnametext',
'findxyfrompath',
2011-08-19 10:35:29 +02:00
'findormake',
'setallchanges',
2011-08-20 12:26:10 +02:00
'dochange',
2011-08-20 12:33:21 +02:00
'deletetaken',
'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',
'finishedwalking',
2011-08-22 17:30:53 +02:00
'checkone',
'getblockofpixel',
'getflagunderp',
'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',
'checkcoords',
'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',
'addtopeoplelist',
2011-08-30 02:26:28 +02:00
'getexpos',
2011-08-30 02:45:53 +02:00
'paneltomap',
'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',
'pixelcheckset',
'turnpathon',
'turnpathoff',
'turnanypathon',
'turnanypathoff',
2011-09-02 03:55:52 +02:00
'isitdescribed',
'checkifset',
'checkifpathison',
2011-09-02 08:07:24 +02:00
'delsprite',
2011-09-02 08:12:33 +02:00
'dumpeverything',
'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',
'hangon',
'hangonp',
2011-11-26 17:13:44 +01:00
'hangonw',
'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',
'examineobtext',
2011-10-09 18:09:24 +02:00
'wornerror',
'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',
'splitintolines',
'initrain',
'checkbasemem',
'clearstartpal',
2011-11-16 17:56:06 +01:00
'clearendpal',
2011-11-16 13:26:15 +01:00
'paltostartpal',
'endpaltostart',
'startpaltoend',
'paltoendpal',
'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',
'getundermenu',
'putundermenu',
'showoutermenu',
'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',
'loadintotemp',
'loadintotemp2',
'loadintotemp3',
'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',
'fadeupyellows',
'fadeupmonfirst',
'loadroomssample',
2011-11-18 06:52:34 +01:00
'printlogo',
2011-11-18 07:04:45 +01:00
'usemon',
'scrollmonitor',
'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',
'powerlighton',
'powerlightoff',
'accesslighton',
'accesslightoff',
'playchannel0',
'playchannel1',
'createpanel',
'createpanel2',
'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',
'reelsonscreen',
2011-11-23 10:23:18 +01:00
'reconstruct',
'showbyte',
'onedigit',
'showword',
'convnum',
'usecharset1',
'usetempcharset',
2011-11-26 16:41:40 +01:00
'disablepath',
'getbackfromob',
2011-11-26 17:19:33 +01:00
'showfirstuse',
'showseconduse',
'actualload',
'actualsave',
'loadposition',
'saveposition',
'saveseg',
'openforsave',
'makeheader',
'savefilewrite',
'storeit',
'restoreall',
'restorereels',
'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',
'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',
'getlocation',
'setlocation',
'loadtemptext',
'loadtraveltext',
2011-11-30 10:53:59 +01:00
'steady',
'constant',
'random',
2011-11-30 14:30:40 +01:00
'drawfloor',
'allocatebuffers',
'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
'dreamweb',
'backobject',
'mainman',
2011-08-16 03:23:09 +02:00
'madman',
'loadgame',
'savegame',
2011-10-09 17:22:41 +02:00
'zoomonoff',
'inventory',
'mainscreen',
2011-11-15 17:31:19 +01:00
'doload',
], skip_dispatch_call = True, header_omit_blacklisted = True)
2011-06-05 15:05:12 +04:00
generator.generate('dreamweb') #start routine