ootAI/oot/item.ml

24 lines
437 B
OCaml
Raw Normal View History

2021-03-10 00:35:24 +00:00
open import "prelude.ml"
open import "../dolphin.ml"
open import "../pretty.ml"
open import "../mem/decode.ml"
open import "../mem/int.ml"
type item =
| DekuSticks
| NoItem
instance decode item begin
let decode addr =
let code = Dolphin.read_value_8 addr
match code with
| 0 -> DekuSticks
| 255 -> NoItem
end
instance show item begin
let show = function
| DekuSticks -> "Deku Sticks"
| NoItem -> "No Item"
end