comparison src/th06/ecl.rs @ 696:7ae576a418ff

ecl_vm: implement Call, Return, and the call stack thingy.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 23 Aug 2019 02:31:08 +0200
parents aefe5b5f481e
children 81232dac8136
comparison
equal deleted inserted replaced
695:f5b34a1c2707 696:7ae576a418ff
54 /// TODO 54 /// TODO
55 pub param_mask: u16, 55 pub param_mask: u16,
56 56
57 /// The instruction to call. 57 /// The instruction to call.
58 pub instr: SubInstruction, 58 pub instr: SubInstruction,
59 }
60
61 impl CallSub {
62 /// Create a new instruction call.
63 pub fn new(time: i32, rank_mask: Rank, instr: SubInstruction) -> CallSub {
64 CallSub {
65 time,
66 rank_mask,
67 param_mask: 0,
68 instr,
69 }
70 }
59 } 71 }
60 72
61 /// Script driving an animation. 73 /// Script driving an animation.
62 #[derive(Debug, Clone)] 74 #[derive(Debug, Clone)]
63 pub struct Sub { 75 pub struct Sub {