Guest User

Untitled

a guest
Mar 2nd, 2018
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.62 KB | None | 0 0
  1. /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': ./lib/mapfile.rb:23: class/module name must be CONSTANT (SyntaxError)
  2.  
  3. #Program Dynpet.rb below
  4. #Copyright (C) 2006 by Han Dao
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. #
  20. #You can contract the author at wikipediankiba@gmail.com
  21.  
  22. #PROJECT: Dynpet
  23. #DESCRIPTION: Dynpet is a computer program in which you take care of a virtual pet.
  24. #FUNCTION OF THIS PART: Start the game
  25.  
  26. require 'yaml'
  27. require 'rubygame'
  28. require 'rubygems'
  29. require 'rbGooey.rb'
  30. require "lib/creation.rb"
  31. require "lib/game.rb"
  32. require "lib/pet.rb"
  33. require "lib/option.rb"
  34. require "lib/dynpetmenu.rb"
  35. require "lib/filemenu.rb"
  36. require "lib/maprender.rb"
  37. require "lib/mode.rb"
  38. require "lib/petanimate.rb"
  39. require "lib/petmove.rb"
  40. require "lib/petbehavior.rb"
  41. require "lib/petstat.rb"
  42. require "lib/items.rb"
  43. require "lib/collide.rb"
  44. require "lib/timer.rb"
  45. require "lib/message.rb"
  46. require "lib/statdisplay.rb"
  47. require "lib/timeaction.rb"
  48. require "lib/emotiondisplay.rb"
  49. require "lib/itemmenu.rb"
  50. require "lib/itemdisplay.rb"
  51. require "lib/timedisplay.rb"
  52. require "lib/petsprite.rb"
  53. require "lib/display.rb"
  54. require "lib/menucollide.rb"
  55. require "lib/menurender.rb"
  56. require "lib/death.rb"
  57. require "lib/setup.rb"
  58. require "lib/mapengine.rb"
  59. require "lib/mapnav.rb"
  60. require "lib/mapcalculate.rb"
  61. require "lib/mapnavcompute.rb"
  62. require "lib/mapstartup.rb"
  63. require "lib/optionaccess.rb"
  64. require "lib/mapfile.rb"
  65. include Rubygame
  66. TTF.setup
  67.  
  68. if $0 == __FILE__
  69. Setup.new
  70. end
  71.  
  72.  
  73. #File lib/mapfile.rb below
  74. #Copyright (C) 2006-2007 by Han Dao
  75.  
  76. # This program is free software; you can redistribute it and/or modify
  77. # it under the terms of the GNU General Public License as published by
  78. # the Free Software Foundation; either version 2 of the License, or
  79. # (at your option) any later version.
  80.  
  81. # This program is distributed in the hope that it will be useful,
  82. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  83. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  84. # GNU General Public License for more details.
  85. #
  86. # You should have received a copy of the GNU General Public License
  87. # along with this program; if not, write to the Free Software
  88. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  89. #
  90. #You can contract the author at wikipediankiba@gmail.com
  91.  
  92. #PROJECT: Dynpet
  93. #DESCRIPTION: Dynpet is a computer program in which you take care of a virtual pet.
  94. #FUNCTION OF THIS PART: Load map files.
  95.  
  96. class mapload
  97. def load
  98. file = FileSys.new
  99. map = file.yaml_read(file)
  100. Controller.new(map, main)
  101. end
  102. end
  103.  
  104. #files.rb of rbgooey library below
  105. #Copyright (C) 2006-2007 by Han Dao
  106.  
  107. # This program is free software; you can redistribute it and/or modify
  108. # it under the terms of the GNU General Public License as published by
  109. # the Free Software Foundation; either version 2 of the License, or
  110. # (at your option) any later version.
  111.  
  112. # This program is distributed in the hope that it will be useful,
  113. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  114. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  115. # GNU General Public License for more details.
  116. #
  117. # You should have received a copy of the GNU General Public License
  118. # along with this program; if not, write to the Free Software
  119. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  120. #
  121. #You can contract the author at wikipediankiba@gmail.com
  122.  
  123. #PROJECT: RbGooey
  124. #DESCRIPTION: A GUI library for the Rubygame library
  125. #FUNCTION OF THIS PART: Yaml file loading system.
  126.  
  127. class FileSys
  128. #Read the file
  129. def yaml_read filename
  130. yaml_string = File.read filename; YAML:: load yaml_string
  131. end
  132. #Write to the file
  133. def yaml_write object , filename
  134. File.open filename , 'w' do |f|
  135. f.write(object.to_yaml)
  136. end
  137. end
  138. end
  139.  
  140. #rbgooey.rb of rbgooey file below
  141. #Copyright (C) 2006 by Han Dao
  142.  
  143. # This program is free software; you can redistribute it and/or modify
  144. # it under the terms of the GNU General Public License as published by
  145. # the Free Software Foundation; either version 2 of the License, or
  146. # (at your option) any later version.
  147.  
  148. # This program is distributed in the hope that it will be useful,
  149. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  150. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  151. # GNU General Public License for more details.
  152. #
  153. # You should have received a copy of the GNU General Public License
  154. # along with this program; if not, write to the Free Software
  155. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  156. #
  157. #This is the rbgooey library.
  158. #You can contract the author at wikipediankiba@gmail.com
  159.  
  160. require"files.rb"
  161. require"gui.rb"
  162. require"main.rb"
  163. require"mouse.rb"
  164. require"mqueue.rb"
  165. require"parser.rb"
  166. require"textmode.rb"
  167. require"textinput.rb"
  168. require"textrender.rb"
  169. require"textrect.rb"
  170. require"widget.rb"
  171. require"rexml/document"
  172. require"rubygems"
  173. require"xmlsimple"
Add Comment
Please, Sign In to add comment