zemu 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (285) hide show
  1. checksums.yaml +7 -0
  2. data/lib/zemu/config.rb +312 -0
  3. data/lib/zemu/instance.rb +179 -0
  4. data/lib/zemu.rb +172 -0
  5. data/src/debug.c +118 -0
  6. data/src/debug.h +30 -0
  7. data/src/external/Z/API/Z/ABIs/generic/allocator.h +36 -0
  8. data/src/external/Z/API/Z/ABIs/generic/cipher.h +47 -0
  9. data/src/external/Z/API/Z/ABIs/generic/data codec.h +33 -0
  10. data/src/external/Z/API/Z/ABIs/generic/emulation.h +103 -0
  11. data/src/external/Z/API/Z/ABIs/generic/hash function.h +33 -0
  12. data/src/external/Z/API/Z/ABIs/generic/module.h +33 -0
  13. data/src/external/Z/API/Z/ABIs/generic/wave codec.h +40 -0
  14. data/src/external/Z/API/Z/classes/base/InitializerList.hpp +34 -0
  15. data/src/external/Z/API/Z/classes/base/OpaqueFunctionPointer.hpp +26 -0
  16. data/src/external/Z/API/Z/classes/base/OpaqueMemberFunctionPointer.hpp +26 -0
  17. data/src/external/Z/API/Z/classes/base/Pair.hpp +46 -0
  18. data/src/external/Z/API/Z/classes/base/Range.hpp +111 -0
  19. data/src/external/Z/API/Z/classes/base/SizedString.hpp +66 -0
  20. data/src/external/Z/API/Z/classes/base/Status.hpp +89 -0
  21. data/src/external/Z/API/Z/classes/base/Symbol.hpp +39 -0
  22. data/src/external/Z/API/Z/classes/base/Tuple.hpp +111 -0
  23. data/src/external/Z/API/Z/classes/base/Value2D.hpp +389 -0
  24. data/src/external/Z/API/Z/classes/base/Value3D.hpp +368 -0
  25. data/src/external/Z/API/Z/classes/buffering/RingBuffer.hpp +93 -0
  26. data/src/external/Z/API/Z/classes/buffering/TripleBuffer.hpp +68 -0
  27. data/src/external/Z/API/Z/classes/functional/Functor.hpp +265 -0
  28. data/src/external/Z/API/Z/classes/functional/MemberFunction.hpp +98 -0
  29. data/src/external/Z/API/Z/classes/functional/ObjectMemberFunction.hpp +172 -0
  30. data/src/external/Z/API/Z/classes/functional/ObjectSelector.hpp +219 -0
  31. data/src/external/Z/API/Z/classes/functional/Selector.hpp +146 -0
  32. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABB.hpp +81 -0
  33. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABR.hpp +685 -0
  34. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Box.hpp +219 -0
  35. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Circle.hpp +80 -0
  36. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line2D.hpp +93 -0
  37. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line3D.hpp +80 -0
  38. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Rectangle.hpp +675 -0
  39. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Sphere.hpp +0 -0
  40. data/src/external/Z/API/Z/classes/memory/Shared.hpp +90 -0
  41. data/src/external/Z/API/Z/constants/base.h +35 -0
  42. data/src/external/Z/API/Z/constants/chemical elements.h +6385 -0
  43. data/src/external/Z/API/Z/constants/numbers.h +963 -0
  44. data/src/external/Z/API/Z/constants/version.h +15 -0
  45. data/src/external/Z/API/Z/formats/character set/ASCII.h +158 -0
  46. data/src/external/Z/API/Z/formats/character set/DOS CP437.h +159 -0
  47. data/src/external/Z/API/Z/formats/character set/DOS CP737.h +159 -0
  48. data/src/external/Z/API/Z/formats/character set/DOS CP775.h +159 -0
  49. data/src/external/Z/API/Z/formats/character set/DOS CP850.h +159 -0
  50. data/src/external/Z/API/Z/formats/character set/DOS CP852.h +159 -0
  51. data/src/external/Z/API/Z/formats/character set/DOS CP855.h +159 -0
  52. data/src/external/Z/API/Z/formats/character set/DOS CP857.h +159 -0
  53. data/src/external/Z/API/Z/formats/character set/DOS CP858.h +159 -0
  54. data/src/external/Z/API/Z/formats/character set/DOS CP860.h +159 -0
  55. data/src/external/Z/API/Z/formats/character set/DOS CP861.h +159 -0
  56. data/src/external/Z/API/Z/formats/character set/DOS CP862.h +159 -0
  57. data/src/external/Z/API/Z/formats/character set/DOS CP863.h +159 -0
  58. data/src/external/Z/API/Z/formats/character set/DOS CP864.h +159 -0
  59. data/src/external/Z/API/Z/formats/character set/DOS CP865.h +159 -0
  60. data/src/external/Z/API/Z/formats/character set/DOS CP866.h +159 -0
  61. data/src/external/Z/API/Z/formats/character set/DOS CP869.h +159 -0
  62. data/src/external/Z/API/Z/formats/character set/DOS CP872.h +159 -0
  63. data/src/external/Z/API/Z/formats/character set/DOS CP874.h +159 -0
  64. data/src/external/Z/API/Z/formats/character set/Unicode.h +30119 -0
  65. data/src/external/Z/API/Z/formats/data model/I16LP32.h +19 -0
  66. data/src/external/Z/API/Z/formats/data model/ILP32.h +19 -0
  67. data/src/external/Z/API/Z/formats/data model/ILP64.h +19 -0
  68. data/src/external/Z/API/Z/formats/data model/IP16L32.h +19 -0
  69. data/src/external/Z/API/Z/formats/data model/LLP64.h +19 -0
  70. data/src/external/Z/API/Z/formats/data model/LP32.h +19 -0
  71. data/src/external/Z/API/Z/formats/data model/LP64.h +19 -0
  72. data/src/external/Z/API/Z/formats/data model/SILP64.h +19 -0
  73. data/src/external/Z/API/Z/formats/file system/FAT12.h +61 -0
  74. data/src/external/Z/API/Z/formats/floating-point/IEEE 754.h +141 -0
  75. data/src/external/Z/API/Z/formats/floating-point/x87.h +74 -0
  76. data/src/external/Z/API/Z/formats/image/ICNS.h +39 -0
  77. data/src/external/Z/API/Z/formats/keymap/Mac OS.h +284 -0
  78. data/src/external/Z/API/Z/formats/keymap/Z.h +141 -0
  79. data/src/external/Z/API/Z/formats/multimedia/Creative Voice.h +106 -0
  80. data/src/external/Z/API/Z/formats/multimedia/Microsoft Wave.h +49 -0
  81. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ACH.h +44 -0
  82. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/FRZ.h +54 -0
  83. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/PRG.h +33 -0
  84. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SEM.h +46 -0
  85. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SIT.h +34 -0
  86. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNA.h +117 -0
  87. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNP.h +37 -0
  88. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SP.h +62 -0
  89. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/Z80.h +117 -0
  90. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX.h +56 -0
  91. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX82.h +70 -0
  92. data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/UNIF.h +26 -0
  93. data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/iNES.h +76 -0
  94. data/src/external/Z/API/Z/formats/storage medium image/audio/TAP.h +25 -0
  95. data/src/external/Z/API/Z/formats/storage medium image/audio/TZX.h +1185 -0
  96. data/src/external/Z/API/Z/formats/storage medium image/audio/Warajevo TAP.h +32 -0
  97. data/src/external/Z/API/Z/formats/storage medium image/floppy disk/FDI.h +45 -0
  98. data/src/external/Z/API/Z/functions/base/Z2D.h +583 -0
  99. data/src/external/Z/API/Z/functions/base/Z3D.h +712 -0
  100. data/src/external/Z/API/Z/functions/base/ZRange.h +137 -0
  101. data/src/external/Z/API/Z/functions/base/all.h +16 -0
  102. data/src/external/Z/API/Z/functions/base/casting.hpp +37 -0
  103. data/src/external/Z/API/Z/functions/base/character.h +38 -0
  104. data/src/external/Z/API/Z/functions/base/constructors.h +326 -0
  105. data/src/external/Z/API/Z/functions/base/structure.hpp +26 -0
  106. data/src/external/Z/API/Z/functions/base/type.hpp +60 -0
  107. data/src/external/Z/API/Z/functions/base/value.h +1901 -0
  108. data/src/external/Z/API/Z/functions/base/value.hpp +112 -0
  109. data/src/external/Z/API/Z/functions/buffering/ZRingBuffer.h +85 -0
  110. data/src/external/Z/API/Z/functions/buffering/ZTripleBuffer.h +65 -0
  111. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z2DLine.h +179 -0
  112. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z3DLine.h +168 -0
  113. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABB.h +361 -0
  114. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABR.h +1081 -0
  115. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZBox.h +340 -0
  116. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZCircle.h +142 -0
  117. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZRectangle.h +1267 -0
  118. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZSphere.h +156 -0
  119. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/all.h +18 -0
  120. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/constructors.h +620 -0
  121. data/src/external/Z/API/Z/functions/time/date.h +29 -0
  122. data/src/external/Z/API/Z/hardware/CPU/architecture/6502.h +90 -0
  123. data/src/external/Z/API/Z/hardware/CPU/architecture/Z80.h +245 -0
  124. data/src/external/Z/API/Z/hardware/CPU/architecture/i4004.h +37 -0
  125. data/src/external/Z/API/Z/hardware/PSG/General Instrument/AY-3-891x.h +180 -0
  126. data/src/external/Z/API/Z/hardware/VDC/Ricoh/RP2C0x.h +625 -0
  127. data/src/external/Z/API/Z/hardware/bus/AGP.h +24 -0
  128. data/src/external/Z/API/Z/hardware/bus/USB.h +510 -0
  129. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Inves Spectrum +.h +47 -0
  130. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Pentagon.h +13 -0
  131. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Scorpion.h +13 -0
  132. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum + 128K.h +158 -0
  133. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +.h +82 -0
  134. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2.h +13 -0
  135. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2A.h +13 -0
  136. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +3.h +13 -0
  137. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum.h +109 -0
  138. data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (NTSC).h +29 -0
  139. data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (PAL).h +29 -0
  140. data/src/external/Z/API/Z/hardware/machine/platform/computer/ZX Spectrum.h +405 -0
  141. data/src/external/Z/API/Z/hardware/machine/platform/console/Game Boy.h +49 -0
  142. data/src/external/Z/API/Z/hardware/machine/platform/console/Nintendo Entertainment System.h +350 -0
  143. data/src/external/Z/API/Z/hardware/storage medium/ROM cartridge/SNES Game Pak.h +238 -0
  144. data/src/external/Z/API/Z/inspection/C/completion.h +178 -0
  145. data/src/external/Z/API/Z/inspection/C/modules/C11.h +41 -0
  146. data/src/external/Z/API/Z/inspection/C/modules/C18.h +13 -0
  147. data/src/external/Z/API/Z/inspection/C/modules/C89.h +19 -0
  148. data/src/external/Z/API/Z/inspection/C/modules/C90.h +13 -0
  149. data/src/external/Z/API/Z/inspection/C/modules/C94.h +15 -0
  150. data/src/external/Z/API/Z/inspection/C/modules/C99.h +29 -0
  151. data/src/external/Z/API/Z/inspection/C/modules/KR C.h +19 -0
  152. data/src/external/Z/API/Z/inspection/C++/completion.h +512 -0
  153. data/src/external/Z/API/Z/inspection/C++/modules/C++03.h +15 -0
  154. data/src/external/Z/API/Z/inspection/C++/modules/C++11.h +80 -0
  155. data/src/external/Z/API/Z/inspection/C++/modules/C++14.h +26 -0
  156. data/src/external/Z/API/Z/inspection/C++/modules/C++17.h +55 -0
  157. data/src/external/Z/API/Z/inspection/C++/modules/C++85.h +11 -0
  158. data/src/external/Z/API/Z/inspection/C++/modules/C++89.h +13 -0
  159. data/src/external/Z/API/Z/inspection/C++/modules/C++98.h +17 -0
  160. data/src/external/Z/API/Z/inspection/C++.h +78 -0
  161. data/src/external/Z/API/Z/inspection/C.h +79 -0
  162. data/src/external/Z/API/Z/inspection/CPU/completion.h +56 -0
  163. data/src/external/Z/API/Z/inspection/CPU/detection.h +714 -0
  164. data/src/external/Z/API/Z/inspection/CPU/modules/6502.h +25 -0
  165. data/src/external/Z/API/Z/inspection/CPU/modules/AArch32.h +32 -0
  166. data/src/external/Z/API/Z/inspection/CPU/modules/AArch64.h +32 -0
  167. data/src/external/Z/API/Z/inspection/CPU/modules/Z80.h +26 -0
  168. data/src/external/Z/API/Z/inspection/CPU/modules/x86-32.h +31 -0
  169. data/src/external/Z/API/Z/inspection/CPU/modules/x86-64.h +312 -0
  170. data/src/external/Z/API/Z/inspection/CPU.h +209 -0
  171. data/src/external/Z/API/Z/inspection/OS/completion.h +36 -0
  172. data/src/external/Z/API/Z/inspection/OS/detection.h +768 -0
  173. data/src/external/Z/API/Z/inspection/OS/modules/Linux.h +22 -0
  174. data/src/external/Z/API/Z/inspection/OS/modules/MS-DOS.h +16 -0
  175. data/src/external/Z/API/Z/inspection/OS/modules/Mac OS X.h +23 -0
  176. data/src/external/Z/API/Z/inspection/OS/modules/Windows.h +19 -0
  177. data/src/external/Z/API/Z/inspection/OS/modules/iPhone OS.h +23 -0
  178. data/src/external/Z/API/Z/inspection/OS.h +236 -0
  179. data/src/external/Z/API/Z/inspection/Objective-C/completion.h +8 -0
  180. data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v1.0.h +11 -0
  181. data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v2.0.h +15 -0
  182. data/src/external/Z/API/Z/inspection/Objective-C.h +51 -0
  183. data/src/external/Z/API/Z/inspection/Z.h +19 -0
  184. data/src/external/Z/API/Z/inspection/build.h +22 -0
  185. data/src/external/Z/API/Z/inspection/character set.h +66 -0
  186. data/src/external/Z/API/Z/inspection/compiler/completion.h +2885 -0
  187. data/src/external/Z/API/Z/inspection/compiler/modules/Apple LLVM.h +26 -0
  188. data/src/external/Z/API/Z/inspection/compiler/modules/Clang.h +1664 -0
  189. data/src/external/Z/API/Z/inspection/compiler/modules/GCC.h +1366 -0
  190. data/src/external/Z/API/Z/inspection/compiler/modules/SCCZ80.h +473 -0
  191. data/src/external/Z/API/Z/inspection/compiler/modules/Visual C++.h +606 -0
  192. data/src/external/Z/API/Z/inspection/compiler/modules/cc65.h +529 -0
  193. data/src/external/Z/API/Z/inspection/compiler/modules/generic.h +13 -0
  194. data/src/external/Z/API/Z/inspection/compiler/modules/template.h +650 -0
  195. data/src/external/Z/API/Z/inspection/compiler.h +299 -0
  196. data/src/external/Z/API/Z/inspection/data model/completion.h +128 -0
  197. data/src/external/Z/API/Z/inspection/data model/deduction.h +9 -0
  198. data/src/external/Z/API/Z/inspection/data model/detection.h +45 -0
  199. data/src/external/Z/API/Z/inspection/data model.h +362 -0
  200. data/src/external/Z/API/Z/inspection/floating-point/completion.h +50 -0
  201. data/src/external/Z/API/Z/inspection/floating-point.h +324 -0
  202. data/src/external/Z/API/Z/inspection/language.h +163 -0
  203. data/src/external/Z/API/Z/inspection/platform/detection.h +9 -0
  204. data/src/external/Z/API/Z/inspection/platform.h +29 -0
  205. data/src/external/Z/API/Z/keys/C++.h +27 -0
  206. data/src/external/Z/API/Z/keys/C.h +29 -0
  207. data/src/external/Z/API/Z/keys/CPU.h +80 -0
  208. data/src/external/Z/API/Z/keys/OS.h +182 -0
  209. data/src/external/Z/API/Z/keys/Objective-C.h +17 -0
  210. data/src/external/Z/API/Z/keys/chemistry.h +26 -0
  211. data/src/external/Z/API/Z/keys/compiler.h +178 -0
  212. data/src/external/Z/API/Z/keys/data model.h +32 -0
  213. data/src/external/Z/API/Z/keys/endianness.h +24 -0
  214. data/src/external/Z/API/Z/keys/language.h +21 -0
  215. data/src/external/Z/API/Z/keys/layout.h +20 -0
  216. data/src/external/Z/API/Z/keys/mathematics/geometry.h +29 -0
  217. data/src/external/Z/API/Z/keys/mathematics/number.h +21 -0
  218. data/src/external/Z/API/Z/keys/order.h +18 -0
  219. data/src/external/Z/API/Z/keys/platform.h +87 -0
  220. data/src/external/Z/API/Z/keys/program.h +39 -0
  221. data/src/external/Z/API/Z/keys/science/chemical elements.h +200 -0
  222. data/src/external/Z/API/Z/keys/science/electricity.h +18 -0
  223. data/src/external/Z/API/Z/keys/science/magnetism.h +19 -0
  224. data/src/external/Z/API/Z/keys/status.h +69 -0
  225. data/src/external/Z/API/Z/keys/text.h +27 -0
  226. data/src/external/Z/API/Z/keys/value.h +88 -0
  227. data/src/external/Z/API/Z/macros/arguments.h +25 -0
  228. data/src/external/Z/API/Z/macros/casting.h +22 -0
  229. data/src/external/Z/API/Z/macros/character.h +159 -0
  230. data/src/external/Z/API/Z/macros/date.h +14 -0
  231. data/src/external/Z/API/Z/macros/key.h +20 -0
  232. data/src/external/Z/API/Z/macros/language.h +126 -0
  233. data/src/external/Z/API/Z/macros/language.hpp +81 -0
  234. data/src/external/Z/API/Z/macros/members.h +86 -0
  235. data/src/external/Z/API/Z/macros/pasting.h +308 -0
  236. data/src/external/Z/API/Z/macros/pointer.h +33 -0
  237. data/src/external/Z/API/Z/macros/repetition.h +283 -0
  238. data/src/external/Z/API/Z/macros/structure.h +104 -0
  239. data/src/external/Z/API/Z/macros/templating.h +407 -0
  240. data/src/external/Z/API/Z/macros/tokens.h +14 -0
  241. data/src/external/Z/API/Z/macros/type enumeration.h +43 -0
  242. data/src/external/Z/API/Z/macros/type selection.hpp +76 -0
  243. data/src/external/Z/API/Z/macros/value.h +489 -0
  244. data/src/external/Z/API/Z/macros/variadic pasting.h +21 -0
  245. data/src/external/Z/API/Z/macros/variadic selection.h +56 -0
  246. data/src/external/Z/API/Z/macros/variadic.h +46 -0
  247. data/src/external/Z/API/Z/macros/version.h +17 -0
  248. data/src/external/Z/API/Z/network/3/IP.h +36 -0
  249. data/src/external/Z/API/Z/network/4/TCP.h +24 -0
  250. data/src/external/Z/API/Z/network/4/UDP.h +26 -0
  251. data/src/external/Z/API/Z/network/7/ED2K.h +104 -0
  252. data/src/external/Z/API/Z/network/7/HTTP.h +100 -0
  253. data/src/external/Z/API/Z/traits/SelectType.hpp +71 -0
  254. data/src/external/Z/API/Z/traits/TernaryType.hpp +20 -0
  255. data/src/external/Z/API/Z/traits/Type.hpp +4516 -0
  256. data/src/external/Z/API/Z/traits/TypeCount.hpp +52 -0
  257. data/src/external/Z/API/Z/traits/TypeList.hpp +376 -0
  258. data/src/external/Z/API/Z/traits/base.hpp +19 -0
  259. data/src/external/Z/API/Z/traits/filtering.hpp +30 -0
  260. data/src/external/Z/API/Z/traits/mathematics.hpp +48 -0
  261. data/src/external/Z/API/Z/types/arguments.h +19 -0
  262. data/src/external/Z/API/Z/types/base.h +1655 -0
  263. data/src/external/Z/API/Z/types/base.hpp +169 -0
  264. data/src/external/Z/API/Z/types/buffering.h +27 -0
  265. data/src/external/Z/API/Z/types/mathematics.h +135 -0
  266. data/src/external/Z/API/Z/types/time.h +23 -0
  267. data/src/external/Z/COPYING.LESSER +165 -0
  268. data/src/external/Z/development/Qt Creator/Z.pro +253 -0
  269. data/src/external/Z/distribution/CocoaPods/Zeta.podspec +18 -0
  270. data/src/external/Z/distribution/Gentoo Linux/Zeta-0.1.ebuild +22 -0
  271. data/src/external/Z/distribution/Gentoo Linux/metadata.xml +8 -0
  272. data/src/external/Z/distribution/Homebrew/Zeta.rb +11 -0
  273. data/src/external/z80/API/emulation/CPU/Z80.h +201 -0
  274. data/src/external/z80/README.md +229 -0
  275. data/src/external/z80/building/premake4.lua +33 -0
  276. data/src/external/z80/development/Xcode/Z80.xcodeproj/project.pbxproj +520 -0
  277. data/src/external/z80/sources/Z80.c +1660 -0
  278. data/src/interrupt.c +6 -0
  279. data/src/interrupt.h +3 -0
  280. data/src/io.c.erb +115 -0
  281. data/src/io.h.erb +18 -0
  282. data/src/main.c +69 -0
  283. data/src/memory.c.erb +43 -0
  284. data/src/memory.h.erb +9 -0
  285. metadata +329 -0
