1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/* automatically generated by rust-bindgen */

#[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
pub mod root {
	#[allow(unused_imports)] use self::super::root;
	pub mod std {
		#[allow(unused_imports)]
		use self::super::super::root;
	}
	pub mod ale {
		#[allow(unused_imports)]
		use self::super::super::root;
		#[repr(C)]
		#[repr(align(8))]
		#[derive(Debug, Copy, Clone)]
		pub struct ALEState {
			pub _bindgen_opaque_blob: [u64; 8usize],
		}
		#[test]
		fn bindgen_test_layout_ALEState() {
			assert_eq!(::std::mem::size_of::<ALEState>(), 64usize, concat!("Size of: ", stringify!(ALEState)));
			assert_eq!(::std::mem::align_of::<ALEState>(), 8usize, concat!("Alignment of ", stringify!(ALEState)));
		}
		#[doc = "This class interfaces ALE with external code for controlling agents."]
		#[repr(C)]
		#[repr(align(8))]
		#[derive(Debug, Copy, Clone)]
		pub struct ALEInterface {
			pub _bindgen_opaque_blob: [u64; 5usize],
		}
		#[test]
		fn bindgen_test_layout_ALEInterface() {
			assert_eq!(::std::mem::size_of::<ALEInterface>(), 40usize, concat!("Size of: ", stringify!(ALEInterface)));
			assert_eq!(
				::std::mem::align_of::<ALEInterface>(),
				8usize,
				concat!("Alignment of ", stringify!(ALEInterface))
			);
		}
	}
	extern "C" {
		pub fn ALE_new() -> *mut root::ale::ALEInterface;
	}
	extern "C" {
		pub fn ALE_del(ale: *mut root::ale::ALEInterface);
	}
	extern "C" {
		pub fn getString(
			ale: *mut root::ale::ALEInterface,
			key: *const ::std::os::raw::c_char,
		) -> *const ::std::os::raw::c_char;
	}
	extern "C" {
		pub fn getInt(ale: *mut root::ale::ALEInterface, key: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn getBool(ale: *mut root::ale::ALEInterface, key: *const ::std::os::raw::c_char) -> bool;
	}
	extern "C" {
		pub fn getFloat(ale: *mut root::ale::ALEInterface, key: *const ::std::os::raw::c_char) -> f32;
	}
	extern "C" {
		pub fn setString(
			ale: *mut root::ale::ALEInterface,
			key: *const ::std::os::raw::c_char,
			value: *const ::std::os::raw::c_char,
		);
	}
	extern "C" {
		pub fn setInt(
			ale: *mut root::ale::ALEInterface,
			key: *const ::std::os::raw::c_char,
			value: ::std::os::raw::c_int,
		);
	}
	extern "C" {
		pub fn setBool(ale: *mut root::ale::ALEInterface, key: *const ::std::os::raw::c_char, value: bool);
	}
	extern "C" {
		pub fn setFloat(ale: *mut root::ale::ALEInterface, key: *const ::std::os::raw::c_char, value: f32);
	}
	extern "C" {
		pub fn loadROM(ale: *mut root::ale::ALEInterface, rom_file: *const ::std::os::raw::c_char);
	}
	extern "C" {
		pub fn act(ale: *mut root::ale::ALEInterface, action: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn game_over(ale: *mut root::ale::ALEInterface) -> bool;
	}
	extern "C" {
		pub fn reset_game(ale: *mut root::ale::ALEInterface);
	}
	extern "C" {
		pub fn getAvailableModes(ale: *mut root::ale::ALEInterface, availableModes: *mut ::std::os::raw::c_int);
	}
	extern "C" {
		pub fn getAvailableModesSize(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn setMode(ale: *mut root::ale::ALEInterface, mode: ::std::os::raw::c_int);
	}
	extern "C" {
		pub fn getAvailableDifficulties(
			ale: *mut root::ale::ALEInterface,
			availableDifficulties: *mut ::std::os::raw::c_int,
		);
	}
	extern "C" {
		pub fn getAvailableDifficultiesSize(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn setDifficulty(ale: *mut root::ale::ALEInterface, difficulty: ::std::os::raw::c_int);
	}
	extern "C" {
		pub fn getLegalActionSet(ale: *mut root::ale::ALEInterface, actions: *mut ::std::os::raw::c_int);
	}
	extern "C" {
		pub fn getLegalActionSize(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn getMinimalActionSet(ale: *mut root::ale::ALEInterface, actions: *mut ::std::os::raw::c_int);
	}
	extern "C" {
		pub fn getMinimalActionSize(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn getFrameNumber(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn lives(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn getEpisodeFrameNumber(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn getScreen(ale: *mut root::ale::ALEInterface, screen_data: *mut ::std::os::raw::c_uchar);
	}
	extern "C" {
		pub fn getRAM(ale: *mut root::ale::ALEInterface, ram: *mut ::std::os::raw::c_uchar);
	}
	extern "C" {
		pub fn getRAMSize(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn getScreenWidth(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn getScreenHeight(ale: *mut root::ale::ALEInterface) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn getScreenRGB(ale: *mut root::ale::ALEInterface, output_buffer: *mut ::std::os::raw::c_uchar);
	}
	extern "C" {
		pub fn getScreenGrayscale(ale: *mut root::ale::ALEInterface, output_buffer: *mut ::std::os::raw::c_uchar);
	}
	extern "C" {
		pub fn saveState(ale: *mut root::ale::ALEInterface);
	}
	extern "C" {
		pub fn loadState(ale: *mut root::ale::ALEInterface);
	}
	extern "C" {
		pub fn cloneState(ale: *mut root::ale::ALEInterface) -> *mut root::ale::ALEState;
	}
	extern "C" {
		pub fn restoreState(ale: *mut root::ale::ALEInterface, state: *mut root::ale::ALEState);
	}
	extern "C" {
		pub fn cloneSystemState(ale: *mut root::ale::ALEInterface) -> *mut root::ale::ALEState;
	}
	extern "C" {
		pub fn restoreSystemState(ale: *mut root::ale::ALEInterface, state: *mut root::ale::ALEState);
	}
	extern "C" {
		pub fn deleteState(state: *mut root::ale::ALEState);
	}
	extern "C" {
		pub fn saveScreenPNG(ale: *mut root::ale::ALEInterface, filename: *const ::std::os::raw::c_char);
	}
	extern "C" {
		pub fn encodeState(
			state: *mut root::ale::ALEState,
			buf: *mut ::std::os::raw::c_char,
			buf_len: ::std::os::raw::c_int,
		);
	}
	extern "C" {
		pub fn encodeStateLen(state: *mut root::ale::ALEState) -> ::std::os::raw::c_int;
	}
	extern "C" {
		pub fn decodeState(
			serialized: *const ::std::os::raw::c_char,
			len: ::std::os::raw::c_int,
		) -> *mut root::ale::ALEState;
	}
	extern "C" {
		pub fn setLoggerMode(mode: ::std::os::raw::c_int);
	}
}