ature.78b 99 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724
  1. rem ' Ature Adventure
  2. rem ' Copyright beoran@rubyforge.org 2009, 2010.
  3. rem ' May be distributed under the Zlib License. No warranty, use at your own risk.
  4. ; Modified for 7800Basic by Karl Garrison (kgarrison@pobox.com)
  5. ; Add some 7800Basic configuration options
  6. set zoneheight 16
  7. set basepath gfx
  8. set romsize 48k
  9. displaymode 160A
  10. rem 'Commonly used NTSC Colors
  11. const black=0
  12. const gray=6
  13. const white=14
  14. const yellow=30
  15. const brown=32
  16. const orange=32
  17. const blue=144
  18. const skyblue=174
  19. const green=192
  20. const darkgreen=191
  21. const riverblue=170
  22. rem ' XXX: there is a bug in the ompiler (or my patches to it)
  23. rem ' some of my consants like the one below are translated in stead
  24. rem ' like a dim statement: eg const turfy=218 -> dim turfy=218
  25. rem ' a workaround seem to be to reorder the constants a bit
  26. rem ' or to remove a few of them, but this only bugs out other constants :p
  27. rem ' so I replaced some constants by their values, and use the cpp
  28. rem ' preprocessor in stead.
  29. ; #define seablue 144
  30. const seablue = 144
  31. const red = 64
  32. const pink = 78
  33. const skin = 254
  34. const sand = 230
  35. const turfy = 218
  36. rem ' const ochre=16
  37. rem 'Playfield dimensions
  38. const field_left=17
  39. const field_left_enter=18
  40. const field_right=$88
  41. const field_right_enter=$87
  42. const field_top=10
  43. const field_top_enter=11
  44. const field_bottom=90
  45. const field_bottom_enter=89
  46. const field_hcenter=61
  47. const field_vcenter=44
  48. rem ' Note definitions and length const music_voice=12
  49. rem const note_c4=30
  50. rem const note_d4=27
  51. rem const note_e4=24
  52. rem const note_f4=23
  53. rem const note_g4=20
  54. rem const note_a4=18
  55. rem const note_b4=16
  56. rem const note_c5=15
  57. rem const note_none=0
  58. rem const note_full=60
  59. rem const note_half=30
  60. rem const note_quarter=15
  61. rem const note_fullrest=58
  62. rem const note_halfrest=28
  63. rem const note_quarterest=13
  64. rem const note_ndot=2
  65. rem ' An object will be positioned at 255 to hide it
  66. const nowhere=255
  67. rem 'Timer ticks per second, 60 for NTSC
  68. const ticks_per_second=60
  69. rem 'Score, split up in individual digits
  70. dim sc0=score
  71. dim sc1=score+1
  72. dim sc2=score+2
  73. rem 'Initial values
  74. rem 'Normal start
  75. const room_start=49
  76. rem '49
  77. rem 'On the east side of the river
  78. rem 'const room_start=4
  79. const hero_start_x=75
  80. const hero_start_y=75
  81. const item_start_x=60
  82. const item_start_y=40
  83. const item_start_hp=1
  84. const hero_base_hp=11
  85. const hero_high=8
  86. const hero_half_high=4
  87. const hero_feet_high=4
  88. const hero_wide=8
  89. const hero_half_wide=4
  90. rem 'Hero's position, speed and room
  91. dim hero_x=player0x
  92. dim hero_y=player0y
  93. dim hero_oldx=v
  94. dim hero_oldy=w
  95. rem 'Flags:
  96. dim hero_flags=g
  97. rem 'hero_flags{0} -> facing north
  98. rem 'hero_flags{1} -> facing east
  99. rem 'hero_flags{2} -> facing south
  100. rem 'hero_flags{3} -> facing west
  101. rem 'hero_flags{4} -> set when attacking is allowed, blocked when not
  102. dim hero_items=q
  103. rem 'hero_items{0} -> Key Leaf 1
  104. rem 'hero_items{1} -> Key Leaf 2
  105. rem 'hero_items{2} -> Key Leaf 3
  106. rem 'hero_items{3} -> Numen Shield
  107. rem 'hero_items{4} -> Numen Armor
  108. rem 'hero_items{5} -> Numen Sword
  109. rem 'hero_items{6} -> Heal Book
  110. rem 'hero_items{7} -> Strike Book
  111. dim hero_room=r
  112. ; dim hero_hp=statusbarlength
  113. dim hero_mp=o
  114. dim hero_next=k
  115. dim hero_level=l
  116. rem 'Quest flags contain important achievments of Signe.
  117. dim quest_flags=h
  118. rem 'quest_flags{0} -> Defeated Ikaza
  119. rem 'quest_flags{1} -> Flipped Switch 1
  120. rem 'quest_flags{2} -> Flipped Switch 2
  121. rem 'quest_flags{3} -> Flipped Switch 3
  122. rem 'quest_flags{4} -> Flipped Switch 4
  123. rem 'quest_flags{5} -> Flipped Switch 5
  124. rem 'quest_flags{6} -> Flipped Switch 6
  125. rem 'quest_flags{7} -> Flipped Switch 7
  126. rem 'Other flags: Reserved for future extension
  127. rem 'quest_flags{1} -> Defeated Armor Boss
  128. rem 'quest_flags{2} -> Defeated Sword Boss
  129. rem 'quest_flags{3} -> Defeated
  130. rem 'quest_flags{0} -> Defeated Leaf Boss 1
  131. rem 'quest_flags{1} -> Defeated Leaf Boss 2
  132. rem 'quest_flags{2} -> Defeated Leaf Boss 3
  133. rem 'status bar color in Z, which si otherwise used for debugging
  134. rem ' Can't sue changes top platfield row color somehow. :p
  135. rem ' dim statusbarcolor=z
  136. const strike_cost=1
  137. const last_monster=32
  138. const hero_speed=1
  139. const hero_speed_negative=#-1
  140. rem item/monster position speed and kind
  141. dim item_x=player1x
  142. dim item_y=player1y
  143. dim item_kind=s
  144. dim item_hp=i
  145. dim item_oldx=t
  146. dim item_oldy=u
  147. rem 'Active item flags:
  148. dim item_flags=f
  149. rem 'item_flags{0} -> Monster missile flies north
  150. rem 'item_flags{1} -> Monster missile flies east
  151. rem 'item_flags{2} -> Monster missile flies south
  152. rem 'item_flags{3} -> Monster missile flies west
  153. rem 'Game timer. Controls animation. Keeps on ticking, by overflow.
  154. dim game_timer=e
  155. const timer_loop=128
  156. const timer_second=60
  157. rem 'Item and monster kinds.
  158. rem 'Monster kind is divided as follows: the 6 bits record the looks
  159. rem 'and the 'index' for data tables of the monster or item
  160. rem 'The high 2 bits are used for 2 flag variables:
  161. rem 'If item_kind{7} is set it's an immobile item, otherwise, a monster
  162. rem '6 is yet to be determined
  163. const item_kind_mask=%00111111
  164. const is_item_mask=%10000000
  165. const item_none=%10000000
  166. const monster_slime=1
  167. const monster_crab=2
  168. const monster_bat=3
  169. const monster_scorpio=4
  170. rem 'The famous rabid rabbit ^_^
  171. const monster_rabid=5
  172. const monster_spider=6
  173. const monster_snake=7
  174. const monster_fish=8
  175. const monster_lion=9
  176. const monster_wolf=10
  177. const monster_grunt=11
  178. const monster_archer=12
  179. const monster_knight=13
  180. const monster_cannon=14
  181. const monster_zombie=15
  182. const monster_skeleton=16
  183. const monster_ghost=17
  184. const monster_mage=18
  185. const monster_flower=19
  186. const monster_treant=20
  187. const monster_mushroom=21
  188. const monster_book=22
  189. const monster_sword=23
  190. rem 'Monster curse blocks the way in rooms. It's invulnerable,
  191. rem 'but can be removed by game events.
  192. const monster_curse=24
  193. const monster_first_boss=25
  194. const monster_leaf1_boss=25
  195. const monster_leaf2_boss=26
  196. const monster_leaf3_boss=27
  197. const monster_armor_boss=28
  198. rem 'Boss that guards the Numen Sword
  199. const monster_sword_boss=29
  200. rem 'Boss that guards the Strike book
  201. const monster_strike_boss=30
  202. const monster_ikaza=31
  203. const item_inventory_mask=160
  204. const item_leaf1=160
  205. const item_leaf2=161
  206. const item_leaf3=162
  207. const item_armor=163
  208. const item_shield=164
  209. const item_sword=165
  210. const item_bookheal=166
  211. const item_bookstrike=167
  212. const item_healhp=168
  213. const item_healmp=169
  214. const item_healallhp=170
  215. const item_healallmp=171
  216. const item_first_switch=172
  217. const item_switch_on=7
  218. const item_switch1=172
  219. const item_switch2=173
  220. const item_switch3=174
  221. const item_switch4=175
  222. const item_switch5=176
  223. const item_switch6=177
  224. const item_switch7=178
  225. const item_last_switch=178
  226. const item_first_switch_on=179
  227. const item_switch1_on=179
  228. const item_switch2_on=180
  229. const item_switch3_on=181
  230. const item_switch4_on=182
  231. const item_switch5_on=183
  232. const item_switch6_on=184
  233. const item_switch7_on=185
  234. const item_last_switch_on=182
  235. const item_victory=191
  236. const monster_normal=0
  237. rem 'Bit 0 in monster flags
  238. const monster_shoots=1
  239. rem 'Bit 1 in monster flags
  240. const monster_randomwalk=2
  241. rem 'Bit 2 in monster flags
  242. const monster_aggressive=4
  243. rem 'Bit 3 in monster flags
  244. const monster_static=8
  245. rem 'Bit 4 in monster flags
  246. const monster_alwaysdrop=16
  247. rem 'Bit 5 in monster flags
  248. const monster_nowalls=32
  249. rem 'Bit 6 in monster flags
  250. const monster_huge=64
  251. rem 'Bit 7 in monster flags. Will triple if huge is also set
  252. rem 'Currently, double nor triple doesn't work well with the AI
  253. const monster_double=128
  254. const monster_boss_info=monster_alwaysdrop + monster_shoots + monster_huge + monster_nowalls
  255. const monster_boss2_info=monster_alwaysdrop + monster_shoots + monster_huge + monster_nowalls
  256. const monster_boss3_info=monster_alwaysdrop + monster_shoots + monster_huge + monster_nowalls
  257. const monster_swordboss_info=monster_alwaysdrop + monster_aggressive + monster_nowalls
  258. const monster_cannon_info=monster_shoots + monster_static + monster_nowalls
  259. rem ' Music wave form to use.
  260. const music_instrument=12
  261. const music_notes=69
  262. rem 'Timer and pointer for music and sound
  263. dim music_pointer=m
  264. dim music_timer=n
  265. dim music_which=d
  266. dim sound_timer=p
  267. rem 'Unused variables: a b c
  268. rem 'Set back to 1 when not debugging.
  269. const hero_start_level=20
  270. rem 'set back to 0 when not debugging
  271. const hero_start_items=
  272. rem ' Colors to use for the item display
  273. data item_colors
  274. black, green, red, blue, black, green, red, blue,
  275. black, green, red, blue, black, green, red, blue,
  276. black, green, red, blue, black, green, red, blue,
  277. black, black, red, red, black, orange, red, blue,
  278. black, green, red, blue, black, green, red, blue,
  279. red , green, red, green, black, green, red, blue,
  280. white, yellow, orange, black, green, red, blue, white,
  281. yellow, orange, blue, black, green, red, blue, blue,
  282. end
  283. rem 'Damage modifier for the MONSTER/item. 0 means no damage
  284. rem 'There is no monster nr 0, that's for item_none.
  285. rem 'The curse deals massive damage to be sure it works.
  286. data item_damage
  287. 0, 1, 1, 1, 1, 2, 2, 2
  288. 2, 4, 4, 4, 4, 6, 6, 6
  289. 10, 16, 16, 1, 16, 4, 16, 16
  290. 128, 20, 22, 24, 48, 48, 48, 64
  291. 0, 0, 0, 0, 0, 0, 0, 0
  292. 0, 0, 0, 0, 0, 0, 0, 0
  293. 0, 0, 0, 0, 0, 0, 0, 0
  294. 0, 0, 0, 0, 0, 0, 0, 0
  295. end
  296. rem '
  297. rem ' Monster information, bitflags (monster 0 doesn't exist, but is in this list!)
  298. data monster_info
  299. monster_normal, monster_normal, monster_nowalls+monster_shoots, monster_nowalls
  300. monster_normal, monster_nowalls, monster_normal, monster_aggressive
  301. monster_shoots + monster_nowalls, monster_normal, monster_normal, monster_normal
  302. monster_shoots, monster_aggressive, monster_cannon_info, monster_randomwalk
  303. monster_normal, monster_nowalls, monster_nowalls + monster_shoots, monster_cannon_info
  304. monster_normal, monster_normal, monster_cannon_info, monster_static + monster_nowalls
  305. monster_static + monster_huge + monster_nowalls, monster_boss_info, monster_boss_info, monster_boss3_info
  306. monster_boss_info, monster_swordboss_info, monster_boss_info, monster_aggressive + monster_shoots
  307. end
  308. rem ' Items the monster drops, or for items, what item flag to set
  309. data monster_drops
  310. item_healhp, item_healhp, item_healhp, item_healmp,
  311. item_healhp, item_healhp, item_healhp, item_healhp,
  312. item_healhp, item_healhp, item_healhp, item_healhp,
  313. item_healhp, item_healallhp, item_healhp, monster_skeleton,
  314. monster_ghost, item_switch5, monster_book, item_healmp,
  315. item_healallmp, item_healhp, item_bookheal, item_sword,
  316. item_healhp, item_leaf1, item_leaf2 , item_leaf3,
  317. item_armor, monster_sword, item_bookstrike, item_healallhp,
  318. end
  319. rem VOLUME DOWN AND SET CHANNELS
  320. AUDV0=0
  321. AUDV1=0
  322. AUDC0=music_instrument
  323. rem INITIALIZE POINTERS AND TIMERS
  324. rem 'lives control
  325. ; lifecolor=black
  326. rem 'Lives are used for the MP
  327. ; lives=32
  328. ; lives:
  329. ; %00010000
  330. ; %00010000
  331. ; %01010100
  332. ; %10111010
  333. ; %01010100
  334. ; %00010000
  335. ; %00010000
  336. ; %00010000
  337. ;end
  338. rem 'Go to intro screen, but not now while we are debugging.
  339. gosub intro_screen
  340. goto main_loop_start
  341. main_loop_start
  342. rem ' Set up initial values.
  343. gosub music_restart
  344. COLUBK = black
  345. lifecolor=yellow
  346. hero_room=room_start
  347. hero_x=hero_start_x
  348. hero_oldx=hero_start_x
  349. hero_y=hero_start_y
  350. hero_oldy=hero_start_x
  351. quest_flags=0
  352. hero_level=hero_start_level
  353. hero_next=(hero_level / 2) + 1
  354. hero_hp=hero_level*2+hero_base_hp
  355. rem 'MP is between 1 and 6
  356. hero_mp=hero_level/16 + 1
  357. gosub set_mp_display
  358. hero_flags = 0
  359. item_flags = 0
  360. game_timer = 0
  361. item_kind=item_none
  362. hero_items = hero_start_items
  363. rem 'Player starts facing south, able to attack
  364. hero_flags{2} = 1
  365. hero_flags{4} = 1
  366. rem player0x=75
  367. rem player0y=75
  368. item_x=item_start_x
  369. item_oldx=item_start_x
  370. item_y=item_start_y
  371. item_oldy=item_start_x
  372. missile1x=nowhere
  373. missile1y=nowhere
  374. scorecolor=64
  375. item_hp=item_start_hp
  376. gosub show_inventory
  377. gosub hero_draw_s
  378. gosub room_draw
  379. drawscreen
  380. main_loop
  381. COLUP0 = skin
  382. temp1 = item_kind & item_kind_mask
  383. COLUP1 = item_colors[temp1]
  384. rem 'Special effects for the item (double or triple size, double or triple instances)
  385. if item_kind{7} goto special_effects_end
  386. temp2 = monster_info[item_kind]
  387. if temp2{6} then NUSIZ1 = $07
  388. if temp2{7} then NUSIZ1 = $02
  389. if temp2{7} && temp2{7} then NUSIZ1 =$06
  390. special_effects_end
  391. PF0=$00
  392. rem 'Collisions with the walls. For now, we use push-back collision
  393. rem 'for the monsters, and preventive collision detection for the player.
  394. rem 'This is inconsistent, but push-back is easier to manage with regards to
  395. rem 'and matters less for AI, so I'll leave it at that for now.
  396. if !collision(player0, playfield) then goto herofield_collide_end
  397. rem 'Could do something here ??? Some overlap is OK, IMO
  398. herofield_collide_end
  399. rem 'Collisions with the walls
  400. rem 'For the item
  401. if !collision(player1, playfield) then goto itemfield_collide_end
  402. temp2 = monster_info[item_kind]
  403. rem 'Some monsters ignore walls
  404. if temp2{5} then goto itemfield_collide_end
  405. if item_y = item_oldy && item_x = item_oldx then goto itemfield_collide_still
  406. item_y = item_oldy
  407. item_x = item_oldx
  408. goto itemfield_collide_end
  409. itemfield_collide_still
  410. rem if item_y < field_vcenter then item_y = item_oldy - 1 else item_y = item_oldy + 1
  411. rem if item_x < field_hcenter then item_x = item_oldx - 1 else item_x = hero_oldx + 1
  412. itemfield_collide_end
  413. rem 'Remember curent position which should be OK here,
  414. rem 'and with that I mean not colliding with the walls.
  415. hero_oldx = hero_x
  416. hero_oldy = hero_y
  417. item_oldx = item_x
  418. item_oldy = item_y
  419. rem 'Teleport to Sygne's home on reset button
  420. if !switchreset then goto reset_end
  421. hero_room=room_start
  422. hero_x=hero_start_x
  423. hero_oldx=hero_start_x
  424. hero_y=hero_start_y
  425. hero_oldy=hero_start_x
  426. gosub room_draw
  427. reset_end
  428. rem 'Update game timer, and let it overflow back to 0 .
  429. game_timer = game_timer + 1
  430. rem 'Update sound timer, and set to silence if sound is done
  431. if sound_timer < 1 then goto sound_end
  432. sound_timer = sound_timer - 1
  433. if sound_timer > 1 then goto sound_end
  434. AUDV1 = 0
  435. AUDC1 = 0
  436. AUDF1 = 0
  437. sound_timer = 0
  438. sound_end
  439. rem 'Collision between hero and monster/item or the monster's missile
  440. if !collision(player0, missile1) then goto no_missile_collide
  441. rem 'Ennemy missile hit player, remove it
  442. missile1y = nowhere
  443. missile1x = nowhere
  444. item_flags= 0
  445. rem ' If the player doesn't have a shield, jump to monster collide
  446. rem 'Otherwise ignore the projectile and remove it
  447. if !hero_items{3} then goto monster_collide
  448. no_missile_collide
  449. if !collision(player0, player1) then goto item_collide_end
  450. rem 'Distinguish between item or monster collide
  451. if item_kind{7} then goto item_collide
  452. rem 'Collision with monster or monster missile
  453. monster_collide
  454. COLUP0 = red
  455. rem 'Make a hit sound
  456. sound_timer=2
  457. AUDC1=6
  458. AUDF1=10
  459. AUDV1=14
  460. rem 'Push back the hero, but only if the playfield is free behind her.
  461. rem 'Also don't push back if too close to the edge of the screen.
  462. if !hero_flags{0} then goto hero_hit_north_end
  463. temp1 = (hero_x + hero_half_wide - 17) / 4
  464. temp2 = (hero_y + 8 - 1) / 8
  465. if pfread(temp1, temp2) goto hero_hit_north_end
  466. hero_y = hero_y + 8
  467. rem 'Still inside the screen?
  468. if hero_y < field_bottom then goto hero_hit_north_end
  469. rem 'if we get here, we'd be pushed out of the screen. Prevent this.
  470. hero_y = field_bottom_enter
  471. hero_hit_north_end
  472. if !hero_flags{1} then goto hero_hit_east_end
  473. temp1 = (hero_x - 8 - 17) / 4
  474. temp2 = (hero_y - hero_half_high - 1) / 8
  475. if pfread(temp1, temp2) goto hero_hit_east_end
  476. hero_x = hero_x - 8
  477. rem 'Still inside the screen?
  478. if field_left < hero_x then goto hero_hit_east_end
  479. rem 'if we get here, we'd be pushed out of the screen. Prevent this.
  480. hero_x = field_left_enter
  481. hero_hit_east_end
  482. if !hero_flags{2} then goto hero_hit_south_end
  483. if pfread(temp1, temp2) then goto hero_hit_south_end
  484. temp1 = (hero_x + hero_half_wide - 17) / 4
  485. temp2 = (hero_y - hero_high - 8 - 1) / 8
  486. hero_y = hero_y - 8
  487. if hero_y > field_top then goto hero_hit_south_end
  488. rem 'if we get here, we'd be pushed out of the screen. Prevent this.
  489. hero_y = field_top_enter
  490. hero_hit_south_end
  491. if !hero_flags{3} then goto hero_hit_west_end
  492. temp1 = (hero_x + hero_wide + 8 - 17) / 4
  493. temp2 = (hero_y - hero_half_high - 1) / 8
  494. if pfread(temp1, temp2) then goto hero_hit_west_end
  495. hero_x = hero_x + 8
  496. rem 'Still inside the screen?
  497. if hero_x < field_right then goto hero_hit_west_end
  498. rem 'if we get here, we'd be pushed out of the screen. Prevent this.
  499. hero_x = field_right_enter
  500. hero_hit_west_end
  501. temp1 = item_kind & item_kind_mask
  502. temp1 = item_damage[temp1]
  503. rem 'Halve damage if hero has the armor
  504. if hero_items{4} then temp1 = temp1 / 2
  505. rem 'Game over if damage is higher than health
  506. if temp1 < hero_hp then goto do_damage
  507. rem 'But escape by the skin of the teeth if Signe has the healing book and
  508. rem 'Numen to use it.
  509. if hero_items{6} && hero_mp > 0 then goto use_heal_spell
  510. hero_hp = 0
  511. goto game_over
  512. use_heal_spell
  513. COLUP0 = green
  514. hero_mp = hero_mp - 1
  515. gosub set_mp_display
  516. hero_hp = hero_level * 2 + hero_base_hp
  517. goto item_collide_end
  518. do_damage
  519. hero_hp = hero_hp - temp1
  520. goto item_collide_end
  521. item_collide
  522. rem 'If colliding with an item, pick it up if it is not a switch.
  523. if item_kind < item_switch1 then goto item_do_collide
  524. if item_kind > item_switch7_on then goto item_do_collide
  525. goto item_collide_end
  526. item_do_collide
  527. gosub item_pickup
  528. gosub show_inventory
  529. item_collide_end
  530. rem 'Collision between monster missile and field.
  531. rem 'Or between sword and monster missile. Remove missile.
  532. rem 'Remove misile if monster is gone.
  533. if item_kind > last_monster then goto missile_remove
  534. if collision(missile0, missile1) then goto missile_remove
  535. if missile1x > field_right then goto missile_remove
  536. if missile1x < field_left then goto missile_remove
  537. if missile1y < field_top then goto missile_remove
  538. if missile1y > field_bottom then goto missile_remove
  539. if !collision(missile1, playfield) then goto missile_remove_end
  540. rem 'Don't remove the misile even when coliding with the playfield if the
  541. rem 'monster ignores the walls.
  542. temp2 = monster_info[item_kind]
  543. rem 'temp2 = temp2 & monster_nowalls
  544. if temp2{5} then goto missile_remove_end
  545. missile_remove
  546. missile1y = nowhere
  547. missile1x = nowhere
  548. item_flags= 0
  549. missile_remove_end
  550. rem 'Collision between monster and hero's attack
  551. if !collision(player1, missile0) then goto slash_collide_end
  552. rem 'Distinguish between item or monster collide
  553. if item_kind{7} then goto slash_item_collide
  554. rem 'The curse monster cannot be harmed normally.
  555. rem 'It can be harmed if Signe has the three leaves, or the Numen Sword.
  556. rem 'Do the special handling here.
  557. if item_kind <> monster_curse then goto monster_no_curse
  558. rem 'Signe has the sword? The curse can be damaged.
  559. if hero_items{5} then goto monster_no_curse
  560. rem 'Signe has the three leaves? The curse can be damaged.
  561. if hero_items{0} && hero_items{1} && hero_items{2} then goto monster_no_curse
  562. rem 'If we get here, Signe's unable to do any damage.
  563. rem 'Make a deflected sound
  564. sound_timer=2
  565. AUDC1=12
  566. AUDV1=14
  567. AUDF1=1
  568. goto slash_collide_end
  569. monster_no_curse
  570. rem 'Make a hit sound once
  571. sound_timer=1
  572. AUDC1=8
  573. AUDF1=2
  574. AUDV1=8
  575. hero_flags{4} = 0
  576. rem COLUP1 = red
  577. rem 'Push back monster
  578. if hero_flags{0} then item_y = item_y - 4
  579. if hero_flags{1} then item_x = item_x + 4
  580. if hero_flags{2} then item_y = item_y + 4
  581. if hero_flags{3} then item_x = item_x - 4
  582. rem 'Damage is level / 2 + 1
  583. temp1 = (hero_level / 2)
  584. temp1 = temp1 + 1
  585. rem 'Double damage with the Numen Sword
  586. if hero_items{5} then temp1 = temp1 * 2
  587. rem 'Prevent damage overflow
  588. if temp1 < 0 then temp1 = 0 - temp1
  589. if temp1 < item_hp then goto item_survived
  590. rem 'Item / monster killed or destroyed
  591. if item_kind = monster_ikaza then quest_flags{0} = 1
  592. rem 'Make sure Ikaza cannot come back
  593. rem 'Give experience and level up if needed
  594. rem 'Experience received is danger level of the monster
  595. temp2 = item_damage[item_kind]
  596. rem 'No experience for killing the curse, as it's a sitting duck.
  597. if item_kind = monster_curse then goto give_experience_end
  598. if temp2 < hero_next then goto give_experience
  599. rem 'Level up, but not more than 99
  600. if hero_level > 98 then goto give_experience_end
  601. rem 'Level up sound
  602. COLUP0=blue
  603. AUDV1=8
  604. AUDF1=24
  605. AUDC1=12
  606. sound_timer=8
  607. hero_level = hero_level + 1
  608. hero_hp = hero_level * 2 + hero_base_hp
  609. rem 'Actually, this is buggy for levels above 80
  610. hero_mp = hero_level/16 + 1
  611. gosub set_mp_display
  612. hero_next = (hero_level / 2) + 1
  613. COLUP0 = turfy
  614. goto give_experience_end
  615. give_experience
  616. hero_next = hero_next - temp2
  617. give_experience_end
  618. rem 'Drop an item, perhaps
  619. temp6 = monster_info[item_kind]
  620. rem 'Bit 4: monster always drops item
  621. if temp6{4} then goto drop_item
  622. if rand > 128 then goto drop_item
  623. rem 'Drop occasional, not always, depeding on monster flags
  624. drop_no_item
  625. item_kind = item_none
  626. item_hp = 0
  627. item_x = nowhere
  628. item_y = nowhere
  629. goto drop_item_done
  630. drop_item
  631. temp2 = monster_drops[item_kind]
  632. item_kind = temp2
  633. gosub item_setup_kind
  634. drop_item_done
  635. goto slash_collide_end
  636. item_survived
  637. item_hp = item_hp - temp1
  638. rem 'Push item around
  639. if hero_flags{0} then item_y = item_y - 4
  640. if hero_flags{1} then item_x = item_x + 4
  641. if hero_flags{2} then item_y = item_y + 4
  642. if hero_flags{3} then item_x = item_x - 4
  643. goto slash_collide_end
  644. slash_item_collide
  645. rem 'Make a hit sound once
  646. sound_timer=1
  647. AUDC1=8
  648. AUDF1=2
  649. AUDV1=8
  650. if item_kind < item_switch1 then goto slash_item_pickup
  651. if item_kind > item_switch7_on then goto slash_item_pickup
  652. rem 'If colliding with an item that's not a switch, pick it up.
  653. rem 'Otherwise it's a switch that's hit.
  654. goto hit_switch
  655. slash_item_pickup
  656. gosub item_pickup
  657. gosub show_inventory
  658. goto slash_collide_end
  659. hit_switch
  660. rem 'Do nothing with the already triggered switches.
  661. rem '(Turn them off again, perhaps?)
  662. if item_kind > item_switch7 then goto slash_collide_end
  663. rem 'Handle hitting of the switch: set the quest flag and change the display.
  664. if item_kind = item_switch1 then quest_flags{1} = 1
  665. if item_kind = item_switch2 then quest_flags{2} = 1
  666. if item_kind = item_switch3 then quest_flags{3} = 1
  667. if item_kind = item_switch4 then quest_flags{4} = 1
  668. if item_kind = item_switch5 then quest_flags{5} = 1
  669. if item_kind = item_switch6 then quest_flags{6} = 1
  670. if item_kind = item_switch7 then quest_flags{7} = 1
  671. gosub item_setup_kind
  672. slash_collide_end
  673. rem 'Player action though button
  674. if !joy0fire then goto hero_action_done
  675. rem 'Skip all this if action is blocked.
  676. if !hero_flags{4} then goto hero_action_blocked
  677. if !hero_items{7} then goto hero_act_nostrike
  678. if hero_mp < strike_cost then goto hero_act_nostrike
  679. rem ' The b switch controls whether the book of striking is in use or not.
  680. if switchleftb then goto hero_act_nostrike
  681. if item_kind < last_monster then goto hero_act_strike
  682. if item_kind >= item_switch1 && item_kind <= item_switch7 then goto hero_act_strike
  683. hero_act_nostrike
  684. temp1 = hero_flags & %00001111
  685. rem 'Use this to jump to the right attack action.
  686. rem ' 0 1=north 2=east 3=ne 4=south 5=n+s(emu onlu) 6=se 7=nse
  687. rem ' 8 = west
  688. rem ' 9 10 11 12 13 14 15(all sides, emu only)
  689. on temp1 goto had hero_act_n hero_act_e hero_act_n hero_act_s hero_act_s hero_act_n hero_act_n hero_act_w hero_act_n hero_act_w hero_act_s had had had
  690. hero_act_n
  691. missile0x=hero_x + 4
  692. missile0y=hero_y - 14
  693. missile0height=8
  694. NUSIZ0=$00
  695. goto hero_action_end
  696. hero_act_e
  697. missile0x=hero_x + 9
  698. missile0y=hero_y - 4
  699. missile0height=0
  700. NUSIZ0=$30
  701. goto hero_action_end
  702. hero_act_s
  703. missile0x=hero_x + 4
  704. missile0y=hero_y + 8
  705. missile0height=8
  706. NUSIZ0=$00
  707. goto hero_action_end
  708. hero_act_w
  709. missile0x=hero_x - 7
  710. missile0y=hero_y - 4
  711. missile0height=0
  712. NUSIZ0=$30
  713. goto hero_action_end
  714. rem NUSIZ0=$00
  715. hero_act_strike
  716. hero_mp = hero_mp - strike_cost
  717. gosub set_mp_display
  718. rem 'Strike will hit the ennemy wherever it is. A guaranteed hit I'd say ^_^
  719. missile0x=item_x
  720. missile0y=item_y
  721. missile0height=8
  722. NUSIZ0=$30
  723. COLUP0=rand
  724. COLUP1=red
  725. goto hero_action_end
  726. had
  727. hero_action_done
  728. hero_flags{4} = 1
  729. rem 'Allow attacks again
  730. hero_action_blocked
  731. rem 'If the action is blocked or released, hide the missile
  732. missile0x = nowhere
  733. missile0y = nowhere
  734. hero_action_end
  735. rem 'Deterimine hero's motion and direction from the joystick
  736. rem 'In NESW order
  737. rem ' hero_flags = (hero_flags / 16) * 16 preserves the higher nibble (I hope)
  738. rem '
  739. rem 'For the player collision detection, we calculate the playfield position
  740. rem 'at any of the four points around the feet of the player, and check if
  741. rem 'if anything is there with pfread, and prevent motion if it is so.
  742. rem ' Note that we do allow Signe to turn her facing even when she cannot move.
  743. if !joy0up then goto joy0up_end
  744. hero_flags = (hero_flags / 16) * 16
  745. hero_flags{0} = 1
  746. rem 'Check top middle point
  747. temp1 = (hero_x + hero_half_wide - 17) / 4
  748. temp2 = (hero_y - hero_high - 1 - 1) / 8
  749. if pfread(temp1, temp2) goto joy0up_end
  750. hero_y = hero_y - 1
  751. joy0up_end
  752. if !joy0right then goto joy0right_end
  753. hero_flags = (hero_flags / 16) * 16
  754. hero_flags{1} = 1
  755. temp1 = (hero_x + hero_wide + 1 - 17) / 4
  756. temp2 = (hero_y - hero_half_high - 1) / 8
  757. rem 'Prevent motion if something is there
  758. if pfread(temp1, temp2) goto joy0right_end
  759. hero_x = hero_x + 1
  760. joy0right_end
  761. if !joy0down then goto joy0down_end
  762. hero_flags = (hero_flags / 16) * 16
  763. hero_flags{2} = 1
  764. temp1 = (hero_x + hero_half_wide - 17) / 4
  765. temp2 = (hero_y + 1 - 1) / 8
  766. rem 'Check bottom middle point. don't move if it's blocked by the playfield.
  767. if pfread(temp1, temp2) then goto joy0down_end
  768. hero_y = hero_y + 1
  769. joy0down_end
  770. if !joy0left then goto joy0left_end
  771. hero_flags = (hero_flags / 16) * 16
  772. hero_flags{3} = 1
  773. temp1 = (hero_x - 1 - 17) / 4
  774. temp2 = (hero_y - hero_half_high - 1) / 8
  775. rem 'Check point to the west of the feet
  776. if pfread(temp1, temp2) goto joy0left_end
  777. hero_x = hero_x - 1
  778. joy0left_end
  779. rem 'Monster "AI":
  780. rem 'Animate missile if it has been launched
  781. if missile1y = nowhere then goto missile_move_end
  782. if item_flags{3} then missile1x = missile1x - 2 : goto missile_move_end
  783. if item_flags{0} then missile1y = missile1y - 2 : goto missile_move_end
  784. if item_flags{1} then missile1x = missile1x + 2 : goto missile_move_end
  785. if item_flags{2} then missile1y = missile1y + 2 : goto missile_move_end
  786. missile_move_end
  787. rem 'Move the item if it's a mobile (id lower than 128)
  788. if item_kind{7} then goto item_move_end
  789. temp1 = rand
  790. rem ' Shoot a missile sometimes...
  791. temp6 = monster_info[item_kind]
  792. rem 'But not if the monster cannot shoot (bit 0)
  793. if !temp6{0} then goto activate_missile_end
  794. if !game_timer{4} then goto activate_missile_end
  795. if !game_timer{7} then goto activate_missile_end
  796. if !temp1{0} then goto activate_missile_end
  797. if missile1y <> nowhere then goto activate_missile_end
  798. rem 'Make a shot sound
  799. sound_timer=2
  800. AUDC1=14
  801. AUDV1=8
  802. AUDF1=20
  803. rem 'Place the missile
  804. missile1x = item_x + 4
  805. missile1y = item_y - 4
  806. temp4 = item_x + 8
  807. if hero_x > temp4 then item_flags{1} = 1
  808. temp4 = item_x - 8
  809. if hero_x < temp4 then item_flags{3} = 1
  810. if hero_y > item_y then item_flags{2} = 1
  811. if hero_y < item_y then item_flags{0} = 1
  812. missile1height=4
  813. activate_missile_end
  814. rem 'Agressive chasing if aggressive flag is set
  815. if temp6{2} then goto monster_chase
  816. rem 'Don't move if monster is static
  817. if temp6{3} then goto item_move_end
  818. rem 'Only move half the time
  819. if game_timer{2} goto item_move_end
  820. rem 'Only move if the 4th and 5th bit are not set
  821. if temp1{1} then goto item_move_end
  822. rem 'Random walking monsters don't give chase
  823. if temp6{1} then goto monster_random_walk
  824. monster_chase
  825. if hero_x > item_x then item_x = item_x + 1 else item_x = item_x - 1
  826. if hero_y > item_y then item_y = item_y + 1 else item_y = item_y - 1
  827. if temp6{2} then goto item_move_end
  828. rem 'Aggressive ennemies don't random walk
  829. monster_random_walk
  830. rem 'Use bits of random number for random walk.
  831. if temp1{0} then item_y = item_y - 1
  832. if temp1{4} then item_x = item_x - 1
  833. if temp1{0} || temp1{4} then goto item_move_end
  834. if temp1{2} then item_y = item_y + 1
  835. if temp1{6} then item_x = item_x + 1
  836. item_move_end
  837. rem 'Activate missile if needed
  838. rem 'Debug by showing flags in score field
  839. rem sc0 = hero_flags
  840. rem temp2 = monster_info[item_kind]
  841. rem sc1 = temp2
  842. rem sc2 = hero_room
  843. rem 'Music, disabled for now.
  844. rem 'Is it time to update the note?
  845. rem if music_timer = 0 then gosub music_change_note
  846. rem music_timer = music_timer - 1
  847. rem 'Collision op hero with edge of field, transfer to other field.
  848. if field_left < hero_x then goto exit_left_done
  849. hero_x = field_right_enter
  850. hero_oldx = field_right
  851. hero_room = hero_room - 1
  852. gosub room_draw
  853. goto exit_done
  854. exit_left_done
  855. if hero_x < field_right then goto exit_right_done
  856. hero_x = field_left_enter
  857. hero_oldx = field_left
  858. hero_room = hero_room + 1
  859. gosub room_draw
  860. goto exit_done
  861. exit_right_done
  862. if hero_y > field_top then goto exit_top_done
  863. hero_y = field_bottom_enter
  864. hero_oldy = field_bottom
  865. hero_room = hero_room - 8
  866. gosub room_draw
  867. goto exit_done
  868. exit_top_done
  869. if hero_y < field_bottom then goto exit_bottom_done
  870. hero_y = field_top_enter
  871. hero_oldy = field_top
  872. hero_room = hero_room + 8
  873. gosub room_draw
  874. goto exit_done
  875. exit_bottom_done
  876. exit_done
  877. rem 'Collision of item with edge of field, bounce back.
  878. if item_x < field_left then item_x=field_left_enter
  879. if item_x > field_right then item_x=field_right_enter
  880. if item_y < field_top then item_y=field_top_enter
  881. if item_y > field_bottom then item_x=field_bottom_enter
  882. rem 'Draw acting player in position 2
  883. if joy0fire goto player_animate_2
  884. rem 'Draw non moving player not animated
  885. if hero_x = hero_oldx && hero_y = hero_oldy then goto player_animate_1
  886. rem 'Draw and animate player every so many ticks
  887. if !game_timer{4} then goto player_animate_2
  888. player_animate_1
  889. if hero_flags{0} then gosub hero_draw_n
  890. if hero_flags{1} then gosub hero_draw_e
  891. if hero_flags{2} then gosub hero_draw_s
  892. if hero_flags{3} then gosub hero_draw_w
  893. goto player_animate_end
  894. player_animate_2
  895. if hero_flags{0} then gosub hero_draw_n2
  896. if hero_flags{1} then gosub hero_draw_e2
  897. if hero_flags{2} then gosub hero_draw_s2
  898. if hero_flags{3} then gosub hero_draw_w2
  899. player_animate_end
  900. rem 'Reflect sprite if moving west, otherwise, don't
  901. if hero_flags{3} then REFP0 = 8 else REFP0 = 0
  902. rem draw screen
  903. drawscreen
  904. rem And continue main loop
  905. goto main_loop
  906. rem 'Vblank sub. Do something useful in here...
  907. vblank
  908. rem 'Do something here...
  909. return
  910. rem 'Gosub that correctly displays MP
  911. set_mp_display
  912. ; lives=hero_mp * 32
  913. ; lives:
  914. ; %00010000
  915. ; %00010000
  916. ; %01010100
  917. ; %10111010
  918. ; %01010100
  919. ; %00010000
  920. ; %00010000
  921. ; %00010000
  922. ;end
  923. return
  924. rem 'Display inventory ggosub
  925. show_inventory
  926. sc0 = 0
  927. sc1 = 0
  928. sc2 = 0
  929. rem 'Add up score to display Numen Leaves
  930. if hero_items{0} then sc0 = sc0 + 16
  931. if hero_items{1} then sc0 = sc0 + 16
  932. if hero_items{2} then sc0 = sc0 + 16
  933. rem 'Display shield if we have it
  934. if hero_items{3} then sc0 = sc0 + 4
  935. rem 'Display Armor
  936. if hero_items{4} then sc1 = sc1 + 80
  937. rem 'Display Sword
  938. if hero_items{5} then sc1 = sc1 + 6
  939. if hero_items{6} then sc2 = sc2 + 112
  940. if hero_items{7} then sc2 = sc2 + 8
  941. return
  942. rem 'Item Pickup gosub
  943. item_pickup
  944. rem 'All sorts of item pickup effects, should be in a gosub, I guess
  945. rem 'Win game if finding victory item
  946. rem 'Make a pickup sound
  947. sound_timer=2
  948. AUDC1=12
  949. AUDV1=8
  950. AUDF1=2
  951. if item_kind = item_victory then goto game_win
  952. if item_kind = item_leaf1 then hero_items{0} = 1
  953. if item_kind = item_leaf2 then hero_items{1} = 1
  954. if item_kind = item_leaf3 then hero_items{2} = 1
  955. if item_kind = item_shield then hero_items{3} = 1
  956. if item_kind = item_armor then hero_items{4} = 1
  957. if item_kind = item_sword then hero_items{5} = 1
  958. if item_kind = item_bookheal then hero_items{6} = 1
  959. if item_kind = item_bookstrike then hero_items{7} = 1
  960. if item_kind <> item_healhp then goto no_healhp
  961. hero_hp = hero_hp + 8
  962. temp2 = hero_level * 2 + hero_base_hp
  963. if hero_hp > temp2 then hero_hp = temp2
  964. no_healhp
  965. if item_kind <> item_healmp then goto no_healmp
  966. hero_mp = hero_mp + 1
  967. temp2 = hero_level / 16 + 1
  968. if hero_mp > temp2 then hero_mp = temp2
  969. gosub set_mp_display
  970. no_healmp
  971. if item_kind <> item_healallhp then goto no_healallhp
  972. hero_hp = hero_level * 2 + hero_base_hp
  973. no_healallhp
  974. if item_kind <> item_healallmp then goto no_healallmp
  975. rem 'Actually, this is buggy for levels above 80
  976. hero_mp = hero_level/16 + 1
  977. gosub set_mp_display
  978. no_healallmp
  979. rem " All done with item effects
  980. rem ' Remove item
  981. item_kind = item_none
  982. item_hp = 0
  983. item_x = nowhere
  984. item_y = nowhere
  985. return
  986. hero_draw_n
  987. REFP0=0
  988. player0:
  989. %01101100
  990. %01101100
  991. %01101100
  992. %01111100
  993. %10111010
  994. %01111100
  995. %10111010
  996. %11111110
  997. %11111110
  998. %11111110
  999. %11111110
  1000. %01111100
  1001. %00111000
  1002. end
  1003. return
  1004. hero_draw_s
  1005. REFP0=0
  1006. player0:
  1007. %01101100
  1008. %01101100
  1009. %01111100
  1010. %01111100
  1011. %10111010
  1012. %01111100
  1013. %10111010
  1014. %11111110
  1015. %11010110
  1016. %11010110
  1017. %11111110
  1018. %01111100
  1019. %00111000
  1020. end
  1021. return
  1022. hero_draw_w
  1023. REFP0=8
  1024. goto hero_draw_e_start
  1025. hero_draw_e
  1026. REFP0=0
  1027. hero_draw_e_start
  1028. player0:
  1029. %00011100
  1030. %10011000
  1031. %10011000
  1032. %10111000
  1033. %10111100
  1034. %10011100
  1035. %10111000
  1036. %11111100
  1037. %11110100
  1038. %11110110
  1039. %11111110
  1040. %01111100
  1041. %00111000
  1042. end
  1043. return
  1044. hero_draw_n2
  1045. REFP0=0
  1046. player0:
  1047. %01100000
  1048. %01100000
  1049. %01101100
  1050. %01101100
  1051. %01111101
  1052. %00111010
  1053. %10111100
  1054. %11111010
  1055. %11111110
  1056. %11111110
  1057. %11111110
  1058. %11111110
  1059. %01111100
  1060. %00111000
  1061. end
  1062. return
  1063. hero_draw_s2
  1064. REFP0=0
  1065. player0:
  1066. %01100000
  1067. %01100000
  1068. %01101100
  1069. %01111100
  1070. %01111101
  1071. %00111010
  1072. %10111100
  1073. %11111010
  1074. %11111110
  1075. %11010110
  1076. %11010110
  1077. %11111110
  1078. %01111100
  1079. %00111000
  1080. end
  1081. return
  1082. hero_draw_w2
  1083. REFP0=8
  1084. goto hero_draw_e2_start
  1085. hero_draw_e2
  1086. REFP0=0
  1087. hero_draw_e2_start
  1088. player0:
  1089. %11000011
  1090. %01100110
  1091. %00111100
  1092. %10111001
  1093. %11111110
  1094. %10111100
  1095. %10111000
  1096. %11111100
  1097. %11110100
  1098. %11110110
  1099. %11111110
  1100. %01111100
  1101. %00111000
  1102. end
  1103. return
  1104. ;#if 0 // we don't need this one
  1105. ;music_change_note
  1106. ; AUDF0 = music_data[music_pointer]
  1107. ; AUDC0 = music_instrument
  1108. ; if music_data[music_pointer] = $FF then AUDV0 = 0 else AUDV0 = 8
  1109. ; music_pointer = music_pointer + 1
  1110. ; music_timer = music_data[music_pointer]
  1111. ; music_pointer = music_pointer + 1
  1112. ; if music_pointer > music_notes then music_pointer = 0
  1113. ; return
  1114. ;#endif
  1115. room_draw
  1116. rem 'Reset the monster missile and item flags
  1117. missile1x = nowhere
  1118. missile1y = nowhere
  1119. item_flags = 0
  1120. rem 'Set up item and draw it
  1121. goto item_setup
  1122. item_setup_done
  1123. if hero_room > 39 then goto room_draw_40_local
  1124. if hero_room > 63 then goto room_draw_64
  1125. on hero_room goto r00 r01 r02 r03 r04 r05 r06 r07 r08 r09 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 r32 r33 r34 r35 r36 r37 r38 r39 r40
  1126. rem r41 r42 r43 r44 r45 r46 r47 r48 r49 r50
  1127. rem r51 r52 r53 r54 r55 r56 r57 r58 r59 r60 r61 r62 r63 r64
  1128. room_draw_40_local
  1129. goto room_draw_40
  1130. room_draw_64
  1131. rem 'If we get here, the room number s not valid. Go to room room_start (49)
  1132. hero_room = room_start
  1133. goto r00
  1134. rem r64
  1135. rem r65 r66 r67 r68 r69 r70 r71 r72 r73 r74 r75 r76 r77 r78 r79 r80 r81 r82 r83 r84 r85 r86 r87 r88 r89 r90 r91 r92 r93 r94 r95 r96 r97 r98 r99 r100
  1136. room_draw_end
  1137. rem 'Clear bottom scrolling playfield row, so collision detection works properly
  1138. var44 = 0
  1139. var45 = 0
  1140. var46 = 0
  1141. var47 = 0
  1142. return
  1143. ;end
  1144. r00
  1145. pfcolors:
  1146. skyblue
  1147. skyblue
  1148. skyblue
  1149. skyblue
  1150. red
  1151. red
  1152. red
  1153. red
  1154. red
  1155. red
  1156. red
  1157. skyblue
  1158. end
  1159. playfield:
  1160. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1161. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1162. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1163. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1164. X..............................X
  1165. X..............................X
  1166. X..............................X
  1167. X..............................X
  1168. X..............................X
  1169. X..............................X
  1170. XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
  1171. end
  1172. goto room_draw_end
  1173. r01
  1174. if quest_flags{1} then COLUBK=gray else COLUBK=black
  1175. pfcolors:
  1176. black
  1177. black
  1178. black
  1179. black
  1180. black
  1181. black
  1182. black
  1183. black
  1184. black
  1185. black
  1186. black
  1187. black
  1188. end
  1189. playfield:
  1190. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1191. X..............................X
  1192. X..............................X
  1193. X..............................X
  1194. X...............................
  1195. X...............................
  1196. X......XX..............XX.......
  1197. X..............................X
  1198. X..............................X
  1199. X..............................X
  1200. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1201. end
  1202. goto room_draw_end
  1203. r02
  1204. if quest_flags{1} then COLUBK=gray else COLUBK=black
  1205. pfcolors:
  1206. black
  1207. black
  1208. black
  1209. black
  1210. black
  1211. black
  1212. black
  1213. black
  1214. black
  1215. black
  1216. black
  1217. black
  1218. end
  1219. playfield:
  1220. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1221. X........XX...............XX...X
  1222. X........XX...............XX...X
  1223. X...XX...XX...XXXXXXXXXX..XX...X
  1224. ....XX...XX...X................X
  1225. ....XX...XX...X................X
  1226. ....XX........X.......XXXXXXXXXX
  1227. XXXXXXXXXXXXXXXXXXX............X
  1228. X..............................X
  1229. X..............................X
  1230. XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
  1231. end
  1232. goto room_draw_end
  1233. r03
  1234. COLUBK = sand
  1235. pfcolors:
  1236. brown
  1237. riverblue
  1238. riverblue
  1239. riverblue
  1240. riverblue
  1241. riverblue
  1242. white
  1243. riverblue
  1244. riverblue
  1245. riverblue
  1246. riverblue
  1247. riverblue
  1248. end
  1249. playfield:
  1250. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1251. X.........XXXXXXXXXXXX..........
  1252. X.........XXXXXXXXXXXX..........
  1253. X.........XXXXXXXXXXXX..........
  1254. X.........XXXXXXXXXXXX..........
  1255. X.........XXXXXXXXXXXX..........
  1256. X........XXXXXXXXXXXXXX.........
  1257. XX......XXXXXXXXXXXXXXXX........
  1258. XX.....XXXXXXXXXXXXXXXXXX.......
  1259. XX....XXXXXXXXXXXXXXXXXXXXX.....
  1260. XX.....XXXXXXXXXXXXXXXXXX.......
  1261. end
  1262. goto room_draw_end
  1263. r04
  1264. COLUBK=gray
  1265. pfcolors:
  1266. white
  1267. white
  1268. white
  1269. white
  1270. white
  1271. white
  1272. white
  1273. white
  1274. white
  1275. white
  1276. white
  1277. white
  1278. end
  1279. playfield:
  1280. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1281. ...............................X
  1282. ...............X...............X
  1283. ..XX........XX.X.XX........XX..X
  1284. ..XX.......X..XXX..X.......XX..X
  1285. ............XX.X.XX............X
  1286. ...............X...............X
  1287. ..XX....XX...........XX....XX..X
  1288. ..XX....XX...........XX....XX..X
  1289. ...............................X
  1290. ...............................X
  1291. end
  1292. goto room_draw_end
  1293. r05
  1294. COLUBK=turfy
  1295. pfcolors:
  1296. green
  1297. green
  1298. green
  1299. green
  1300. green
  1301. brown
  1302. brown
  1303. brown
  1304. brown
  1305. brown
  1306. brown
  1307. green
  1308. end
  1309. playfield:
  1310. XXXXXXXX..XXXXXXXXXX..XXXXXXXXXX
  1311. X.XXXX...XXXXXXXXXXXX...XXXXXXXX
  1312. X.......XXXXXXXXXXXXXXX........X
  1313. X......XXXXXXXXXXXXXXX.........X
  1314. X.......XXXXXXXXXXXXXX.........X
  1315. X...........XXXXXX.............X
  1316. X...........XXXXXX.............X
  1317. X..........X......X............X
  1318. X..............................X
  1319. X..............................X
  1320. X..............................X
  1321. end
  1322. goto room_draw_end
  1323. r06
  1324. COLUBK=turfy
  1325. pfcolors:
  1326. green
  1327. green
  1328. green
  1329. green
  1330. green
  1331. green
  1332. green
  1333. green
  1334. green
  1335. green
  1336. green
  1337. green
  1338. end
  1339. playfield:
  1340. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1341. XX.......XX.....................
  1342. XX.......XX.....................
  1343. XX...XX..XX....XXXXXXXXXXXXXXXXX
  1344. XX...XX........XX...........X...
  1345. XX...XX........XX...........X...
  1346. XX...XXXXXX....XX......XX...XXXX
  1347. XX...XXX...............XX.......
  1348. XX....XX...............XX.......
  1349. XX....XX...XXXXXXXXX...XX.......
  1350. XX....XX...XXXXXXXXX...XX.....XX
  1351. end
  1352. goto room_draw_end
  1353. r07
  1354. COLUBK=turfy
  1355. pfcolors:
  1356. darkgreen
  1357. green
  1358. green
  1359. green
  1360. green
  1361. green
  1362. green
  1363. green
  1364. green
  1365. green
  1366. green
  1367. green
  1368. end
  1369. playfield:
  1370. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1371. .............X.................X
  1372. .............X.................X
  1373. XXXXXXXXX....X...XXXXXXXXX.....X
  1374. .............X...XXX...........X
  1375. .............X...XXX...........X
  1376. XXXXXX.....XXX...XXX...XXX.....X
  1377. .....X.....XXX...XXX...XXX.....X
  1378. .....X.....XXX...XXX...XXX.....X
  1379. .....X.....XXX...XXX...XXX.....X
  1380. XX...X.....XXX...XXX...XXX.....X
  1381. end
  1382. goto room_draw_end
  1383. r08
  1384. COLUBK=brown
  1385. pfcolors:
  1386. red
  1387. red
  1388. red
  1389. red
  1390. red
  1391. red
  1392. red
  1393. red
  1394. red
  1395. red
  1396. red
  1397. red
  1398. end
  1399. if quest_flags{3} goto r08_open
  1400. playfield:
  1401. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1402. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1403. XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
  1404. XXXX.....................XXXXXXX
  1405. XX........................XXXXXX
  1406. XX..............................
  1407. X...............................
  1408. X...............................
  1409. XXXXX..................XXXXXXXXX
  1410. XXXXXXX..............XXXXXXXXXXX
  1411. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1412. end
  1413. goto r08_end
  1414. r08_open
  1415. playfield:
  1416. XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
  1417. XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
  1418. XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
  1419. XXXX.....................XXXXXXX
  1420. XX........................XXXXXX
  1421. XX..............................
  1422. X...............................
  1423. X...............................
  1424. XXXXX..................XXXXXXXXX
  1425. XXXXXXX..............XXXXXXXXXXX
  1426. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1427. end
  1428. r08_end
  1429. goto room_draw_end
  1430. r09
  1431. COLUBK=sand
  1432. pfcolors:
  1433. black
  1434. red
  1435. red
  1436. red
  1437. red
  1438. red
  1439. red
  1440. red
  1441. red
  1442. red
  1443. red
  1444. black
  1445. end
  1446. playfield:
  1447. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1448. XXXXXXXXXXXXXXXXXXX.............
  1449. XXXXXXXXXXX.....................
  1450. XXXXXXXXX....................XXX
  1451. XXXXXXX.....XXXXXXXXXXXXXXXXXXXX
  1452. ...XX......XXX..................
  1453. ...........XX...................
  1454. ......XXXXXX......XXXX....XXXXXX
  1455. XX...XXX........XXXXXXX.........
  1456. XXXXXXX.......XXXXXXXXXX........
  1457. XXXXXX.......XXXXXXXXXXXX....XXX
  1458. end
  1459. goto room_draw_end
  1460. r10
  1461. COLUBK=sand
  1462. pfcolors:
  1463. black
  1464. red
  1465. red
  1466. red
  1467. red
  1468. red
  1469. red
  1470. red
  1471. red
  1472. red
  1473. red
  1474. black
  1475. end
  1476. playfield:
  1477. XXXXXXXXXXXXXX....XXXXXXXXXXXXXX
  1478. ............XX.................X
  1479. .............XX................X
  1480. XXX...........XX.....XX........X
  1481. XXXXXXXXXX.....XX...XX........XX
  1482. ...................XX.......XXXX
  1483. ..................XX......XXXX..
  1484. XXXXXXXXXXXXXXXXXXX.....XXXX....
  1485. .....................XXXXXX.....
  1486. ....................XXXX........
  1487. XXXXXXXXXXXXXXXXXXXXXXX.........
  1488. end
  1489. goto room_draw_end
  1490. r11
  1491. COLUBK=turfy
  1492. pfcolors:
  1493. riverblue
  1494. riverblue
  1495. riverblue
  1496. riverblue
  1497. riverblue
  1498. riverblue
  1499. riverblue
  1500. riverblue
  1501. riverblue
  1502. riverblue
  1503. riverblue
  1504. riverblue
  1505. end
  1506. playfield:
  1507. XX.......XXXXXXXXXXXXXX.........
  1508. XX.......XXXXXXXXXXXXXX.........
  1509. XX........XXXXXXXXXXXX..........
  1510. XX........XXXXXXXXXXXX..........
  1511. XX........XXXXXXXXXXXX..........
  1512. XX........XXXXXXXXXXXX..........
  1513. ..........XXXXXXXXXXXX..........
  1514. ..........XXXXXXXXXXXX..........
  1515. ..........XXXXXXXXXXXX..........
  1516. ..........XXXXXXXXXXXX..........
  1517. ..........XXXXXXXXXXXX..........
  1518. end
  1519. goto room_draw_end
  1520. r12
  1521. COLUBK=gray
  1522. pfcolors:
  1523. white
  1524. white
  1525. white
  1526. white
  1527. white
  1528. white
  1529. white
  1530. white
  1531. white
  1532. white
  1533. white
  1534. white
  1535. end
  1536. playfield:
  1537. ...............................X
  1538. ...............................X
  1539. ...............................X
  1540. ..XX....XX...........XX....XX..X
  1541. ..XX....XX...........XX....XX..X
  1542. ...............................X
  1543. ...............................X
  1544. ..XX....XX...........XX....XX..X
  1545. ..XX....XX...........XX....XX..X
  1546. ...............................X
  1547. ...............................X
  1548. end
  1549. goto room_draw_end
  1550. r13
  1551. COLUBK=turfy
  1552. pfcolors:
  1553. green
  1554. green
  1555. green
  1556. green
  1557. green
  1558. green
  1559. green
  1560. green
  1561. green
  1562. green
  1563. green
  1564. green
  1565. end
  1566. playfield:
  1567. XXXXXXXXXXXXXX...XXXXXXXXXXXXXXX
  1568. X..............................X
  1569. X..............................X
  1570. X..............................X
  1571. X..............................X
  1572. X..............................X
  1573. X..............................X
  1574. X..............................X
  1575. X...............................
  1576. X...............................
  1577. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1578. end
  1579. goto room_draw_end
  1580. r14
  1581. COLUBK=turfy
  1582. pfcolors:
  1583. green
  1584. green
  1585. green
  1586. green
  1587. green
  1588. green
  1589. green
  1590. green
  1591. green
  1592. green
  1593. green
  1594. green
  1595. end
  1596. playfield:
  1597. XXX...XX...XXXXXXXXX...XX.....XX
  1598. XXX...XX...XXXXXXXXX...XX.......
  1599. XXX...XX...............XX.......
  1600. XXX...XX...............XX.......
  1601. XXX...XXXXXXXXXXXXXX...XXXXXXXXX
  1602. XXX.............................
  1603. XXX.............................
  1604. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1605. ................................
  1606. ................................
  1607. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1608. end
  1609. goto room_draw_end
  1610. r15
  1611. pfcolors:
  1612. green
  1613. green
  1614. green
  1615. green
  1616. green
  1617. green
  1618. green
  1619. green
  1620. green
  1621. green
  1622. green
  1623. green
  1624. end
  1625. playfield:
  1626. XX...XXX...XXX...XXX...XXX.....X
  1627. .....XXX...XXX...XXX...XXX.....X
  1628. .....XXX.......................X
  1629. .....XXX.......................X
  1630. XXXXXXXXXXXXXXXXXXXXXXXXXXX....X
  1631. ....XXX........................X
  1632. ....XXX........................X
  1633. XX..XXX....XXXXXXXXXXXXXXXXXXXXX
  1634. ....XXX....X...................X
  1635. ....XXX....X...................X
  1636. XXXXXXX....XXXXXXXXXXXXXXX.....X
  1637. end
  1638. goto room_draw_end
  1639. r16
  1640. COLUBK=yellow
  1641. pfcolors:
  1642. white
  1643. white
  1644. white
  1645. white
  1646. white
  1647. white
  1648. white
  1649. white
  1650. white
  1651. white
  1652. white
  1653. white
  1654. end
  1655. playfield:
  1656. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1657. X..............................X
  1658. X..............................X
  1659. X...XX....................XX...X
  1660. X...XX....................XX...X
  1661. X...XX....................XX...X
  1662. X..............................X
  1663. X...XX....................XX...X
  1664. X...XX....................XX...X
  1665. X...XX....................XX...X
  1666. X..............................X
  1667. end
  1668. goto room_draw_end
  1669. r17
  1670. COLUBK=sand
  1671. pfcolors:
  1672. brown
  1673. brown
  1674. brown
  1675. brown
  1676. red
  1677. red
  1678. red
  1679. red
  1680. red
  1681. red
  1682. red
  1683. red
  1684. end
  1685. playfield:
  1686. XXXXXX.......XXXXXXXXXXXX....XXX
  1687. XXXXXXXX.......XXXXXXXX.......XX
  1688. XXXXXXXXXX..........XX..........
  1689. XXXXXXXXXXXXX........XX.........
  1690. XXXXXXXXXXXXXXXX......XX........
  1691. XXXXXXXXXXXXXXXXXX....XX........
  1692. XXXXXXXXXXXXXXXX....XXXX........
  1693. XXXXXXXXXXXXXXX....XXXX.........
  1694. XXXXXXXXXXXXXXXXX...............
  1695. XXXXXXXXXXXXXXXXXXX.............
  1696. XXXXXXXXXXXXXXXXXXXXXX..........
  1697. end
  1698. goto room_draw_end
  1699. r18
  1700. COLUBK = turfy
  1701. pfcolors:
  1702. red
  1703. red
  1704. white
  1705. white
  1706. red + 8
  1707. red + 6
  1708. red + 4
  1709. white
  1710. white
  1711. white
  1712. white
  1713. red
  1714. end
  1715. playfield:
  1716. XXXXXXXXXXXXXXXXXXXXXXX.........
  1717. XXXXXXXXXXXXXXXXXXX.............
  1718. ................................
  1719. ................................
  1720. ...XXXXXXXXXXXXXX...............
  1721. ..XXXXXXXXXXXXXXXX..............
  1722. .XXXXXXXXXXXXXXXXXX.............
  1723. ..XXXXXXXXXXXXXXXX..............
  1724. ..XX..XX...XXX..XX..............
  1725. ..XXXXXX...XXXXXXX..............
  1726. ................................
  1727. end
  1728. goto room_draw_end
  1729. r19
  1730. COLUBK=sand
  1731. pfcolors:
  1732. riverblue
  1733. riverblue
  1734. riverblue
  1735. riverblue
  1736. riverblue
  1737. riverblue
  1738. riverblue
  1739. riverblue
  1740. riverblue
  1741. riverblue
  1742. riverblue
  1743. riverblue
  1744. end
  1745. playfield:
  1746. ..........XXXXXXXXXXXX..........
  1747. ..........XXXXXXXXXXXX..........
  1748. ..........XXXXXXXXXXXXX.........
  1749. ..........XXXXXXXXXXXXX.........
  1750. .........XXXXXXXXXXXXXX.........
  1751. .........XXXXXXXXXXXXXX.........
  1752. .........XXXXXXXXXXXXX..........
  1753. .........XXXXXXXXXXXXX..........
  1754. .........XXXXXXXXXXXXX..........
  1755. ..........XXXXXXXXXXXX..........
  1756. ..........XXXXXXXXXXXX..........
  1757. end
  1758. goto room_draw_end
  1759. r20
  1760. COLUBK=sand
  1761. pfcolors:
  1762. green
  1763. gray
  1764. gray
  1765. gray
  1766. gray
  1767. gray
  1768. gray
  1769. gray
  1770. gray
  1771. gray
  1772. gray
  1773. green
  1774. end
  1775. playfield:
  1776. ...............................X
  1777. ....X.X.X.....XX.XX.XX.....X.X.X
  1778. ....XXXXX.....XXXXXXXX.....XXXXX
  1779. ....X...X.....X......X.....X...X
  1780. ....X...XXXXXXX......XXXXXXX...X
  1781. ....X...........................
  1782. ....X...........................
  1783. ....X...XXXXXXXXXXXXXXXXXXXXXXXX
  1784. ....X............XX.............
  1785. ....X............XX.............
  1786. ....X............XX...........XX
  1787. end
  1788. goto room_draw_end
  1789. r21
  1790. COLUBK=turfy
  1791. pfcolors:
  1792. green
  1793. gray
  1794. gray
  1795. gray
  1796. gray
  1797. gray
  1798. gray
  1799. gray
  1800. gray
  1801. gray
  1802. gray
  1803. green
  1804. end
  1805. playfield:
  1806. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1807. ....X.X.X......X.XX.X......X.X.X
  1808. ....XXXXX......XXXXXX......XXXXX
  1809. ....X...XXXXXXXX....XXXXXXXX...X
  1810. XXXXX..........................X
  1811. ...............................X
  1812. ...............................X
  1813. XXXXX..........................X
  1814. ....X..........................X
  1815. ....X..........................X
  1816. XX..XXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1817. end
  1818. goto room_draw_end
  1819. r22
  1820. COLUBK=turfy
  1821. pfcolors:
  1822. green
  1823. green
  1824. green
  1825. green
  1826. green
  1827. green
  1828. green
  1829. green
  1830. brown
  1831. green
  1832. green
  1833. green
  1834. end
  1835. playfield:
  1836. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1837. XXXXXXXXX...XXX...XXXXXXXXXXXXXX
  1838. XXXXXXX.............XXXXXXXXXXXX
  1839. XXXXXX................XXXXXXXXXX
  1840. XXXX....................XXXXXXXX
  1841. XXXX.......................XXXXX
  1842. XXX.........................XXXX
  1843. XX....X..............X.......XXX
  1844. XX...XXXX...........XXXX........
  1845. X.....X..............X..........
  1846. X...............................
  1847. end
  1848. goto room_draw_end
  1849. r23
  1850. COLUBK=turfy
  1851. pfcolors:
  1852. green
  1853. green
  1854. green
  1855. green
  1856. green
  1857. green
  1858. green
  1859. green
  1860. green
  1861. green
  1862. green
  1863. green
  1864. end
  1865. playfield:
  1866. XXXXXXX...XXXXXXXXXXXXXXXX.....X
  1867. XXXXXXX...XXXXXXXXXXXXXXXX.....X
  1868. XXXXXXX....XXXXXXXXXXXXX.......X
  1869. XXXXXXX.....XXXXXXXXXXX........X
  1870. XXXXXXX........................X
  1871. XXXXXXX........................X
  1872. XXXXXXXXXXXXXXXX..XXXXXXXXXXXXXX
  1873. .....X......X.......X..........X
  1874. ....XXXX...XXXX....XXXX........X
  1875. .....X......X.......X..........X
  1876. ...............................X
  1877. end
  1878. goto room_draw_end
  1879. r24
  1880. COLUBK=yellow
  1881. pfcolors:
  1882. white
  1883. white
  1884. white
  1885. white
  1886. white
  1887. white
  1888. white
  1889. white
  1890. white
  1891. white
  1892. white
  1893. white
  1894. end
  1895. if quest_flags{5} then goto r24_open
  1896. playfield:
  1897. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  1898. X..............................X
  1899. X...XX....................XX...X
  1900. X...XX....................XX...X
  1901. X...XX....................XX...X
  1902. X.............XXXX.............X
  1903. X...XX.......XXXXXX.......XX...X
  1904. X...XX....................XX...X
  1905. X...XX....................XX...X
  1906. X..............................X
  1907. X......XXXXXXX....XXXXXXX.....XX
  1908. end
  1909. goto r24_end
  1910. r24_open
  1911. playfield:
  1912. X..............................X
  1913. X..............................X
  1914. X...XX....................XX...X
  1915. X...XX....................XX...X
  1916. X...XX....................XX...X
  1917. X.............XXXX.............X
  1918. X...XX.......XXXXXX.......XX...X
  1919. X...XX....................XX...X
  1920. X...XX....................XX...X
  1921. X..............................X
  1922. X......XXXXXXX....XXXXXXX.....XX
  1923. end
  1924. r24_end
  1925. goto room_draw_end
  1926. r25
  1927. COLUBK=turfy
  1928. pfcolors:
  1929. red
  1930. red
  1931. red + 8
  1932. red + 6
  1933. red + 4
  1934. white
  1935. white
  1936. white
  1937. white
  1938. white
  1939. white
  1940. red
  1941. end
  1942. playfield:
  1943. XXXXXXXXXXXXXXXXXXXXXX..........
  1944. XXXXXXXXXXXXXXXXXXXX............
  1945. XXXXXXXXXXXXXXXXXX.XXXXXXXXXX...
  1946. XXXXXXXXXXXXXXX...XXXXXXXXXXXX..
  1947. XXXXXXXXXXXXX....XXXXXXXXXXXXXX.
  1948. XXXXXXXXXXX.......XXXXXXXXXXXX..
  1949. XXXXXXXXX.........XXX..XX...XX..
  1950. XXXXXX............XXXXXXX...XX..
  1951. XXXXX...........................
  1952. XX..............................
  1953. XX..............................
  1954. end
  1955. goto room_draw_end
  1956. r26
  1957. COLUBK = turfy
  1958. pfcolors:
  1959. white
  1960. white
  1961. red + 8
  1962. red + 6
  1963. red + 4
  1964. white
  1965. white
  1966. white
  1967. white
  1968. red
  1969. red
  1970. red
  1971. end
  1972. playfield:
  1973. ................................
  1974. ................................
  1975. ...XXXXXXX.....XXXXXXXXXXXXX....
  1976. ..XXXXXXXXX...XXXXXXXXXXXXXXX...
  1977. .XXXXXXXXXXX.XXXXXXXXXXXXXXXXX..
  1978. ..XXXXXXXXX...XXXXXXXXXXXXXXX...
  1979. ..XX.X...XX...XX..XX...XX..XX...
  1980. ..XXXX...XX...XXXXXX...XXXXXX...
  1981. ................................
  1982. ................................
  1983. ................................
  1984. end
  1985. goto room_draw_end
  1986. r27
  1987. COLUBK=sand
  1988. pfcolors:
  1989. riverblue
  1990. riverblue
  1991. riverblue
  1992. riverblue
  1993. riverblue
  1994. riverblue
  1995. riverblue
  1996. riverblue
  1997. riverblue
  1998. riverblue
  1999. riverblue
  2000. riverblue
  2001. end
  2002. playfield:
  2003. ..........XXXXXXXXXXXX..........
  2004. ..........XXXXXXXXXXXX..........
  2005. ..........XXXXXXXXXXXX..........
  2006. ..........XXXXXXXXXXXXX.........
  2007. ..........XXXXXXXXXXXXX.........
  2008. ..........XXXXXXXXXXXXX.........
  2009. ..........XXXXXXXXXXXXX.........
  2010. ..........XXXXXXXXXXXX..........
  2011. ..........XXXXXXXXXXXX..........
  2012. ..........XXXXXXXXXXXX..........
  2013. ..........XXXXXXXXXXXX..........
  2014. end
  2015. goto room_draw_end
  2016. r28
  2017. COLUBK=sand
  2018. pfcolors:
  2019. green
  2020. gray
  2021. gray
  2022. gray
  2023. gray
  2024. gray
  2025. gray
  2026. gray
  2027. gray
  2028. gray
  2029. gray
  2030. green
  2031. end
  2032. playfield:
  2033. ....X............XX...........XX
  2034. ....XXXXXXXXXX...XX.....XXXXXXXX
  2035. ....X............XX...........XX
  2036. ....X............XX...........XX
  2037. ....X...XXXXXXXXXXXXXXXXXXX...XX
  2038. ....X...X.................X...XX
  2039. ....X.........................XX
  2040. ....XX.....XXXXXXXXXXXXXX....XXX
  2041. ....XXXXXXXXX..........XXXXXXXXX
  2042. ................................
  2043. ................................
  2044. end
  2045. goto room_draw_end
  2046. r29
  2047. COLUBK=turfy
  2048. pfcolors:
  2049. green
  2050. gray
  2051. gray
  2052. gray
  2053. gray
  2054. gray
  2055. gray
  2056. gray
  2057. gray
  2058. gray
  2059. gray
  2060. green
  2061. end
  2062. if quest_flags{6} then goto r29_open
  2063. if item_flags{3} then goto r29_open
  2064. playfield:
  2065. XX..XXXXXXXXXXXXXXXXXXXXXXXXXXXX
  2066. XX..X.........................XX
  2067. XX..X.........................XX
  2068. XX..X..XXXXXXXXXXXXXXXXXX.....XX
  2069. XX..X..XXXXXXX.XX.XXXXXXX.....XX
  2070. XX..X..XXXXX.X.XX.X.XXXXX.....XX
  2071. XX.....XXXXX.XXXXXX.XXXXX.....XX
  2072. XX.....XXXXX.X.XX.X.XXXXX.....XX
  2073. XXXXXXXXX..............XXXXXXXXX
  2074. ..............................XX
  2075. ..............................XX
  2076. end
  2077. goto room_draw_end
  2078. r29_open
  2079. playfield:
  2080. XX..XXXXXXXXXXXXXXXXXXXXXXXXXXXX
  2081. XX..X.........................XX
  2082. XX..X.........................XX
  2083. XX..X..XXXXXXXX..XXXXXXXX.....XX
  2084. XX..X..XXXXXX......XXXXXX.....XX
  2085. XX..X..XXXXX........XXXXX.....XX
  2086. XX.....XXXXX........XXXXX.....XX
  2087. XX.....XXXXX........XXXXX.....XX
  2088. XXXXXXXXX..............XXXXXXXXX
  2089. ..............................XX
  2090. ..............................XX
  2091. end
  2092. goto room_draw_end
  2093. r30
  2094. pfcolors:
  2095. green
  2096. green
  2097. green
  2098. green
  2099. brown
  2100. green
  2101. green
  2102. green
  2103. green
  2104. brown
  2105. green
  2106. green
  2107. end
  2108. playfield:
  2109. X...............................
  2110. XX......X.....X.....X.....X.....
  2111. XXX....XXX...XXX...XXX...XXX....
  2112. XX....XXXXX.XXXXX.XXXXX.XXXXX...
  2113. X.......X.....X.....X.....X.....
  2114. XX..............................
  2115. XX...X......X......X.....X......
  2116. X...XXX....XXX....XXX...XXX.....
  2117. X..XXXXX..XXXXX..XXXXX.XXXXX....
  2118. X....X......X......X.....X......
  2119. X.............................XX
  2120. XX............................XX
  2121. end
  2122. goto room_draw_end
  2123. r31
  2124. pfcolors:
  2125. green
  2126. green
  2127. green
  2128. green
  2129. green
  2130. green
  2131. green
  2132. brown
  2133. brown
  2134. brown
  2135. green
  2136. green
  2137. end
  2138. playfield:
  2139. ...............................X
  2140. ...............................X
  2141. ...............................X
  2142. .......XXX..............XXX....X
  2143. ......XXXXX.....X......XXXXX...X
  2144. ......XXXXX....XXX.....XXXXX...X
  2145. .......XXX....XXXXX.....XXX....X
  2146. ........X.......X........X.....X
  2147. ........X................X.....X
  2148. ...............................X
  2149. XXX...........................XX
  2150. end
  2151. goto room_draw_end
  2152. r32
  2153. COLUBK=turfy
  2154. pfcolors:
  2155. white
  2156. white
  2157. white
  2158. white
  2159. white
  2160. white
  2161. white
  2162. white
  2163. white
  2164. white
  2165. white
  2166. white
  2167. end
  2168. if quest_flags{2} then goto r32_open
  2169. playfield:
  2170. X.....XXXXXXXXXXXXXXXXXXX.....XX
  2171. X....XXXXXXXXXXXXXXXXXXXXX....XX
  2172. X...XXXXXXXXXXXXXXXXXXXXXXX...XX
  2173. X..XXXXXXXXXXXXXXXXXXXXXXXXX..XX
  2174. X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  2175. X..XX..XX..XX..XX..XX..XX..XX...
  2176. X..XX..XX..XX..XX..XX..XX..XX...
  2177. X..XX..XX..XX..XX..XX..XX..XX...
  2178. X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX..
  2179. X...............................
  2180. X...............................
  2181. end
  2182. goto room_draw_end
  2183. r32_open
  2184. playfield:
  2185. X.....XXXXXXXX....XXXXXXX.....XX
  2186. X....XXXXXXXXX....XXXXXXXX....XX
  2187. X...XXXXXXXXX......XXXXXXXX...XX
  2188. X..XXXXXXXXXX......XXXXXXXXX..XX
  2189. X.XXXXXXXXXXXX....XXXXXXXXXXXXXX
  2190. X..XX..XX..XX......XX..XX..XX...
  2191. X..XX..XX..XX......XX..XX..XX...
  2192. X..XX..XX..XX......XX..XX..XX...
  2193. X.XXXXXXXXXXX......XXXXXXXXXXX..
  2194. X...............................
  2195. X...............................
  2196. end
  2197. goto room_draw_end
  2198. r33
  2199. pfcolors:
  2200. white
  2201. white
  2202. white
  2203. white
  2204. red + 8
  2205. red + 6
  2206. white
  2207. white
  2208. white
  2209. white
  2210. white
  2211. white
  2212. end
  2213. playfield:
  2214. XX..............................
  2215. XX.............XXX..............
  2216. XX...........XX...XX............
  2217. XX.............XXX..............
  2218. XX..............................
  2219. ....XXXXXXXXXXXX....XXXXXXXXXX..
  2220. ...XXXXXXXXXXXXXX..XXXXXXXXXXXX.
  2221. ....XXXXXXXXXXXX....XXXXXXXXXX..
  2222. ....XX.XX...XX.X....XX.XX...XX..
  2223. ....XXXXX...XXXX....XXXXX...XX..
  2224. ................................
  2225. end
  2226. goto room_draw_end
  2227. r34
  2228. COLUBK = turfy
  2229. pfcolors:
  2230. white
  2231. white
  2232. red + 8
  2233. red + 6
  2234. red + 4
  2235. white
  2236. white
  2237. white
  2238. white
  2239. red
  2240. red
  2241. red
  2242. end
  2243. playfield:
  2244. ................................
  2245. ................................
  2246. ...XXXXXXXXXXXXX......XXXXXXX...
  2247. ..XXXXXXXXXXXXXXX....XXXXXXXXX..
  2248. .XXXXXXXXXXXXXXXXX..XXXXXXXXXXX.
  2249. ..XXXXXXXXXXXXXXX....XXXXXXXXX..
  2250. ..XX..XX...XX..XX....XX.XX...X..
  2251. ..XXXXXX...XXXXXX....XXXXX...X..
  2252. ................................
  2253. ................................
  2254. ................................
  2255. end
  2256. goto room_draw_end
  2257. r35
  2258. COLUBK=sand
  2259. pfcolors:
  2260. riverblue
  2261. riverblue
  2262. riverblue
  2263. riverblue
  2264. riverblue
  2265. riverblue
  2266. riverblue
  2267. riverblue
  2268. riverblue
  2269. riverblue
  2270. riverblue
  2271. riverblue
  2272. end
  2273. if quest_flags{4} then goto r35_open
  2274. playfield:
  2275. ..........XXXXXXXXXXXX..........
  2276. ..........XXXXXXXXXXXX..........
  2277. ..........XXXXXXXXXXXX..........
  2278. ...........XXXXXXXXXX...........
  2279. ............XXXXXXXX............
  2280. ............XXXXXXXX............
  2281. ...........XXXXXXXXXX...........
  2282. ..........XXXXXXXXXXXX..........
  2283. .........XXXXXXXXXXXXX..........
  2284. ..........XXXXXXXXXXXX..........
  2285. ..........XXXXXXXXXXXX..........
  2286. end
  2287. goto room_draw_end
  2288. r35_open
  2289. playfield:
  2290. ..........XXXXXXXXXXXX..........
  2291. ..........XXXXXXXXXXXX..........
  2292. ..........XXXXXXXXXXXX..........
  2293. ...........XXXXXXXXXX...........
  2294. ................................
  2295. ................................
  2296. ...........XXXXXXXXXX...........
  2297. ..........XXXXXXXXXXXX..........
  2298. .........XXXXXXXXXXXXX..........
  2299. ..........XXXXXXXXXXXX..........
  2300. ..........XXXXXXXXXXXX..........
  2301. end
  2302. goto room_draw_end
  2303. r36
  2304. COLUBK=turfy
  2305. pfcolors:
  2306. green
  2307. yellow
  2308. green
  2309. yellow
  2310. green
  2311. green
  2312. yellow
  2313. green
  2314. yellow
  2315. green
  2316. yellow
  2317. green
  2318. end
  2319. playfield:
  2320. ................................
  2321. ..XXXXXXXX..XXXXXXXX..XXXXXXXX..
  2322. ..XXXXXXXX..XXXXXXXX..XXXXXXXX..
  2323. ..XXXXXXXX..XXXXXXXX..XXXXXXXX..
  2324. ..XXXXXXXX..XXXXXXXX..XXXXXXXX..
  2325. ................................
  2326. ..XXXXXXXX..XXXXXXXX..XXXXXXXX..
  2327. ..XXXXXXXX..XXXXXXXX..XXXXXXXX..
  2328. ..XXXXXXXX..XXXXXXXX..XXXXXXXX..
  2329. ..XXXXXXXX..XXXXXXXX..XXXXXXXX..
  2330. ................................
  2331. end
  2332. goto room_draw_end
  2333. r37
  2334. COLUBK=turfy
  2335. pfcolors:
  2336. green
  2337. yellow
  2338. green
  2339. yellow
  2340. green
  2341. green
  2342. yellow
  2343. green
  2344. yellow
  2345. green
  2346. yellow
  2347. green
  2348. end
  2349. playfield:
  2350. ................................
  2351. ..XXXXXXX..XXXXXXXXXX..XXXXXXX..
  2352. ..XXXXXXX..XXXXXXXXXX..XXXXXXX..
  2353. ..XXXXXXX..XXXXXXXXXX..XXXXXXX..
  2354. ..XXXXXXX..XXXXXXXXXX..XXXXXXX..
  2355. ................................
  2356. ..XXXXXXX..XXXXXXXXXX..XXXXXXX..
  2357. ..XXXXXXX..XXXXXXXXXX..XXXXXXX..
  2358. ..XXXXXXX..XXXXXXXXXX..XXXXXXX..
  2359. ..XXXXXXX..XXXXXXXXXX..XXXXXXX..
  2360. ................................
  2361. end
  2362. goto room_draw_end
  2363. r38
  2364. COLUBK=turfy
  2365. pfcolors:
  2366. gray
  2367. gray
  2368. gray
  2369. gray
  2370. gray
  2371. gray
  2372. gray
  2373. gray
  2374. gray
  2375. gray
  2376. gray
  2377. gray
  2378. end
  2379. playfield:
  2380. XX............................XX
  2381. ......XXXXXXXXXXXXXXXXXXX.......
  2382. ....XXX................XXXX.....
  2383. ...XX.....................XX....
  2384. ..XX.......................XX...
  2385. ..XX........................XX..
  2386. ..XX........................XX..
  2387. ..XXX.....................XXXX..
  2388. ..X.XXX.................XXX.XX..
  2389. ..X.......XXXXXXXXXXXXXX.XX.XX..
  2390. ..X.......X.XXXXXXXX.XXX.XXXXX..
  2391. end
  2392. goto room_draw_end
  2393. r39
  2394. COLUBK=turfy
  2395. pfcolors:
  2396. green
  2397. green
  2398. green
  2399. green
  2400. green
  2401. green
  2402. green
  2403. green
  2404. green
  2405. green
  2406. green
  2407. end
  2408. playfield:
  2409. XXX...........................XX
  2410. ..XX...X........X.......X....XXX
  2411. ..XX..XXX......XXX.....XXX...XXX
  2412. ...XX..X...X....X.......X.....XX
  2413. ..XX......XXX.................XX
  2414. ...XX......X.......X.........XXX
  2415. ..XX.........X....XXX.........XX
  2416. ...XX...X...XXX....X....X....XXX
  2417. ..XX...XXX...X.........XXX...XXX
  2418. ...XX...X...............X.....XX
  2419. ..XX...........................X
  2420. end
  2421. goto room_draw_end
  2422. room_draw_40
  2423. temp1=hero_room-40
  2424. on temp1 goto r40 r41 r42 r43 r44 r45 r46 r47 r48 r49 r50 r51 r52 r53 r54 r55 r56 r57 r58 r59 r60 r61 r62 r63
  2425. goto room_draw_end
  2426. r40
  2427. pfcolors:
  2428. brown
  2429. brown
  2430. brown
  2431. brown
  2432. brown
  2433. brown
  2434. brown
  2435. brown
  2436. brown
  2437. brown
  2438. brown
  2439. brown
  2440. end
  2441. playfield:
  2442. X...............................
  2443. XXX.............................
  2444. XXXXX...........................
  2445. XXXXXXX.........................
  2446. XXXXXXXXXX......XXX.............
  2447. XXXXXXXX.......XXXXX............
  2448. XXXXXX.......XXXXXXXXX..........
  2449. XXXXXX........XXXXXX............
  2450. XXXXX...........XXXXXX..........
  2451. XXX...............XXXXX.........
  2452. X...............................
  2453. end
  2454. goto room_draw_end
  2455. r41
  2456. COLUBK = turfy
  2457. pfcolors:
  2458. green
  2459. green
  2460. green
  2461. green
  2462. brown
  2463. green
  2464. green
  2465. green
  2466. green
  2467. brown
  2468. seablue
  2469. green
  2470. end
  2471. playfield:
  2472. ................................
  2473. .............X..................
  2474. ............XXX.................
  2475. ...........XXXXX................
  2476. .............X..................
  2477. .....X..........................
  2478. ....XXX............X............
  2479. ....XXXX..........XXX...........
  2480. ...XXXXX.........XXXXX..........
  2481. .....X.............X............
  2482. ................................
  2483. end
  2484. goto room_draw_end
  2485. r42
  2486. COLUBK = turfy
  2487. pfcolors:
  2488. green
  2489. green
  2490. green
  2491. green
  2492. brown
  2493. green
  2494. green
  2495. green
  2496. green
  2497. brown
  2498. seablue
  2499. green
  2500. end
  2501. playfield:
  2502. ................................
  2503. ..........................X.....
  2504. .........................XXX....
  2505. ........................XXXXX...
  2506. ..........................X.....
  2507. .....X..........................
  2508. ....XXX............X............
  2509. ....XXXX..........XXX...........
  2510. ...XXXXX.........XXXXX..........
  2511. .....X.............X..........XX
  2512. ..............................XX
  2513. end
  2514. goto room_draw_end
  2515. r43
  2516. COLUBK = sand
  2517. pfcolors:
  2518. riverblue
  2519. riverblue
  2520. riverblue
  2521. riverblue
  2522. seablue + 8
  2523. seablue + 8
  2524. seablue + 4
  2525. seablue + 4
  2526. seablue + 2
  2527. seablue + 2
  2528. seablue
  2529. seablue
  2530. end
  2531. playfield:
  2532. ..........XXXXXXXXXXXX..........
  2533. ..........XXXXXXXXXXXXX.........
  2534. ..........XXXXXXXXXXXXX.........
  2535. ..........XXXXXXXXXXXXXX........
  2536. .........XXXXXXXXXXXXXXX........
  2537. .........XXXXXXXXXXXXXXXXX......
  2538. .......XXXXXXXXXXXXXXXXXXXXX....
  2539. .....XXXXXXXXXXXXXXXXXXXXXXXX...
  2540. ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
  2541. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  2542. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  2543. end
  2544. goto room_draw_end
  2545. r44
  2546. COLUBK=sand
  2547. pfcolors:
  2548. red
  2549. red
  2550. white
  2551. white
  2552. white
  2553. white
  2554. white
  2555. white
  2556. white
  2557. seablue
  2558. seablue
  2559. red
  2560. end
  2561. playfield:
  2562. ................................
  2563. ........X.........X.............
  2564. .......XXX.......XXX............
  2565. ......XXXXX.....XXXXX...........
  2566. .....XXX.XXX...XXX.XXX...X......
  2567. ....XXX...XXX.XXX...XXX.XXX.....
  2568. .......................XXXXX....
  2569. ......................XXX.XXX...
  2570. .....................XXX...XXX..
  2571. XX..............................
  2572. XX..............................
  2573. end
  2574. goto room_draw_end
  2575. r45
  2576. COLUBK = sand
  2577. pfcolors:
  2578. brown
  2579. brown
  2580. brown
  2581. green
  2582. green
  2583. green
  2584. brown
  2585. brown
  2586. brown
  2587. brown
  2588. brown
  2589. green
  2590. end
  2591. playfield:
  2592. ................................
  2593. ................................
  2594. ................................
  2595. ................................
  2596. ...XXX..XXX...XXXX....XXX..XXX..
  2597. ..X...XX...X.XXXXXX..X...XX...X.
  2598. ......XX.....XXXXXX.....XX......
  2599. .......XX....XX..XX.....XX......
  2600. .......XX....XX..XX....XX.......
  2601. ........XX.............XX.......
  2602. ................................
  2603. end
  2604. goto room_draw_end
  2605. r46
  2606. COLUBK=turfy
  2607. pfcolors:
  2608. gray
  2609. gray
  2610. gray
  2611. gray
  2612. gray
  2613. gray
  2614. gray
  2615. gray
  2616. gray
  2617. gray
  2618. gray
  2619. gray
  2620. end
  2621. playfield:
  2622. ..X.......X.XXX..XXX.XXXXXXXXX..
  2623. ..X....XXXXXXXX..XXXXXXX.XXXXX..
  2624. ..X.......XXXXXXXXXX.XXX.XXXXX..
  2625. ..XXX........XXXXXXX.XXXXXX.XX..
  2626. ..XX.XXX..........XXXXXXXXX.XX..
  2627. ..XXXXX.XXX..........XXX.XXXXX..
  2628. ..XXXXX.XXXXXX..........XXXXXX..
  2629. ..XX.XXXXXX.XXXXXXX........XXX..
  2630. ..XX.XXXXXXXXXX..XXXXX.......X..
  2631. ..XXXXX.XXXXXXXXXXXXXXXXX....X..
  2632. ..XXXXX.XXX.XXXXXXXX.X.....XXX..
  2633. ..XX.XXXXXX.XXX..XXX.X.....XXX..
  2634. end
  2635. goto room_draw_end
  2636. r47
  2637. pfcolors:
  2638. green
  2639. green
  2640. green
  2641. green
  2642. green
  2643. green
  2644. green
  2645. green
  2646. green
  2647. green
  2648. green
  2649. green
  2650. end
  2651. playfield:
  2652. ..XX...........................X
  2653. ...XX..X....X.....X.....X......X
  2654. ..XX..XXX..XXX...XXX...XXX....XX
  2655. ...XX..X....X.....X.....X.....XX
  2656. ..XX.....X.....X.....X.......XXX
  2657. ...XX...XXX...XXX...XXX......XXX
  2658. ...XX....X.....X.....X......XXXX
  2659. ..XX...X....X.....X.....X....XXX
  2660. ..XX..XXX..XXX...XXX...XXX....XX
  2661. ..XX...X....X.....X.....X......X
  2662. ...XX..........................X
  2663. end
  2664. goto room_draw_end
  2665. r48
  2666. COLUBK = turfy
  2667. pfcolors:
  2668. brown
  2669. brown
  2670. brown
  2671. brown
  2672. brown
  2673. brown
  2674. brown
  2675. brown
  2676. brown
  2677. brown
  2678. brown
  2679. brown
  2680. end
  2681. playfield:
  2682. X...............................
  2683. X...........X...................
  2684. X...............................
  2685. X.....X.....................X...
  2686. X...............................
  2687. X...............................
  2688. X...............................
  2689. X...................X...........
  2690. X...............................
  2691. X..X............................
  2692. X...............X...............
  2693. end
  2694. goto room_draw_end
  2695. r49
  2696. COLUBK=turfy
  2697. pfcolors:
  2698. white
  2699. white
  2700. red + 8
  2701. red + 6
  2702. red + 4
  2703. white
  2704. white
  2705. white
  2706. white
  2707. green
  2708. green
  2709. red
  2710. end
  2711. playfield:
  2712. ................................
  2713. ................................
  2714. .......XXXXXXXXXXXXXXXXXX.......
  2715. ......XXXXXXXXXXXXXXXXXXXX......
  2716. .....XXXXXXXXXXXXXXXXXXXXXX.....
  2717. ......XXXXXXXXXXXXXXXXXXXX......
  2718. ......XXX..XXX...XXXX..XXX......
  2719. ......XXXXXXXX...XXXXXXXXX......
  2720. ................................
  2721. ................................
  2722. ................................
  2723. end
  2724. COLUPF=red
  2725. goto room_draw_end
  2726. r50
  2727. COLUBK = sand + 0
  2728. pfcolors:
  2729. riverblue
  2730. riverblue
  2731. riverblue
  2732. riverblue
  2733. seablue + 8
  2734. seablue + 7
  2735. seablue + 6
  2736. seablue + 5
  2737. seablue + 4
  2738. seablue + 3
  2739. seablue
  2740. riverblue
  2741. end
  2742. playfield:
  2743. ..............................XX
  2744. .............................XXX
  2745. ...........................XXXXX
  2746. .........................XXXXXXX
  2747. ........................XXXXXXXX
  2748. ......................XXXXXXXXXX
  2749. .....................XXXXXXXXXXX
  2750. ...................XXXXXXXXXXXXX
  2751. ..................XXXXXXXXXXXXXX
  2752. ..................XXXXXXXXXXXXXX
  2753. .................XXXXXXXXXXXXXXX
  2754. ................XXXXXXXXXXXXXXXX
  2755. end
  2756. goto room_draw_end
  2757. r51
  2758. rem 'black ship top
  2759. COLUBK = seablue + 2
  2760. pfcolors:
  2761. white
  2762. white
  2763. white
  2764. white
  2765. white
  2766. white
  2767. black
  2768. black
  2769. black
  2770. black
  2771. black
  2772. black
  2773. end
  2774. playfield:
  2775. .............XXXXXXXXXXXXX......
  2776. ...........XXXXXXXXXXXXXXX......
  2777. ..........XXXXXXXXXXXXXXXX......
  2778. ........XXXXXXXXXXXXXXXXXX......
  2779. ......XXXXXXXXXXXXXXXXXXXX......
  2780. .....XXXXXXXXXXXXXXXXXXXXX......
  2781. ...............XX...............
  2782. ....XXXXXXXXXXXXXXXXXXXXXXXXXX..
  2783. ...XX..........XX............XX.
  2784. ..XXX..........XX............XX.
  2785. .XXXX..........XX............XXX
  2786. end
  2787. goto room_draw_end
  2788. r52
  2789. COLUBK = sand
  2790. pfcolors:
  2791. seablue
  2792. seablue
  2793. seablue
  2794. seablue
  2795. seablue
  2796. seablue
  2797. seablue
  2798. seablue
  2799. seablue
  2800. seablue
  2801. seablue
  2802. seablue
  2803. end
  2804. playfield:
  2805. XX..............................
  2806. XXX.............................
  2807. XXXX............................
  2808. XXXXX...........................
  2809. XXXXXXX.........................
  2810. XXXXXXXXXXX.....................
  2811. XXXXXXXXXXXXXX..................
  2812. XXXXXXXXXXXXXXXXX...............
  2813. XXXXXXXXXXXXXXXXXXXXX...........
  2814. XXXXXXXXXXXXXXXXXXXXXXXXXX......
  2815. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  2816. end
  2817. goto room_draw_end
  2818. r53
  2819. COLUBK = sand
  2820. pfcolors:
  2821. green
  2822. green
  2823. green
  2824. brown
  2825. brown
  2826. brown
  2827. brown
  2828. seablue
  2829. seablue
  2830. seablue
  2831. seablue
  2832. green
  2833. end
  2834. playfield:
  2835. ................................
  2836. ......XXX..XXX......XXX..XXX....
  2837. .....X...XX...X....X...XX...X...
  2838. .........XX............XX.......
  2839. ........XX............XX........
  2840. .......XX............XX.........
  2841. ......XX............XX..........
  2842. ................................
  2843. ................................
  2844. ................................
  2845. XX..............................
  2846. end
  2847. goto room_draw_end
  2848. r54
  2849. COLUBK = turfy
  2850. pfcolors:
  2851. gray
  2852. gray
  2853. gray
  2854. gray
  2855. gray
  2856. gray
  2857. gray
  2858. gray
  2859. gray
  2860. gray
  2861. seablue
  2862. gray
  2863. end
  2864. if quest_flags{3} then goto r54_open
  2865. playfield:
  2866. ..XX.XXXXXX.XXXXXXXX.XXXXXX.XX..
  2867. ..XX.XXXXXXXXXX..XXXXXXXXXX.XX..
  2868. ..XXXXX.XXXXXXX..XXXXXXX.XXXXX..
  2869. ..XXXXX.XXX.XXXXXXXX.XXX.XXXXX..
  2870. ..XX.XXXXXX.XXXXXXXX.XXXXXX.XX..
  2871. ..XX.XXXXXXXX.XX...XXXXXXXX.XX..
  2872. ..XXXXX.XXXXXXX.X.X.XXXX.XXXX...
  2873. ...XXXX.XXX.XX.X.X.X.XXX.XXX....
  2874. ....XXXXXXX.XX.X.X.X.XXXXXX.....
  2875. ......XXXXXXXXXXXXXXXXXXX.....XX
  2876. ..............................XX
  2877. end
  2878. goto room_draw_end
  2879. r54_open
  2880. playfield:
  2881. ..XX.XXXXXX.XXXXXXXXXX.....XXX..
  2882. ..XX.XXXXXXXX...........XXXXXX..
  2883. ..XXXXX.XXXXX........XXX.XXXXX..
  2884. ..XXXXX.XXX.X.....XXXXXX.XXXXX..
  2885. ..XX.XXXXXX.X...XXXX.XXXXXX.XX..
  2886. ..XX.XXXXXXXX......XXXXXXXX.XX..
  2887. ..XXXXX.XXXXXXX..XXXXXXX.XXXX...
  2888. ...XXXX.XXX.XX....XX.XXX.XXX....
  2889. ....XXXXXXX.XX....XX.XXXXXX.....
  2890. ......XXXXXXXX....XXXXXXX.....XX
  2891. ..............................XX
  2892. end
  2893. goto room_draw_end
  2894. r55
  2895. COLUBK = sand
  2896. pfcolors:
  2897. red
  2898. red
  2899. white
  2900. white
  2901. white
  2902. white
  2903. red
  2904. red
  2905. seablue
  2906. seablue
  2907. seablue
  2908. seablue
  2909. end
  2910. if quest_flags{7} then goto r55_open
  2911. playfield:
  2912. ...XX..........................X
  2913. ...............................X
  2914. .......XXXXXXX.................X
  2915. ......XXXXXXXXX................X
  2916. .......X.X.X.X.................X
  2917. ...............................X
  2918. ...............................X
  2919. ..................XXXXXXXXXXXXXX
  2920. ...XXXX.........XXXX......XXXXXX
  2921. XXXXXXXXX...XXXXXXXXXX...XXXXXXX
  2922. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  2923. end
  2924. goto room_draw_end
  2925. r55_open
  2926. playfield:
  2927. ...XX..........................X
  2928. ...............................X
  2929. .......XXXXXXX.................X
  2930. ......XXXXXXXXX................X
  2931. .......X.X.X.X.................X
  2932. ...............................X
  2933. ...............................X
  2934. ............................XXXX
  2935. ...XXXX.........XXXX......XXXXXX
  2936. XX..XX...........X...........XXX
  2937. XX.............................X
  2938. end
  2939. goto room_draw_end
  2940. r56
  2941. rem 'Shield on island
  2942. COLUBK = sand
  2943. pfcolors:
  2944. seablue
  2945. seablue
  2946. seablue
  2947. seablue
  2948. seablue
  2949. seablue
  2950. seablue
  2951. seablue
  2952. seablue
  2953. seablue
  2954. seablue
  2955. seablue
  2956. end
  2957. if !quest_flags{6} then goto r56_closed
  2958. playfield:
  2959. X...............................
  2960. X...............................
  2961. XXX.............................
  2962. XXXXX...........................
  2963. XXXXX..XX.......................
  2964. XXXXX..XXXXXXX..................
  2965. XXXX....XXXXXXXXXX..............
  2966. XXX......XXXXXXXXXXXX...........
  2967. XXX......XXXXXXXXXXXXXXXXX......
  2968. XXXX....XXXXXXXXXXXXXXXXXXXXXXXX
  2969. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  2970. end
  2971. goto room_draw_end
  2972. r56_closed
  2973. playfield:
  2974. X...............................
  2975. X...............................
  2976. XXX.............................
  2977. XXXXXX..........................
  2978. XXXXXXXXX.......................
  2979. XXXXXXXXXXXXXX..................
  2980. XXXX....XXXXXXXXXX..............
  2981. XXX......XXXXXXXXXXXX...........
  2982. XXX......XXXXXXXXXXXXXXXXX......
  2983. XXXX....XXXXXXXXXXXXXXXXXXXXXXXX
  2984. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  2985. end
  2986. r56_end
  2987. goto room_draw_end
  2988. r57
  2989. COLUBK = sand
  2990. pfcolors:
  2991. red
  2992. red
  2993. red
  2994. red
  2995. red
  2996. red
  2997. red
  2998. red
  2999. seablue
  3000. seablue
  3001. seablue
  3002. seablue
  3003. end
  3004. playfield:
  3005. ................................
  3006. ................................
  3007. ................................
  3008. ................................
  3009. ................................
  3010. ......................X.........
  3011. .....................XXX........
  3012. ................................
  3013. .....XXXX...XXXXXX.......XXXX...
  3014. XXXXXXXXXXXXXXXXXXXX...XXXXXXXXX
  3015. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3016. end
  3017. goto room_draw_end
  3018. r58
  3019. COLUBK = sand
  3020. pfcolors:
  3021. seablue
  3022. seablue
  3023. seablue
  3024. seablue
  3025. seablue
  3026. seablue
  3027. seablue
  3028. seablue
  3029. seablue
  3030. seablue
  3031. seablue
  3032. seablue
  3033. end
  3034. if quest_flags{2} goto r58_open
  3035. playfield:
  3036. ................XXXXXXXXXXXXXXXX
  3037. ................XXXXXXXXXXXXXXXX
  3038. ...............XXXXXXXXXXXXXXXXX
  3039. ..............XXXXXXXXXXXXXXXXXX
  3040. ..............XXXXXXXXXXXXXXXXXX
  3041. .............XXXXXXXXXXXXXXXXXXX
  3042. ..........XXXXXXXXXXXXXXXXXXXXXX
  3043. ........XXXXXXXXXXXXXXXXXXXXXXXX
  3044. ....XXXXXXXXXXXXXXXXXXXXXXXX....
  3045. XXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
  3046. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3047. end
  3048. goto room_draw_end
  3049. r58_open
  3050. playfield:
  3051. ................XXXXXXXXXXXXXXXX
  3052. ...................XXXXXXXXXXXXX
  3053. .....................XXXXXXXXXXX
  3054. .......................XXXXXXXXX
  3055. .........................XXXXXXX
  3056. ...........................XXXXX
  3057. .............................XXX
  3058. ................................
  3059. ................................
  3060. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3061. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3062. end
  3063. goto room_draw_end
  3064. r59
  3065. COLUBK = seablue + 1
  3066. pfcolors:
  3067. black
  3068. black
  3069. black
  3070. black
  3071. black
  3072. black
  3073. black
  3074. black
  3075. black
  3076. black
  3077. seablue
  3078. black
  3079. end
  3080. rem 'black ship bottom, when switch3 isn't pressed
  3081. if quest_flags{3} goto black_ship_open
  3082. playfield:
  3083. .XXXX..XX......XX...XXXXX....XXX
  3084. XXXXX...............X...X....XXX
  3085. .XXXX........................XXX
  3086. ..XXX......................XXXX.
  3087. ...XXXXXXXXXXXX...XXXXXXXXXXXXX.
  3088. ....XXXXXXXXXXX...XXXXXXXXXXXXX.
  3089. XXXXXXXXXXXXXXX...XXXXXXXXXXXX..
  3090. ..................XX............
  3091. ..................XX............
  3092. XXXXXXXXXXXXXXXXXXXX............
  3093. XXXXXXXXXXXXXXXXXXXX............
  3094. end
  3095. goto black_ship_end
  3096. black_ship_open
  3097. playfield:
  3098. .XXXX..XX......XX...XXXXX....XX.
  3099. XXXXX...............X...X....XX.
  3100. .XXXX........................XX.
  3101. ..XXX........................XX.
  3102. ...XXXXXXXXXXXX...XXXXXXXXXXXX..
  3103. ....XXXXXXXXXXX...XXXXXXXXXXXX..
  3104. XXXXXXXXXXXXXXX...XXXXXXXXXXXXXX
  3105. ................................
  3106. ................................
  3107. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3108. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3109. end
  3110. black_ship_end
  3111. goto room_draw_end
  3112. r60
  3113. rem 'Boss 3, Kraken room.
  3114. COLUBK = black
  3115. pfcolors:
  3116. seablue
  3117. seablue
  3118. seablue
  3119. seablue
  3120. seablue
  3121. seablue
  3122. seablue
  3123. seablue
  3124. seablue
  3125. seablue
  3126. seablue
  3127. seablue
  3128. end
  3129. playfield:
  3130. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3131. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3132. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3133. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3134. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3135. XX............................XX
  3136. XX............................XX
  3137. ..............................XX
  3138. ..............................XX
  3139. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3140. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3141. end
  3142. goto room_draw_end
  3143. r61
  3144. COLUBK = sand
  3145. pfcolors:
  3146. riverblue
  3147. riverblue
  3148. riverblue
  3149. riverblue
  3150. seablue + 8
  3151. seablue + 8
  3152. seablue + 4
  3153. seablue + 4
  3154. seablue + 2
  3155. seablue + 2
  3156. seablue
  3157. seablue
  3158. end
  3159. if !hero_items{5} then goto r61_closed
  3160. playfield:
  3161. X...............................
  3162. X...............................
  3163. XXX.............................
  3164. XXXXX...........................
  3165. XXXXX..XX.......................
  3166. XXXXX..XXXXXXX..................
  3167. XXXX....XXXXXXXXXX..............
  3168. XXX......X..XXXXXXXXX...........
  3169. XXX......XXX..XX..XXXXXXXX......
  3170. XXXX....XXXXXX..XXXXXXXXXXXXXXXX
  3171. XXXXXXXXXXXX..XX..XXXXXXXXXXXXXX
  3172. end
  3173. goto room_draw_end
  3174. r61_closed
  3175. playfield:
  3176. XX..............................
  3177. XXXXX...........................
  3178. XXXXXXXX........................
  3179. XXXXXXXXXXXX....................
  3180. XXXXXXXXXXXXXX..................
  3181. XXXXXXXXXXXXXXXX................
  3182. XXXX....XXXXXXXXXX..............
  3183. XXX......XXXXXXXXXXXX...........
  3184. XXX......XXXXXXXXXXXXXXXXX......
  3185. XXXX....XXXXXXXXXXXXXXXXXXXXXXXX
  3186. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3187. end
  3188. goto room_draw_end
  3189. r62
  3190. COLUBK = sand
  3191. pfcolors:
  3192. seablue
  3193. seablue
  3194. seablue
  3195. seablue
  3196. seablue
  3197. seablue
  3198. seablue
  3199. seablue
  3200. seablue
  3201. seablue
  3202. seablue
  3203. seablue
  3204. end
  3205. playfield:
  3206. ...............................X
  3207. ..............................XX
  3208. ..............................XX
  3209. ............................XXXX
  3210. .............................XXX
  3211. ............................XXXX
  3212. ..........................XXXXXX
  3213. .........................XXXXXXX
  3214. ...XXX......XXXXX.......XXXXXXXX
  3215. XXXXXXXX..XXXXXXXXXX...XXXXXXXXX
  3216. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3217. end
  3218. goto room_draw_end
  3219. r63
  3220. COLUBK = sand
  3221. pfcolors:
  3222. seablue
  3223. seablue
  3224. seablue
  3225. seablue
  3226. seablue
  3227. seablue
  3228. seablue
  3229. seablue
  3230. seablue
  3231. seablue
  3232. seablue
  3233. seablue
  3234. end
  3235. playfield:
  3236. XX.............................X
  3237. XX............................XX
  3238. XX............................XX
  3239. XXX.........................XXXX
  3240. XXX..........................XXX
  3241. XXX.........................XXXX
  3242. XXXX......................XXXXXX
  3243. XXXX.....................XXXXXXX
  3244. XXXXXXX.....XXXXX.......XXXXXXXX
  3245. XXXXXXXXXXXXXXXXXXXX...XXXXXXXXX
  3246. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  3247. end
  3248. goto room_draw_end
  3249. rem 'Item sprites as well as initial data for item and sprites are in bank 4
  3250. rem 'Items/monsters/mobiles in any given room
  3251. rem '8 items per line means it corresponds with map layout
  3252. data room_items
  3253. monster_leaf2_boss, monster_leaf1_boss, monster_bat, item_switch4
  3254. monster_zombie, item_victory, monster_treant, monster_wolf
  3255. item_switch1, monster_mushroom, monster_scorpio, monster_mushroom
  3256. monster_zombie, monster_ikaza, monster_wolf, monster_treant,
  3257. monster_sword_boss, monster_scorpio, monster_grunt, monster_fish,
  3258. monster_knight, monster_armor_boss, item_switch2, monster_curse
  3259. item_switch7, monster_archer, monster_grunt, monster_rabid
  3260. monster_archer, monster_grunt, monster_lion, monster_snake
  3261. item_none, monster_mushroom, monster_grunt, monster_fish,
  3262. monster_cannon, monster_cannon, monster_mage, monster_lion,
  3263. monster_scorpio, monster_slime, monster_bat, monster_snake
  3264. monster_archer, monster_knight, monster_spider, monster_mushroom
  3265. monster_flower, item_healhp, monster_slime, item_switch3,
  3266. monster_scorpio, monster_crab, item_none, monster_fish
  3267. item_shield, monster_crab, monster_scorpio, item_none,
  3268. monster_leaf3_boss, item_switch6, monster_crab, monster_strike_boss
  3269. end
  3270. data item_hplist
  3271. 4, 4, 8, 8, 8, 16, 16, 16, 16, 32, 32, 32, 32, 64, 32, 32
  3272. 64, 80,100, 4, 64, 32, 64, 64, 64, 80, 80, 80, 80,100,100,120
  3273. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
  3274. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
  3275. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
  3276. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
  3277. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
  3278. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
  3279. end
  3280. rem 'Shorthand for the center of screen positions.
  3281. const hc=73
  3282. const vc=49
  3283. data item_xlist
  3284. hc, hc, 84, 37,109, 70, hc - 8, hc,
  3285. hc, hc, hc, 37, hc, hc, hc, hc,
  3286. hc,113,113, 37, hc + 12, hc, hc, hc,
  3287. hc, hc, 63,113, hc,120, hc, hc,
  3288. hc, 37, 90, 37, 53, 53, hc, hc,
  3289. 77, hc, hc,123, 66, hc, hc, 61,
  3290. hc, hc, hc,113, hc, hc, hc, hc,
  3291. 37, hc, 37, 37, hc, 37, hc, hc,
  3292. end
  3293. data item_ylist
  3294. vc, vc, vc, 25, 70, 65, vc, vc,
  3295. vc, vc, vc, vc, vc, vc, vc, vc + 4,
  3296. vc, vc, vc, vc, vc + 1, vc, vc, vc + 8,
  3297. vc, vc, 70, vc, vc + 8, vc, vc, vc - 16,
  3298. vc, 29, 70, vc, 41, 41, vc, vc,
  3299. 33, vc, vc, vc, 70, 25, vc, vc,
  3300. vc, 55, vc, 80, vc, vc, vc, vc,
  3301. 73, vc, vc, vc, vc, 73, vc, vc,
  3302. end
  3303. item_setup
  3304. item_kind = room_items[hero_room]
  3305. gosub item_setup_kind
  3306. goto item_setup_done
  3307. rem 'You must set item_kind before gosubbing to this one
  3308. item_setup_kind
  3309. rem 'Initialize item/mobile, and it's position, HP and speed
  3310. rem 'First, handle switches
  3311. if item_kind < item_switch1 then goto item_switch_end
  3312. if item_kind > item_switch7 then goto item_switch_end
  3313. rem 'set switch to on if needed
  3314. if quest_flags{1} && item_kind = item_switch1 then item_kind = item_kind + item_switch_on
  3315. if quest_flags{2} && item_kind = item_switch2 then item_kind = item_kind + item_switch_on
  3316. if quest_flags{3} && item_kind = item_switch3 then item_kind = item_kind + item_switch_on
  3317. if quest_flags{4} && item_kind = item_switch4 then item_kind = item_kind + item_switch_on
  3318. if quest_flags{5} && item_kind = item_switch5 then item_kind = item_kind + item_switch_on
  3319. if quest_flags{6} && item_kind = item_switch6 then item_kind = item_kind + item_switch_on
  3320. if quest_flags{7} && item_kind = item_switch7 then item_kind = item_kind + item_switch_on
  3321. item_switch_end
  3322. rem 'Next, handle bosses that may already be dead.
  3323. rem 'Ikaza
  3324. if item_kind < monster_leaf1_boss then goto item_boss_end
  3325. if item_kind > monster_ikaza then goto item_boss_end
  3326. if quest_flags{0} && item_kind = monster_ikaza then item_kind = item_none
  3327. rem 'Leaf 1 dropped by boss 1
  3328. if hero_items{0} && item_kind = monster_leaf1_boss then item_kind = item_none
  3329. rem 'Leaf 2 dropped by boss 2
  3330. if hero_items{1} && item_kind = monster_leaf2_boss then item_kind = item_none
  3331. rem 'Leaf 3 dropped by boss 3
  3332. if hero_items{2} && item_kind = monster_leaf3_boss then item_kind = item_none
  3333. rem 'Armor Dropped by armor boss
  3334. if hero_items{4} && item_kind = monster_armor_boss then item_kind = item_none
  3335. rem 'Sword dropped by sword boss
  3336. if hero_items{5} && item_kind = monster_sword_boss then item_kind = item_none
  3337. rem 'Strike book dropped by strike book boss
  3338. if hero_items{7} && item_kind = monster_strike_boss then item_kind = item_none
  3339. rem 'Heal book and shield are not dropped by a boss, but just found
  3340. item_boss_end
  3341. rem 'Finally handle the case of the shield and the heal book that should drop only once
  3342. if hero_items{3} && item_kind = item_shield then item_kind = item_none
  3343. if hero_items{6} && item_kind = item_bookheal then item_kind = item_none
  3344. temp1 = item_kind_mask & item_kind
  3345. item_hp = item_hplist[temp1]
  3346. if temp1 > 31 then goto item_draw_32
  3347. on temp1 goto i00 i01 i02 i03 i04 i05 i06 i07 i08 i09 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31
  3348. goto item_draw_done
  3349. item_draw_32
  3350. temp1 = temp1 - 32
  3351. on temp1 goto i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63
  3352. item_draw_done
  3353. if item_kind <> item_none then goto item_not_none
  3354. item_x = nowhere
  3355. item_oldx = nowhere
  3356. item_y = nowhere
  3357. item_oldy = nowhere
  3358. return
  3359. item_not_none
  3360. rem temp1 = item_kind & item_kind_mask
  3361. rem 'look up location in table.
  3362. item_oldx = item_xlist[hero_room]
  3363. item_x = item_xlist[hero_room]
  3364. item_oldy = item_ylist[hero_room]
  3365. item_y = item_ylist[hero_room]
  3366. return
  3367. i00
  3368. COLUP1=black
  3369. player1:
  3370. %10000001
  3371. %01000010
  3372. %00100100
  3373. %00011000
  3374. %00011000
  3375. %00100100
  3376. %01000010
  3377. %10000001
  3378. end
  3379. goto item_draw_done
  3380. i01
  3381. COLUP1=black
  3382. player1:
  3383. %01111100
  3384. %11111110
  3385. %11010110
  3386. %01111100
  3387. %00111000
  3388. end
  3389. goto item_draw_done
  3390. i02
  3391. COLUP1=red
  3392. player1:
  3393. %00100100
  3394. %01011010
  3395. %10111101
  3396. %01111110
  3397. %01011010
  3398. %01000010
  3399. %10100101
  3400. %10100101
  3401. end
  3402. goto item_draw_done
  3403. i03
  3404. rem 'bat.xpm
  3405. player1:
  3406. %01000010
  3407. %10000001
  3408. %10011001
  3409. %10111101
  3410. %11111111
  3411. %11100111
  3412. %11000011
  3413. %01000010
  3414. end
  3415. goto item_draw_done
  3416. i04
  3417. rem 'scorpio.xpm
  3418. player1:
  3419. %00101000
  3420. %00010010
  3421. %00011111
  3422. %00111100
  3423. %01100101
  3424. %10000010
  3425. %10010001
  3426. %01100000
  3427. end
  3428. goto item_draw_done
  3429. i05
  3430. COLUP1=black
  3431. rem 'rabid.xpm
  3432. player1:
  3433. %00011000
  3434. %00111100
  3435. %01111110
  3436. %11011011
  3437. %11111111
  3438. %01111110
  3439. %11011011
  3440. %11000011
  3441. end
  3442. goto item_draw_done
  3443. i06
  3444. COLUP1=black
  3445. rem 'spider.xpm
  3446. player1:
  3447. %10100101
  3448. %10011001
  3449. %01011010
  3450. %00111100
  3451. %01100110
  3452. %10111101
  3453. %10100101
  3454. %00100100
  3455. end
  3456. goto item_draw_done
  3457. i07
  3458. COLUP1=black
  3459. rem 'snake.xpm
  3460. player1:
  3461. %00111110
  3462. %01000011
  3463. %00111000
  3464. %00000100
  3465. %00111000
  3466. %01000000
  3467. %00110000
  3468. %00001000
  3469. end
  3470. goto item_draw_done
  3471. i08
  3472. COLUP1=black
  3473. rem 'fish.xpm
  3474. player1:
  3475. %10001100
  3476. %11011110
  3477. %11111101
  3478. %11111110
  3479. %11111111
  3480. %11111011
  3481. %11011110
  3482. %10001100
  3483. end
  3484. goto item_draw_done
  3485. i09
  3486. COLUP1=black
  3487. rem 'lion.xpm
  3488. player1:
  3489. %11011011
  3490. %01100110
  3491. %01000010
  3492. %11111111
  3493. %11011011
  3494. %11111111
  3495. %01011010
  3496. %00100100
  3497. end
  3498. goto item_draw_done
  3499. i10
  3500. COLUP1=black
  3501. rem 'wolf.xpm
  3502. player1:
  3503. %10100101
  3504. %10100101
  3505. %01111110
  3506. %01111100
  3507. %10000111
  3508. %10001101
  3509. %10001110
  3510. %00000100
  3511. end
  3512. goto item_draw_done
  3513. i11
  3514. COLUP1=black
  3515. rem 'captain.xpm, used for monster_grunt. (captain and grunt were doubles)
  3516. player1:
  3517. %01101100
  3518. %01101100
  3519. %01101100
  3520. %01101100
  3521. %00101000
  3522. %10111011
  3523. %01111111
  3524. %01111101
  3525. %01101101
  3526. %01010100
  3527. %11111110
  3528. %00111000
  3529. %01010100
  3530. %10010010
  3531. %01111100
  3532. %00111000
  3533. end
  3534. goto item_draw_done
  3535. i12
  3536. COLUP1=black
  3537. rem 'archer.xpm
  3538. player1:
  3539. %01101100
  3540. %01101100
  3541. %01101100
  3542. %01101100
  3543. %00101010
  3544. %00110110
  3545. %01101001
  3546. %01010001
  3547. %01111111
  3548. %01010001
  3549. %01101001
  3550. %00110110
  3551. %01111110
  3552. %01010100
  3553. %01111100
  3554. %00111000
  3555. end
  3556. goto item_draw_done
  3557. i13
  3558. COLUP1=black
  3559. rem 'knight.xpm
  3560. player1:
  3561. %01101100
  3562. %01101100
  3563. %01101100
  3564. %01111100
  3565. %10111010
  3566. %11111110
  3567. %11111110
  3568. %11111110
  3569. %00111000
  3570. %01111100
  3571. %11010110
  3572. %10010010
  3573. %11111110
  3574. %01111100
  3575. %00111000
  3576. %01010100
  3577. end
  3578. goto item_draw_done
  3579. i14
  3580. COLUP1=black
  3581. rem 'cannon.xpm
  3582. player1:
  3583. %00011100
  3584. %00001000
  3585. %10001000
  3586. %11111001
  3587. %10011111
  3588. %00010001
  3589. %00010000
  3590. %00111000
  3591. end
  3592. goto item_draw_done
  3593. i15
  3594. COLUP1=black
  3595. rem 'zombie.xpm
  3596. player1:
  3597. %00101100
  3598. %01101000
  3599. %00101000
  3600. %00101100
  3601. %01101000
  3602. %10111001
  3603. %01111001
  3604. %01011001
  3605. %01111101
  3606. %01101110
  3607. %01111110
  3608. %00111000
  3609. %01011100
  3610. %01110110
  3611. %00111110
  3612. %00011000
  3613. end
  3614. goto item_draw_done
  3615. i16
  3616. COLUP1=black
  3617. rem 'skeleton.xpm
  3618. player1:
  3619. %01101100
  3620. %00101000
  3621. %00101000
  3622. %00101000
  3623. %10101010
  3624. %10010010
  3625. %10111010
  3626. %01010100
  3627. %00111000
  3628. %00010000
  3629. %00101000
  3630. %01111100
  3631. %01010100
  3632. %10010010
  3633. %01111100
  3634. %00111000
  3635. end
  3636. goto item_draw_done
  3637. i17
  3638. COLUP1=black
  3639. rem 'ghost.xpm
  3640. player1:
  3641. %10101010
  3642. %11111110
  3643. %11111110
  3644. %11111110
  3645. %01111100
  3646. %01111100
  3647. %01111100
  3648. %11111110
  3649. %11111110
  3650. %10111010
  3651. %00111000
  3652. %01111100
  3653. %11010110
  3654. %10111010
  3655. %01111100
  3656. %00111000
  3657. end
  3658. goto item_draw_done
  3659. i18
  3660. COLUP1=black
  3661. rem 'bitmap/mage.xpm
  3662. player1:
  3663. %00101001
  3664. %01111101
  3665. %01111101
  3666. %01111101
  3667. %00111001
  3668. %10111011
  3669. %10010011
  3670. %01111101
  3671. %00010001
  3672. %00111001
  3673. %01111101
  3674. %01010101
  3675. %01111101
  3676. %00111001
  3677. %00111010
  3678. %00010001
  3679. end
  3680. goto item_draw_done
  3681. i19
  3682. COLUP1=black
  3683. rem 'flower.xpm
  3684. player1:
  3685. %00010000
  3686. %00111000
  3687. %01010100
  3688. %00010000
  3689. %00101000
  3690. %01000100
  3691. %00101000
  3692. %00010000
  3693. end
  3694. goto item_draw_done
  3695. i20
  3696. COLUP1=black
  3697. rem 'treant.xpm
  3698. player1:
  3699. %10101010
  3700. %01111100
  3701. %00111000
  3702. %00111000
  3703. %00111000
  3704. %00111000
  3705. %00111000
  3706. %00111000
  3707. %01111000
  3708. %10111100
  3709. %00111010
  3710. %01111000
  3711. %10111100
  3712. %00010010
  3713. %00110000
  3714. %01001000
  3715. end
  3716. goto item_draw_done
  3717. i21
  3718. COLUP1=black
  3719. rem 'muschroom.xpm
  3720. player1:
  3721. %01111110
  3722. %00111100
  3723. %00011000
  3724. %00011000
  3725. %00011000
  3726. %11111111
  3727. %01111110
  3728. %00111100
  3729. end
  3730. goto item_draw_done
  3731. i22
  3732. COLUP1=black
  3733. rem 'book.xpm
  3734. player1:
  3735. %11111111
  3736. %10100101
  3737. %10100101
  3738. %10010101
  3739. %11001101
  3740. %10110101
  3741. %10000101
  3742. %11111111
  3743. end
  3744. goto item_draw_done
  3745. i23
  3746. COLUP1=black
  3747. rem 'sword.xpm. It's a fake Numen Sword that hurts the one who touches it.
  3748. player1:
  3749. %10010000
  3750. %01100000
  3751. %01110000
  3752. %10111000
  3753. %00011100
  3754. %00001110
  3755. %00000111
  3756. %00000011
  3757. end
  3758. goto item_draw_done
  3759. i24
  3760. COLUP1=black
  3761. rem 'Curse, entrance blocking item
  3762. player1:
  3763. %00111100
  3764. %01111110
  3765. %11111111
  3766. %11111111
  3767. %11111111
  3768. %11111111
  3769. %11111111
  3770. %11111111
  3771. %11111111
  3772. %11000111
  3773. %11000111
  3774. %11111111
  3775. %10010011
  3776. %10010011
  3777. %10010011
  3778. %11111111
  3779. %11111111
  3780. %11111111
  3781. %11111111
  3782. %11111111
  3783. %11111111
  3784. %11111111
  3785. %01111110
  3786. %00111100
  3787. end
  3788. goto item_draw_done
  3789. i25
  3790. COLUP1=black
  3791. rem 'boss1.xpm
  3792. player1:
  3793. %01000100
  3794. %10101010
  3795. %10101010
  3796. %01000100
  3797. %01000100
  3798. %00000000
  3799. %00101000
  3800. %00111000
  3801. %01111100
  3802. %11111110
  3803. %11010110
  3804. %10111010
  3805. %11111110
  3806. %01111101
  3807. %01111100
  3808. %01111100
  3809. %01111100
  3810. %10111010
  3811. %00111000
  3812. %01111000
  3813. %00111000
  3814. %00010100
  3815. %00010000
  3816. %00010000
  3817. end
  3818. goto item_draw_done
  3819. i26
  3820. COLUP1=black
  3821. rem 'boss2.xpm
  3822. player1:
  3823. %01011010
  3824. %01011010
  3825. %01011010
  3826. %10011001
  3827. %10111101
  3828. %10011001
  3829. %10111101
  3830. %10011001
  3831. %10011001
  3832. %10111101
  3833. %11011011
  3834. %10111101
  3835. %10111101
  3836. %11100111
  3837. %11000011
  3838. %10011001
  3839. %10100101
  3840. %10011001
  3841. %10111101
  3842. %10100101
  3843. %10000001
  3844. %01000010
  3845. %01000010
  3846. %01000010
  3847. end
  3848. goto item_draw_done
  3849. i27
  3850. COLUP1=black
  3851. rem 'boss3.xpm
  3852. player1:
  3853. %10100101
  3854. %10100101
  3855. %10100101
  3856. %10100101
  3857. %10100101
  3858. %10100101
  3859. %10111101
  3860. %01111110
  3861. %11011011
  3862. %10011001
  3863. %10011001
  3864. %10011001
  3865. %10011001
  3866. %11011011
  3867. %11111111
  3868. %01111110
  3869. %01111110
  3870. %01111110
  3871. %00111100
  3872. %00111100
  3873. %00111100
  3874. %00011000
  3875. %00011000
  3876. %00011000
  3877. end
  3878. goto item_draw_done
  3879. i28
  3880. COLUP1=black
  3881. rem 'armorboss.xpm
  3882. player1:
  3883. %00011000
  3884. %00111100
  3885. %01011010
  3886. %01111110
  3887. %00011000
  3888. %00111100
  3889. %10111101
  3890. %11111111
  3891. %01111110
  3892. %01111110
  3893. %11011011
  3894. %11100111
  3895. %11111111
  3896. %01011010
  3897. %01100110
  3898. %11111111
  3899. %10111101
  3900. %00111100
  3901. %00111100
  3902. %00001000
  3903. %00011000
  3904. %00010000
  3905. %00001000
  3906. %00001000
  3907. end
  3908. goto item_draw_done
  3909. i29
  3910. COLUP1=black
  3911. rem 'Sword boss is a player frame
  3912. player1:
  3913. %01101100
  3914. %01101100
  3915. %01111100
  3916. %01111100
  3917. %10111010
  3918. %01111100
  3919. %10111010
  3920. %11111110
  3921. %11010110
  3922. %11010110
  3923. %11111110
  3924. %01111100
  3925. %00111000
  3926. end
  3927. goto item_draw_done
  3928. i30
  3929. COLUP1=black
  3930. rem 'Strike boss is a one point sprite which is difficult to hit
  3931. player1:
  3932. %00010000
  3933. end
  3934. goto item_draw_done
  3935. i31
  3936. rem 'ikaza.xpm
  3937. rem 'ikaza.xpm
  3938. player1:
  3939. %00101000
  3940. %11111110
  3941. %01111100
  3942. %01111100
  3943. %00111000
  3944. %10111010
  3945. %11010110
  3946. %01111100
  3947. %01010100
  3948. %00111000
  3949. %01111100
  3950. %11010110
  3951. %10111010
  3952. %01111100
  3953. %01111100
  3954. %01010100
  3955. end
  3956. goto item_draw_done
  3957. i32
  3958. i33
  3959. i34
  3960. rem 'leaf.xpm
  3961. player1:
  3962. %00000000
  3963. %00000000
  3964. %00111000
  3965. %01111100
  3966. %11111111
  3967. %01111100
  3968. %00111000
  3969. %00000000
  3970. end
  3971. goto item_draw_done
  3972. i35
  3973. rem 'armor.xpm
  3974. player1:
  3975. %01111110
  3976. %01011010
  3977. %10100101
  3978. %11011011
  3979. %11111111
  3980. %01111110
  3981. %00011000
  3982. %00000000
  3983. end
  3984. goto item_draw_done
  3985. i36
  3986. rem 'shield.xpm
  3987. player1:
  3988. %00010000
  3989. %00111000
  3990. %01010100
  3991. %11010110
  3992. %10111010
  3993. %11010110
  3994. %10010010
  3995. %11111110
  3996. end
  3997. goto item_draw_done
  3998. i37
  3999. rem 'sword.xpm
  4000. player1:
  4001. %10010000
  4002. %01100000
  4003. %01110000
  4004. %10111000
  4005. %00011100
  4006. %00001110
  4007. %00000111
  4008. %00000011
  4009. end
  4010. goto item_draw_done
  4011. i38
  4012. rem 'healbook.xpm
  4013. player1:
  4014. %11111110
  4015. %10000010
  4016. %10000010
  4017. %10010010
  4018. %10111010
  4019. %10101010
  4020. %10000010
  4021. %11111110
  4022. end
  4023. goto item_draw_done
  4024. i39
  4025. rem 'strikebook.xpm
  4026. player1:
  4027. %11111110
  4028. %10010010
  4029. %10001010
  4030. %11111110
  4031. %10100010
  4032. %10010010
  4033. %10001010
  4034. %11111110
  4035. end
  4036. goto item_draw_done
  4037. i40
  4038. rem 'healhp.xpm
  4039. player1:
  4040. %00000000
  4041. %00000000
  4042. %00010000
  4043. %00111000
  4044. %01111100
  4045. %01111100
  4046. %00101000
  4047. %00000000
  4048. end
  4049. goto item_draw_done
  4050. i41
  4051. rem 'healmp.xpm
  4052. player1:
  4053. %00000000
  4054. %00000000
  4055. %00010000
  4056. %01010100
  4057. %10111010
  4058. %01010100
  4059. %00010000
  4060. %00000000
  4061. end
  4062. goto item_draw_done
  4063. i42
  4064. rem 'healallhp.xpm
  4065. player1:
  4066. %00000000
  4067. %00010000
  4068. %00111000
  4069. %01111100
  4070. %11111110
  4071. %11111110
  4072. %01101100
  4073. %00000000
  4074. end
  4075. goto item_draw_done
  4076. i43
  4077. rem 'healallmp.xpm
  4078. player1:
  4079. %00000000
  4080. %00010000
  4081. %01010100
  4082. %10111010
  4083. %10010010
  4084. %10111010
  4085. %01010100
  4086. %00010000
  4087. end
  4088. goto item_draw_done
  4089. i44
  4090. i45
  4091. i46
  4092. i47
  4093. i48
  4094. i49
  4095. i50
  4096. rem 'bitmap/switch.xpm
  4097. player1:
  4098. %00000000
  4099. %11111111
  4100. %00111110
  4101. %00001000
  4102. %00010000
  4103. %00100000
  4104. %11000000
  4105. %11000000
  4106. end
  4107. goto item_draw_done
  4108. i51
  4109. i52
  4110. i53
  4111. i54
  4112. i55
  4113. i56
  4114. i57
  4115. rem 'bitmap/switch_on.xpm
  4116. player1:
  4117. %00000000
  4118. %11111111
  4119. %01111100
  4120. %00010000
  4121. %00001000
  4122. %00000100
  4123. %00000011
  4124. %00000011
  4125. end
  4126. goto item_draw_done
  4127. i58
  4128. i59
  4129. i60
  4130. i61
  4131. i62
  4132. COLUP1=black
  4133. player1:
  4134. %10000001
  4135. %01000010
  4136. %00100100
  4137. %00011000
  4138. %00011000
  4139. %00100100
  4140. %01000010
  4141. %10000001
  4142. end
  4143. goto item_draw_done
  4144. i63
  4145. COLUP1=pink
  4146. player1:
  4147. %00011100
  4148. %11111110
  4149. %01111100
  4150. %10111000
  4151. %10111110
  4152. %10011110
  4153. %10111000
  4154. %11111100
  4155. %11110100
  4156. %11110110
  4157. %11111110
  4158. %01111100
  4159. %00111000
  4160. end
  4161. goto item_draw_done
  4162. rem ' Bank 5 contains the game over, game win and game intro, screen
  4163. rem 'as well as a music playing routine for them.
  4164. const music_which_intro=0
  4165. const music_which_gameover=1
  4166. const music_which_victory=2
  4167. game_over
  4168. gosub music_restart
  4169. music_which=music_which_gameover
  4170. COLUBK = red
  4171. hero_x=70
  4172. hero_y=80
  4173. player0:
  4174. %1000001
  4175. %1000001
  4176. %1000010
  4177. %1111110
  4178. %1000001
  4179. %1111110
  4180. %0000000
  4181. %1111111
  4182. %1000000
  4183. %1111111
  4184. %1000000
  4185. %1111111
  4186. %0000000
  4187. %0001000
  4188. %0010100
  4189. %0100010
  4190. %1000001
  4191. %1000001
  4192. %0000000
  4193. %0011100
  4194. %0100010
  4195. %1000001
  4196. %1000001
  4197. %0100010
  4198. %0011100
  4199. %0000000
  4200. %0000000
  4201. %0000000
  4202. %0000000
  4203. %0000000
  4204. %0000000
  4205. %0000000
  4206. %0000000
  4207. %1111111
  4208. %1000000
  4209. %1111111
  4210. %1000000
  4211. %1111111
  4212. %0000000
  4213. %1000001
  4214. %1000001
  4215. %1001001
  4216. %1010101
  4217. %1100011
  4218. %1000001
  4219. %0000000
  4220. %1000001
  4221. %1000001
  4222. %1111111
  4223. %0100010
  4224. %0010100
  4225. %0001000
  4226. %0000000
  4227. %0011110
  4228. %0100010
  4229. %1000111
  4230. %1000000
  4231. %0100010
  4232. %0011100
  4233. end
  4234. game_over_loop
  4235. rem 'Teleport to Sygne's home on reset button, with some losses
  4236. if !switchreset then goto reset_go_end
  4237. hero_room=room_start
  4238. hero_x=hero_start_x
  4239. hero_oldx=hero_start_x
  4240. hero_y=hero_start_y
  4241. hero_oldy=hero_start_x
  4242. hero_hp = hero_level + hero_base_hp
  4243. hero_next = hero_level
  4244. hero_mp = 0
  4245. rem ' Restart the game with stats somewhat reduced,
  4246. gosub music_restart
  4247. gosub set_mp_display
  4248. gosub hero_draw_s
  4249. gosub room_draw
  4250. goto main_loop
  4251. reset_go_end
  4252. COLUP0=white
  4253. COLUP1=black
  4254. rem 'Make monster look x3 size, to maintain boss size and suggest something for non bosses.
  4255. NUSIZ1 = $07
  4256. special_effects_go_end
  4257. gosub music_play
  4258. drawscreen
  4259. goto game_over_loop
  4260. data music_data
  4261. 24,30,27,30,30,30,27,30,24,28,-1,2,24,28,-1,2,24,60
  4262. 27,28,-1,2,27,28,-1,2,27,60,24,30,20,28,-1,2,20,60
  4263. 24,30,27,30,30,30,27,30,24,28,-1,2,24,28,-1,2,24,28,-1,2
  4264. 24,30,27,28,-1,2,27,30,24,30,27,30,30,120
  4265. end
  4266. game_win
  4267. gosub music_restart
  4268. music_which=music_which_victory
  4269. COLUBK = white
  4270. COLUPF = yellow
  4271. item_x=80
  4272. item_y=80
  4273. hero_x=84
  4274. hero_y=80
  4275. player1:
  4276. %00011100
  4277. %11111110
  4278. %01111100
  4279. %00111000
  4280. %10111110
  4281. %10011110
  4282. %10111000
  4283. %11111100
  4284. %11110100
  4285. %11110110
  4286. %11111110
  4287. %01111100
  4288. %00111000
  4289. %00000000
  4290. %00010000
  4291. %00111000
  4292. %01111100
  4293. %11111110
  4294. %11111110
  4295. %01101100
  4296. %00000000
  4297. %00000000
  4298. %00000000
  4299. %11111000
  4300. %10000100
  4301. %10000010
  4302. %10000010
  4303. %10000100
  4304. %11111000
  4305. %00000000
  4306. %00000000
  4307. %10000110
  4308. %10001010
  4309. %10010010
  4310. %10100010
  4311. %11000010
  4312. %00000000
  4313. %00000000
  4314. %11111110
  4315. %10000000
  4316. %11111110
  4317. %10000000
  4318. %11111110
  4319. %00000000
  4320. %00000000
  4321. %00000000
  4322. %00000000
  4323. %11111110
  4324. %10000000
  4325. %11111110
  4326. %10000000
  4327. %11111110
  4328. %00000000
  4329. %10000010
  4330. %10000010
  4331. %11111110
  4332. %10000010
  4333. %10000010
  4334. %00000000
  4335. %00010000
  4336. %00010000
  4337. %00010000
  4338. %00010000
  4339. %11111110
  4340. %00000000
  4341. %00000000
  4342. %00000000
  4343. %00010000
  4344. %00111000
  4345. %01111100
  4346. %11111110
  4347. %11111110
  4348. %01101100
  4349. end
  4350. game_win_loop
  4351. COLUBK = white
  4352. COLUP1 = rand
  4353. COLUP0 = rand
  4354. REFP0 = 8
  4355. gosub music_play
  4356. drawscreen
  4357. rem 'Go back to house, but level up to 90 if not so already
  4358. if !switchreset then goto reset_win_end
  4359. hero_room=room_start
  4360. hero_x=hero_start_x
  4361. hero_oldx=hero_start_x
  4362. hero_y=hero_start_y
  4363. hero_oldy=hero_start_x
  4364. if hero_level < 90 then hero_level = 90
  4365. hero_hp = hero_level * 2 + hero_base_hp
  4366. hero_mp = hero_level / 16 + 1
  4367. gosub music_restart
  4368. gosub room_draw
  4369. gosub hero_draw_s
  4370. gosub room_draw
  4371. goto main_loop
  4372. reset_win_end
  4373. goto game_win_loop
  4374. intro_screen
  4375. gosub music_restart
  4376. music_which=music_which_intro
  4377. COLUBK = black
  4378. COLUPF = white
  4379. pfcolors:
  4380. yellow
  4381. yellow - 2
  4382. yellow - 4
  4383. yellow - 8
  4384. yellow - 10
  4385. yellow - 12
  4386. yellow - 2
  4387. yellow - 4
  4388. yellow - 8
  4389. yellow - 10
  4390. yellow - 12
  4391. end
  4392. playfield:
  4393. ..X....XXXXX..X...X..XXX...XXXX.
  4394. .X.X.....X....X...X..X..X..X....
  4395. X...X....X....X...X..XXX...XXXX.
  4396. XXXXX....X....X...X..X..X..X....
  4397. X...X....X.....XXX...X..X..XXXX.
  4398. ................................
  4399. XXX..XXXX..XX..XXX...XX..X..X...
  4400. X..X.X....X..X.X..X.X..X.XX.X...
  4401. XXX..XXXX.X..X.XXX..XXXX.X.XX...
  4402. X..X.X....X..X.X..X.X..X.X..X...
  4403. XXX..XXXX..XX..X..X.X..X.X..X...
  4404. end
  4405. COLUBK = black
  4406. intro_loop
  4407. rem COLUP1 = rand
  4408. rem COLUP0 = rand
  4409. rem REFP0 = 8
  4410. gosub music_play
  4411. drawscreen
  4412. if switchreset || joy0fire then return
  4413. goto intro_loop
  4414. const music_volume = 4
  4415. const note_rest = 0
  4416. const music_voice = 4
  4417. const music_voice_2 = 12
  4418. const c4 = 30
  4419. const d4 = 27
  4420. const e4 = 24
  4421. const f4 = 23
  4422. const g4 = 20
  4423. const a4 = 18
  4424. const b4 = 16
  4425. const c5 = 15
  4426. const rn = note_rest
  4427. const n_1 = 240
  4428. const n0 = 120
  4429. const n1 = 60
  4430. const n2 = 30
  4431. const n3 = 20
  4432. const n4 = 15
  4433. const n6 = 10
  4434. const n8 = 8
  4435. ; const music_size_victory = 48
  4436. const music_size_intro = 56
  4437. music_notes_intro_p
  4438. data music_notes_intro
  4439. c5, n2, a4, n2, f4, n2, d4, n2, rn, n8
  4440. c5, n2, a4, n2, f4, n2, d4, n2, rn, n8
  4441. c4, n2, f4, n2, g4, n2, d4, n2, rn, n8
  4442. c4, n2, f4, n2, g4, n2, d4, n2, rn, n8
  4443. a4, n0, f4, n0, d4, n0, rn, n0
  4444. f4, n0, a4, n0, c5, n0, rn, n0
  4445. end
  4446. const music_size_gameover = 20
  4447. music_notes_gameover_p
  4448. data music_notes_gameover
  4449. e4, n0, a4, n0, g4, n0, e4, n0, rn, n0
  4450. a4, n0, b4, n0, g4, n0, a4, n0, rn, n0
  4451. end
  4452. const music_size_victory = 32
  4453. music_notes_victory_p
  4454. data music_notes_victory
  4455. c4, n2, e4, n2, g4, n2, c5, n2
  4456. g4, n2, e4, n2, c4, n1, rn, n0
  4457. c4, n2, d4, n2, e4, n4, g4, n2
  4458. c5, n2, e4, n2, c4, n1, rn, n0
  4459. end
  4460. data music_sizes
  4461. music_size_intro, music_size_gameover, music_size_victory
  4462. end
  4463. rem 'restarts the music
  4464. music_restart
  4465. music_timer=1
  4466. music_pointer=0
  4467. AUDV0=0
  4468. AUDV1=0
  4469. return
  4470. music_play
  4471. rem ' Update music timer and change note if needed
  4472. rem ' If we get here, the timer is not 0 yet.
  4473. rem ' Go on to the next note, and leave it at that
  4474. if music_timer = 0 then goto music_do_note_change
  4475. goto music_no_note_change
  4476. music_do_note_change
  4477. gosub music_change_note
  4478. music_no_note_change
  4479. music_timer = music_timer - 1
  4480. rem ' COLUBK = music_timer
  4481. return
  4482. music_change_note
  4483. rem ' choose the not from the right music table
  4484. if music_which = music_which_intro then temp1 = music_notes_intro[music_pointer]
  4485. if music_which = music_which_gameover then temp1 = music_notes_gameover[music_pointer]
  4486. if music_which = music_which_victory then temp1 = music_notes_victory[music_pointer]
  4487. AUDF0 = temp1
  4488. AUDF1 = temp1
  4489. AUDC0 = music_voice
  4490. AUDC1 = music_voice_2
  4491. if temp1 = note_rest then AUDV0 = 0 else AUDV0 = music_volume
  4492. if temp1 = note_rest then AUDV1 = 0 else AUDV1 = music_volume
  4493. music_pointer = music_pointer + 1
  4494. rem ' Get right timig for note from right music
  4495. if music_which = music_which_intro then music_timer = music_notes_intro[music_pointer]
  4496. if music_which = music_which_gameover then music_timer = music_notes_gameover[music_pointer]
  4497. if music_which = music_which_victory then music_timer = music_notes_victory[music_pointer]
  4498. music_pointer = music_pointer + 1
  4499. temp3 = music_sizes[music_which]
  4500. if music_which = music_which_intro then temp3 = music_size_intro
  4501. if music_which = music_which_gameover then temp3 = music_size_gameover
  4502. if music_which = music_which_victory then temp3 = music_size_victory
  4503. if music_pointer >= temp3 then music_pointer = 0
  4504. return
  4505. ; inline 6lives_statusbar.asm