summaryrefslogtreecommitdiff
path: root/src/dosbox_snif/dos_lemm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dosbox_snif/dos_lemm.h')
-rw-r--r--src/dosbox_snif/dos_lemm.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/dosbox_snif/dos_lemm.h b/src/dosbox_snif/dos_lemm.h
new file mode 100644
index 0000000..2935f8d
--- /dev/null
+++ b/src/dosbox_snif/dos_lemm.h
@@ -0,0 +1,85 @@
+#ifndef _DOS_LEMM_H
+#define _DOS_LEMM_H
+
+struct _state {
+ uint8_t s_splatting:1; //0X1
+ uint8_t s_exploding:1; //0X2 combinable
+ uint8_t s_falling:1; //0X4
+ uint8_t s_ascending:1; //0X8
+ uint8_t s_digging:1; //0x10
+ uint8_t s_climbing:1; //0x20
+ uint8_t s_climb_ending:1; //0X40
+ uint8_t s_building:1; //0X80
+
+ uint8_t s_blocking:1; //0X1
+ uint8_t s_bashing:1; //0X2
+ uint8_t s_floating:1; //0X4
+ uint8_t s_mining:1; //0X8
+ uint8_t s_drawning:1; //0x10
+ uint8_t s_ending:1; //0x20
+ uint8_t s_dying:1; //0X40
+ uint8_t s_exploding2:1; //0X80 when exploding too ?
+} __attribute__ ((__packed__));
+
+union state {
+ uint16_t raw;
+ struct _state bf;
+};
+
+struct _flags1 {
+ uint8_t cap_climber:1; // 0x1
+ uint8_t bit_1:1;
+ uint8_t bit_2:1;
+ uint8_t bit_3:1;
+ uint8_t bit_4:1;
+ uint8_t bit_5:1;
+ uint8_t bit_6:1;
+ uint8_t walk_pause_for_shruggling:1; // 0X80
+} __attribute__ ((__packed__));
+
+union flags1 {
+ uint8_t raw;
+ struct _flags1 bf;
+};
+
+struct _lemm_data {
+ uint16_t x_effective; //0x0 - 0x1
+ uint16_t y_effective; //0x2 - 0x3
+ int16_t x_spr_offset; //0x4 - 0x5
+ int16_t y_spr_offset; //0x6 - 0x7
+ union state state; //0x8 - 0x9
+ uint8_t b_10,b_11;
+ uint16_t spr_data_ptr; //0xc - 0xd
+ uint8_t floattime_dble; //0xe
+ uint8_t b_15,b_16,b_17,b_18,b_19;
+ uint16_t ptr2; //0x14 - 0x15
+ uint8_t b_22,b_23,b_24,b_25,b_26,b_27,b_28,b_29,b_30,b_31;
+ uint8_t expl_countdown; //0x20
+ uint8_t steps_remain; //0x21
+ uint8_t b_34;
+ uint8_t falldist; //0x23
+ union flags1 flags1; //0x24
+ uint8_t cap_floater; //0x25
+ uint8_t is_gone; //0x26
+ int8_t direction; //0x27
+ uint8_t spr_frame; //0x28
+ uint8_t draw_hint; //0x29
+ uint8_t b_42,b_43,b_44;
+} __attribute__ ((__packed__));
+
+union lemm_data {
+ unsigned char raw[0x2d];
+ struct _lemm_data s;
+};
+
+enum draw_hint {
+ hint_nothing=0x00, hint_falling=0x04, hint_special1=0x08, /* climbing or slow falling or shruggling */
+ hint_walking=0x09, hint_building=0x10, hint_mining=0x18, hint_bashing=0x20
+};
+
+enum state_bit {
+ s_splatting=0, s_exploding, s_falling, s_ascending, s_digging, s_climbing, s_climb_ending, s_building,
+ s_blocking, s_bashing, s_floating, s_mining, s_drawning, s_ending, s_b7, s_exploding2
+};
+
+#endif /*_DOS_LEMM_H*/