@@ -0,0 +1,685 @@
1
+ /* Z Kit - classes/mathematics/geometry/euclidean/AABR.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_classes_mathematics_geometry_euclidean_AABR_HPP_
9
+ #define _Z_classes_mathematics_geometry_euclidean_AABR_HPP_
10
+
11
+ #include <Z/classes/mathematics/geometry/euclidean/Line2D.hpp>
12
+
13
+
14
+ namespace Zeta {namespace Partials {namespace AABR {
15
+
16
+ # define Z_THIS ((AABR *)this)
17
+
18
+ template <class AABR, class T, UInt T_number_set> struct Part;
19
+
20
+
21
+ // MARK: - Partial implementation for integer types
22
+
23
+
24
+ template <class AABR, class T>
25
+ struct Part<AABR, T, Z_NUMBER_SET_Z> {
26
+ };
27
+
28
+
29
+ // MARK: - Partial implementation for real types
30
+
31
+
32
+ template <class AABR, class T>
33
+ struct Part<AABR, T, Z_NUMBER_SET_R> {
34
+
35
+ Z_CT_MEMBER(CPP11) Zeta::Value2D<T> absolute_point_to_unit(const Zeta::Value2D<T> &point)
36
+ {return (point - Z_THIS->a) / (Z_THIS->b - Z_THIS->a);}
37
+
38
+
39
+ /*Z_CT_MEMBER(CPP11) Boolean contains(const Circle<T> circle)
40
+ {
41
+ return circle.point - circle.radius >= Z_THIS->a &&
42
+ circle.point + circle.radius <= Z_THIS->b;
43
+ }*/
44
+
45
+
46
+ /*Z_CT_MEMBER(CPP11) Circle<T> inner_circle()
47
+ {return Circle<T>(Z_THIS->center(), (b - a).inner_minimum() / T(2));}*/
48
+
49
+
50
+ Z_CT_MEMBER(CPP11) Zeta::Value2D<T> unit_point_to_absolute(Zeta::Value2D<T> point)
51
+ {return point * (object.b - object.a) + object.a;}
52
+ };
53
+
54
+
55
+ # undef Z_THIS
56
+
57
+ }}}
58
+
59
+
60
+ namespace Zeta {template <class T> struct AABR : Line2D<T>, Partials::Rectangle::Part<AABR<T>, T, Type<T>::number_set> {
61
+
62
+ typedef typename ZTypeFixedSigned(ZAABR, T) Base;
63
+
64
+
65
+ Z_INLINE_MEMBER AABR() Z_DEFAULTED({})
66
+
67
+ Z_CT_MEMBER(CPP11) AABR(const Value2D<T> &a, const Value2D<T> &b) : Line2D<T>(a, b) {}
68
+ Z_CT_MEMBER(CPP11) AABR(const Value2D<T> &a, T b_x, T b_y) : Line2D<T>(a, b_x, b_y) {}
69
+ Z_CT_MEMBER(CPP11) AABR(const Value2D<T> &a, T b_xy) : Line2D<T>(a, b_xy) {}
70
+ Z_CT_MEMBER(CPP11) AABR(T a_x, T a_y, const Value2D<T> &b) : Line2D<T>(a_x, a_y, b) {}
71
+ Z_CT_MEMBER(CPP11) AABR(T a_x, T a_y, T b_x, T b_y) : Line2D<T>(a_x, a_y, b_x, b_y) {}
72
+ Z_CT_MEMBER(CPP11) AABR(T a_xy, T b_x, T b_y) : Line2D<T>(a_xy, b_x, b_y) {}
73
+ Z_CT_MEMBER(CPP11) AABR(T a_xy, const Value2D<T> &b) : Line2D<T>(a_xy, b) {}
74
+ Z_CT_MEMBER(CPP11) AABR(T b_x, T b_y) : Line2D<T>(b_x, b_y) {}
75
+ Z_CT_MEMBER(CPP11) AABR(T b_xy) : Line2D<T>(b_xy) {}
76
+
77
+ Z_INLINE_MEMBER AABR(const Base &aabr) {(*(Base *)this) = aabr;}
78
+
79
+
80
+ Z_CT_MEMBER(CPP11) AABR align_in_bottom_center(const Value2D<T> &size) const
81
+ {
82
+ object.b.x = (object.a.x += (object.b.x - object.a.x - size.x) / (z##type)2) + size.x;
83
+ object.b.y = object.a.y + size.y;
84
+ return object;
85
+ }
86
+
87
+
88
+ Z_CT_MEMBER(CPP11) AABR align_in_bottom_left(const Value2D<T> &size) const
89
+ {
90
+ object.b.x = object.a.x + size.x;
91
+ object.b.y = object.a.y + size.y;
92
+ return object;
93
+ }
94
+
95
+
96
+ Z_CT_MEMBER(CPP11) AABR align_in_bottom_right(const Value2D<T> &size) const
97
+ {
98
+ object.a.x = object.b.x - size.x;
99
+ object.b.y = object.b.y + size.x;
100
+ return object;
101
+ }
102
+
103
+
104
+ Z_CT_MEMBER(CPP11) AABR align_in_center(const Value2D<T> &size) const
105
+ {
106
+ object.b.x = (object.a.x += (object.b.x - object.a.x - size.x) / (z##type)2) + size.x;
107
+ object.b.y = (object.a.y += (object.b.y - object.a.y - size.y) / (z##type)2) + size.y;
108
+ return object;
109
+ }
110
+
111
+
112
+ Z_CT_MEMBER(CPP11) AABR align_in_center_left(const Value2D<T> &size) const
113
+ {
114
+ object.b.x = object.a.x + size.x;
115
+ object.b.y = (object.a.y += (object.b.y - object.a.y - size.y) / (z##type)2) + size.y;
116
+ return object;
117
+ }
118
+
119
+
120
+ Z_CT_MEMBER(CPP11) AABR align_in_center_right(const Value2D<T> &size) const
121
+ {
122
+ object.a.x = object.b.x - size.x;
123
+ object.b.y = (object.a.y += (object.b.y - object.a.y - size.y) / (z##type)2) + size.y;
124
+ return object;
125
+ }
126
+
127
+
128
+ Z_CT_MEMBER(CPP11) AABR align_in_top_center(const Value2D<T> &size) const
129
+ {
130
+ object.a.y = object.b.y - size.y;
131
+ object.b.x = (object.a.x += (object.b.x - object.a.x - size.x) / (z##type)2) + size.x;
132
+ return object;
133
+ }
134
+
135
+
136
+ Z_CT_MEMBER(CPP11) AABR align_in_top_left(const Value2D<T> &size) const
137
+ {
138
+ object.a.y = object.b.y - size.y;
139
+ object.b.x = object.a.x + size.x;
140
+ return object;
141
+ }
142
+
143
+
144
+ Z_CT_MEMBER(CPP11) AABR align_in_top_right(const Value2D<T> &size) const
145
+ {
146
+ object.a.x = object.b.x - size.x;
147
+ object.a.y = object.b.y - size.y;
148
+ return object;
149
+ }
150
+
151
+
152
+ Z_CT_MEMBER(CPP11) T area() const
153
+ {return (this->b - this->a).inner_product();}
154
+
155
+
156
+ Z_CT_MEMBER(CPP11) Value2D<T> bottom_center() const
157
+ {return z_2d_##type((object.a.x + object.b.x) / (z##type)2, object.a.y);}
158
+
159
+
160
+ Z_CT_MEMBER(CPP11) AABR bottom_half() const
161
+ {
162
+ object.b.y = (object.a.y + object.b.y) / (z##type)2;
163
+ return object;
164
+ }
165
+
166
+
167
+ Z_CT_MEMBER(CPP11) Value2D<T> bottom_left() const
168
+ {return this->a;}
169
+
170
+
171
+ Z_CT_MEMBER(CPP11) AABR bottom_left_quarter() const
172
+ {
173
+ object.b.x = (object.a.x + object.b.x) / (z##type)2;
174
+ object.b.y = (object.a.y + object.b.y) / (z##type)2;
175
+ return object;
176
+ }
177
+
178
+
179
+ Z_CT_MEMBER(CPP11) Value2D<T> bottom_right() const
180
+ {return Value2D<T>(this->b.x, this->a.y);}
181
+
182
+
183
+ Z_CT_MEMBER(CPP11) AABR bottom_right_quarter() const
184
+ {
185
+ object.a.x = (object.a.x + object.b.x) / (z##type)2;
186
+ object.b.y = (object.a.y + object.b.y) / (z##type)2;
187
+ return object;
188
+ }
189
+
190
+
191
+ Z_CT_MEMBER(CPP11) Value2D<T> center_left() const
192
+ {return Value2D<T>(this->a.x, (this->a.y + this->b.y) / T(2));}
193
+
194
+
195
+ Z_CT_MEMBER(CPP11) Value2D<T> center_right() const
196
+ {return z_2d_##type(object.b.x, (object.a.y + object.b.y) / (z##type)2);}
197
+
198
+
199
+ Z_CT_MEMBER(CPP11) Boolean z_aabr_##type##_contains(ZAABR##Type a, ZAABR##Type b)
200
+ {return b.a.x >= a.a.x && b.a.y >= a.a.y && b.b.x <= a.b.x && b.b.y <= a.b.y;}
201
+
202
+
203
+ Z_CT_MEMBER(CPP11) Boolean z_aabr_##type##_contains_point(ZAABR##Type object, Z3D##Type point)
204
+ {
205
+ return object.a.x <= point.x && point.x <= object.a.x &&
206
+ object.a.y <= point.y && point.y <= object.a.y;
207
+ }
208
+
209
+
210
+ Z_CT_MEMBER(CPP11) Boolean contains(const Line2D<T> &line_segment) const
211
+ {return contains(line_segment.a) && contains(line_segment.b);}
212
+
213
+
214
+ Z_CT_MEMBER(CPP11) Boolean contains_rectangle(Rectangle<T> rectangle)
215
+ {
216
+ return object.a.x <= rectangle.point.x &&
217
+ object.a.y <= rectangle.point.y &&
218
+ object.b.x >= rectangle.point.x + rectangle.size.x &&
219
+ object.b.y >= rectangle.point.y + rectangle.size.y;
220
+ }
221
+
222
+
223
+ Z_CT_MEMBER(CPP11) Value2D<T> size()
224
+ {return this->b - this->a;}
225
+
226
+
227
+ Z_CT_MEMBER(CPP11) AABR fit_in_bottom_center(const Value2D<T> &size size)
228
+ {
229
+ Z2D##Type old_size = z_aabr_##type##_size(object);
230
+
231
+ object.b.y = object.a.y + (size = z_2d_##type##_fit(size, old_size)).y;
232
+ object.b.x = (object.a.x += (old_size.x - size.x) / (z##type)2) + size.x;
233
+ return object;
234
+ }
235
+
236
+
237
+ Z_CT_MEMBER(CPP11) AABR fit_in_bottom_left(const Value2D<T> &size)
238
+ {
239
+ object.b = z_2d_##type##_add
240
+ (object.a, z_2d_##type##_fit(size, z_aabr_##type##_size(object)));
241
+
242
+ return object;
243
+ }
244
+
245
+
246
+ Z_CT_MEMBER(CPP11) AABR fit_in_bottom_right(const Value2D<T> &size)
247
+ {
248
+ size = z_2d_##type##_fit(size, z_aabr_##type##_size(object));
249
+ return z_aabr_##type(object.b.x - size.x, object.a.y, object.b.x, object.a.y + size.y);
250
+ }
251
+
252
+
253
+ Z_CT_MEMBER(CPP11) AABR fit_in_center(const Value2D<T> &size)
254
+ {
255
+ Z2D##Type old_size = z_aabr_##type##_size(object);
256
+
257
+ size = z_2d_##type##_fit(size, old_size);
258
+ object.b.x = (object.a.x += (old_size.x - size.x) / (z##type)2) + size.x;
259
+ object.b.y = (object.a.y += (old_size.y - size.y) / (z##type)2) + size.y;
260
+ return object;
261
+ }
262
+
263
+
264
+ Z_CT_MEMBER(CPP11) AABR fit_in_center_left(const Value2D<T> &size)
265
+ {
266
+ Z2D##Type old_size = z_aabr_##type##_size(object);
267
+
268
+ object.b.x = object.a.x + (size = z_2d_##type##_fit(size, old_size)).x;
269
+ object.b.y = (object.a.y += (old_size.y - size.y) / (z##type)2) + size.y;
270
+ return object;
271
+ }
272
+
273
+
274
+ Z_CT_MEMBER(CPP11) AABR fit_in_center_right(const Value2D<T> &size)
275
+ {
276
+ Z2D##Type old_size = z_aabr_##type##_size(object);
277
+
278
+ object.a.x = object.b.x - (size = z_2d_##type##_fit(size, old_size)).x;
279
+ object.b.y = (object.a.y += (old_size.y - size.y) / (z##type)2) + size.y;
280
+ return object;
281
+ }
282
+
283
+
284
+ Z_CT_MEMBER(CPP11) AABR fit_in_top_center(const Value2D<T> &size)
285
+ {
286
+ Z2D##Type old_size = z_aabr_##type##_size(object);
287
+
288
+ object.a.y = object.b.y - (size = z_2d_##type##_fit(size, old_size)).y;
289
+ object.b.x = (object.a.x += (old_size.x - size.x) / (z##type)2) + size.x;
290
+ return object;
291
+ }
292
+
293
+
294
+ Z_CT_MEMBER(CPP11) AABR fit_in_top_left(const Value2D<T> &size)
295
+ {
296
+ size = z_2d_##type##_fit(size, z_aabr_##type##_size(object));
297
+
298
+ object.a.y = object.b.y - size.y;
299
+ object.b.x = object.a.x + size.x;
300
+ return object;
301
+ }
302
+
303
+
304
+ Z_CT_MEMBER(CPP11) AABR fit_in_top_right(const Value2D<T> &size)
305
+ {
306
+ object.a = z_2d_##type##_subtract
307
+ (object.b, z_2d_##type##_fit(size, z_aabr_##type##_size(object)));
308
+
309
+ return object;
310
+ }
311
+
312
+
313
+ static Z_CT_MEMBER(CPP11) AABR from_vertices(const Value2D<T> &a, const Value2D<T> &b)
314
+ {return AABR(a.minimum(b), a.maximum(b));}
315
+
316
+
317
+ Z_CT_MEMBER(CPP11) AABR grow_from_bottom_center(const Value2D<T> &delta)
318
+ {
319
+ z##type size_x = object.b.x - object.a.x;
320
+
321
+ object.b.x = (object.a.x -= delta.x / (z##type)2) + size_x + delta.x;
322
+ object.b.y += delta.y;
323
+ return object;
324
+ }
325
+
326
+
327
+ Z_CT_MEMBER(CPP11) AABR grow_from_bottom_left(const Value2D<T> &delta)
328
+ {
329
+ object.b.x += delta.x;
330
+ object.b.y += delta.y;
331
+ return object;
332
+ }
333
+
334
+
335
+ Z_CT_MEMBER(CPP11) AABR grow_from_bottom_right(const Value2D<T> &delta)
336
+ {
337
+ object.a.x -= delta.x;
338
+ object.b.y += delta.y;
339
+ return object;
340
+ }
341
+
342
+
343
+ Z_CT_MEMBER(CPP11) AABR grow_from_center(const Value2D<T> &delta)
344
+ {
345
+ z##type size_x = object.b.x - object.a.x;
346
+ z##type size_y = object.b.y - object.a.y;
347
+
348
+ object.b.x = (object.a.x -= delta.x / (z##type)2) + size_x + delta.x;
349
+ object.b.y = (object.a.y -= delta.y / (z##type)2) + size_y + delta.y;
350
+ return object;
351
+ }
352
+
353
+
354
+ Z_CT_MEMBER(CPP11) AABR grow_from_center_left(const Value2D<T> &delta)
355
+ {
356
+ z##type size_y = object.b.y - object.a.y;
357
+
358
+ object.b.x += delta.x;
359
+ object.b.y = (object.a.y -= delta.y / (z##type)2) + size_y + delta.y;
360
+ return object;
361
+ }
362
+
363
+
364
+ Z_CT_MEMBER(CPP11) AABR grow_from_center_right(const Value2D<T> &delta)
365
+ {
366
+ z##type size_y = object.b.y - object.a.y;
367
+
368
+ object.a.x -= delta.x;
369
+ object.b.y = (object.a.y -= delta.y / (z##type)2) + size_y + delta.y;
370
+ return object;
371
+ }
372
+
373
+
374
+ Z_CT_MEMBER(CPP11) AABR grow_from_top_center(const Value2D<T> &delta)
375
+ {
376
+ z##type size_x = object.b.x - object.a.x;
377
+
378
+ object.b.x = (object.a.x -= delta.x / (z##type)2) + size_x + delta.x;
379
+ object.a.y -= delta.y;
380
+ return object;
381
+ }
382
+
383
+
384
+ Z_CT_MEMBER(CPP11) AABR grow_from_top_left(const Value2D<T> &delta)
385
+ {
386
+ object.b.x += delta.x;
387
+ object.a.y -= delta.y;
388
+ return object;
389
+ }
390
+
391
+
392
+ Z_CT_MEMBER(CPP11) AABR grow_from_top_right(const Value2D<T> &delta)
393
+ {
394
+ object.a.x -= delta.x;
395
+ object.a.y -= delta.y;
396
+ return object;
397
+ }
398
+
399
+
400
+ Z_CT_MEMBER(CPP11) AABR grow_in_x_from_center(T delta)
401
+ {
402
+ z##type size_x = object.b.x - object.a.x;
403
+
404
+ object.b.x = (object.a.x -= delta / (z##type)2) + size_x + delta;
405
+ return object;
406
+ }
407
+
408
+
409
+ Z_CT_MEMBER(CPP11) AABR grow_in_x_from_left(T delta)
410
+ {
411
+ object.b.x += delta;
412
+ return object;
413
+ }
414
+
415
+
416
+ Z_CT_MEMBER(CPP11) AABR grow_in_x_from_right(T delta)
417
+ {
418
+ object.a.x -= delta;
419
+ return object;
420
+ }
421
+
422
+
423
+ Z_CT_MEMBER(CPP11) AABR grow_in_y_from_bottom(T delta)
424
+ {
425
+ object.b.y += delta;
426
+ return object;
427
+ }
428
+
429
+
430
+ Z_CT_MEMBER(CPP11) AABR grow_in_y_from_center(T delta)
431
+ {
432
+ z##type size_y = object.b.y - object.a.y;
433
+
434
+ object.b.y = (object.a.y -= delta / (z##type)2) + size_y + delta;
435
+ return object;
436
+ }
437
+
438
+
439
+ Z_CT_MEMBER(CPP11) AABR grow_in_y_from_top(T delta)
440
+ {
441
+ object.a.y -= delta;
442
+ return object;
443
+ }
444
+
445
+
446
+ Z_CT_MEMBER(CPP11) Boolean intersect(ZAABR##Type a, ZAABR##Type b)
447
+ {return a.a.x < b.b.x && b.a.x < a.b.x && a.a.y < b.b.y && b.a.y < a.b.y;}
448
+
449
+
450
+ Z_CT_MEMBER(CPP11) AABR z_aabr_##type##_intersection(ZAABR##Type a, ZAABR##Type b) \
451
+ { \
452
+ z##type x1, x2, y1, y2; \
453
+ \
454
+ return (x1 = z_##type##_maximum(a.a.x, b.a.x)) <= \
455
+ (x2 = z_##type##_minimum(a.b.x, b.b.x)) && \
456
+ (y1 = z_##type##_maximum(a.a.y, b.a.y)) <= \
457
+ (y2 = z_##type##_minimum(a.b.y, b.b.y)) \
458
+ \
459
+ ? z_aabr_##type(x1, y1, x2, y2) \
460
+ : z_aabr_##type##_zero; \
461
+ } \
462
+ \
463
+ \
464
+ Z_CT_MEMBER(CPP11) AABR left_half()
465
+ {
466
+ object.b.x = (object.a.x + object.b.x) / (z##type)2;
467
+ return object; \
468
+ } \
469
+ \
470
+ \
471
+ Z_CT_MEMBER(CPP11) z##type z_aabr_##type##_maximum_x() \
472
+ {return object.b.x;} \
473
+ \
474
+ \
475
+ Z_CT_MEMBER(CPP11) z##type z_aabr_##type##_maximum_y() \
476
+ {return object.b.y;} \
477
+ \
478
+ \
479
+ Z_CT_MEMBER(CPP11) z##type z_aabr_##type##_middle_x() \
480
+ {return (object.a.x + object.b.x) / (z##type)2;} \
481
+ \
482
+ \
483
+ Z_CT_MEMBER(CPP11) z##type z_aabr_##type##_middle_y() \
484
+ {return (object.a.y + object.b.y) / (z##type)2;} \
485
+ \
486
+ \
487
+ Z_CT_MEMBER(CPP11) z##type z_aabr_##type##_minimum_x() \
488
+ {return object.a.x;} \
489
+ \
490
+ \
491
+ Z_CT_MEMBER(CPP11) z##type z_aabr_##type##_minimum_y() \
492
+ {return object.a.y;} \
493
+ \
494
+ \
495
+ Z_CT_MEMBER(CPP11) ZRectangle##Type z_aabr_##type##_rectangle() \
496
+ { \
497
+ return z_rectangle_##type \
498
+ (object.a.x, object.a.y, object.b.x - object.a.x, object.b.y - object.a.y); \
499
+ } \
500
+ \
501
+ \
502
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_right_half() \
503
+ { \
504
+ object.a.x = (object.a.x + object.b.x) / (z##type)2; \
505
+ return object; \
506
+ } \
507
+ \
508
+ \
509
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_from_bottom_center(const Value2D<T> &delta)
510
+ { \
511
+ z##type size_x = object.b.x - object.a.x; \
512
+ \
513
+ object.b.x = (object.a.x += delta.x / (z##type)2) + size_x - delta.x; \
514
+ object.b.y -= delta.y; \
515
+ return object; \
516
+ } \
517
+ \
518
+ \
519
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_from_bottom_left(const Value2D<T> &delta)
520
+ { \
521
+ object.b.x -= delta.x; \
522
+ object.b.y -= delta.y; \
523
+ return object; \
524
+ } \
525
+ \
526
+ \
527
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_from_bottom_right(const Value2D<T> &delta)\
528
+ { \
529
+ object.a.x += delta.x; \
530
+ object.b.y -= delta.y; \
531
+ return object; \
532
+ } \
533
+ \
534
+ \
535
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_from_center(const Value2D<T> &delta)
536
+ { \
537
+ z##type size_x = object.b.x - object.a.x; \
538
+ z##type size_y = object.b.y - object.a.y; \
539
+ \
540
+ object.b.x = (object.a.x += delta.x / (z##type)2) + size_x - delta.x; \
541
+ object.b.y = (object.a.y += delta.y / (z##type)2) + size_y - delta.y; \
542
+ return object; \
543
+ } \
544
+ \
545
+ \
546
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_from_center_left(const Value2D<T> &delta)
547
+ { \
548
+ z##type size_y = object.b.y - object.a.y; \
549
+ \
550
+ object.b.x -= delta.x; \
551
+ object.b.y = (object.a.y += delta.y / (z##type)2) + size_y - delta.y; \
552
+ return object; \
553
+ } \
554
+ \
555
+ \
556
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_from_center_right(const Value2D<T> &delta)
557
+ { \
558
+ z##type size_y = object.b.y - object.a.y; \
559
+ \
560
+ object.a.x += delta.x; \
561
+ object.b.y = (object.a.y += delta.y / (z##type)2) + size_y - delta.y; \
562
+ return object; \
563
+ } \
564
+ \
565
+ \
566
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_from_top_center(const Value2D<T> &delta)
567
+ { \
568
+ z##type size_x = object.b.x - object.a.x; \
569
+ \
570
+ object.b.x = (object.a.x += delta.x / (z##type)2) + size_x - delta.x; \
571
+ object.a.y += delta.y; \
572
+ return object; \
573
+ } \
574
+ \
575
+ \
576
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_from_top_left(const Value2D<T> &delta)
577
+ { \
578
+ object.b.x -= delta.x; \
579
+ object.a.y += delta.y; \
580
+ return object; \
581
+ } \
582
+ \
583
+ \
584
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_from_top_right(const Value2D<T> &delta)
585
+ { \
586
+ object.a.x += delta.x; \
587
+ object.a.y += delta.y; \
588
+ return object; \
589
+ } \
590
+ \
591
+ \
592
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_in_x_from_center(T delta)
593
+ { \
594
+ z##type size_x = object.b.x - object.a.x; \
595
+ \
596
+ object.b.x = (object.a.x += delta / (z##type)2) + size_x - delta; \
597
+ return object; \
598
+ } \
599
+ \
600
+ \
601
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_in_x_from_left(T delta)
602
+ { \
603
+ object.b.x -= delta; \
604
+ return object; \
605
+ } \
606
+ \
607
+ \
608
+ Z_CT_MEMBER(CPP11) ZAABR##Type z_aabr_##type##_shrink_in_x_from_right(T delta)
609
+ { \
610
+ object.a.x += delta; \
611
+ return object; \
612
+ } \
613
+ \
614
+ \
615
+ Z_CT_MEMBER(CPP11) AABR z_aabr_##type##_shrink_in_y_from_bottom(T delta) \
616
+ { \
617
+ object.b.y -= delta; \
618
+ return object; \
619
+ } \
620
+ \
621
+ \
622
+ Z_CT_MEMBER(CPP11) AABR z_aabr_##type##_shrink_in_y_from_center(T delta) \
623
+ { \
624
+ z##type size_y = object.b.y - object.a.y; \
625
+ \
626
+ object.b.y = (object.a.y += delta / (z##type)2) + size_y - delta; \
627
+ return object; \
628
+ } \
629
+ \
630
+ \
631
+ Z_CT_MEMBER(CPP11) AABR z_aabr_##type##_shrink_in_y_from_top(T delta) \
632
+ { \
633
+ object.a.y += delta; \
634
+ return object; \
635
+ } \
636
+ \
637
+ \
638
+ Z_CT_MEMBER(CPP11) Z2D##Type z_aabr_##type##_top_center() \
639
+ {return z_2d_##type((object.a.x + object.b.x) / (z##type)2, object.b.y);} \
640
+ \
641
+ \
642
+ Z_CT_MEMBER(CPP11) AABR z_aabr_##type##_top_half() \
643
+ { \
644
+ object.a.y = (object.a.y + object.b.y) / (z##type)2; \
645
+ return object; \
646
+ } \
647
+ \
648
+ \
649
+ Z_INLINE Value2D<T> top_left()
650
+ {return Value2D<T>(this->a.x, this->b.y);}
651
+ \
652
+ \
653
+ Z_CT_MEMBER(CPP11) AABR z_aabr_##type##_top_left_quarter()
654
+ { \
655
+ object.b.x = (object.a.x + object.b.x) / (z##type)2; \
656
+ object.a.y = (object.a.y + object.b.y) / (z##type)2; \
657
+ return object; \
658
+ } \
659
+ \
660
+ \
661
+ Z_CT_MEMBER(CPP11) Z2D##Type z_aabr_##type##_top_right() \
662
+ {return object.b;} \
663
+ \
664
+ \
665
+ Z_CT_MEMBER(CPP11) AABR z_aabr_##type##_top_right_quarter() \
666
+ { \
667
+ object.a.x = (object.a.x + object.b.x) / (z##type)2; \
668
+ object.a.y = (object.a.y + object.b.y) / (z##type)2; \
669
+ return object; \
670
+ } \
671
+ \
672
+ \
673
+ Z_CT_MEMBER(CPP11) AABR z_aabr_##type##_union(ZAABR##Type a, ZAABR##Type b) \
674
+ { \
675
+ ZAABR##Type result; \
676
+ \
677
+ result.a = z_2d_##type##_minimum(a.a, b.a); \
678
+ result.b = z_2d_##type##_maximum(a.b, b.b); \
679
+ return result; \
680
+ }
681
+
682
+ };}
683
+
684
+
685
+ #endif // _Z_classes_mathematics_geometry_euclidean_AABR_HPP_